Atom Posted October 7, 2017 Share Posted October 7, 2017 (edited) Hi All, I have a curve shape with edge groups. The edge groups flow in various direction, sometimes along the XY plane and sometimes along the XZ plane. I need to have the resulting point group have the points sorted in the order that they appear in the edge group. So two groups are involved, an edge group, which is the source and the point group which is the result. The resulting point group is detected by remeshing the original shape into a higher triangle/quad representation of the shape. The original edge group is resampled and compared against the remesh version to determine final point group candidates. The image shows the problem. When I inspect the resulting point group with a python node I can see the order is wrong. Point #6 is listed first and point #16 is listed second but they are very far apart circled in RED. Python order (6, 16, 23, 25, 140, 149, 156) Required order (6, 25, 7, 140, 23, 149, 21, 156, 16, 14) I tried using the sort node, expecting Point Sort By Vertex Order to work, but it does not. I tried all the other sort options as well. ap_sort_points_along_edge_group.hiplc Edited October 7, 2017 by Atom Quote Link to comment Share on other sites More sharing options...
Atom Posted October 8, 2017 Author Share Posted October 8, 2017 (edited) So here is the original edge group from the shape. Here is that same edge resampled to add more points. A grid based version of the original shape (via divide) is overlayed near the sample points. Points from the overlayed grid are selected based upon proximity to the resample points. This is called the result set. So how do I order or sort the result set? (yes I tried turning on the Create Ordered check box.) When the points are in the wrong order, the clothstitchconstraint node does not work. Cross stitching errors out the node. Edited October 8, 2017 by Atom Quote Link to comment Share on other sites More sharing options...
satoru Posted October 8, 2017 Share Posted October 8, 2017 I tried sorting with VEX. sy_sort_points_along_edge_group.hiplc 2 Quote Link to comment Share on other sites More sharing options...
Atom Posted October 8, 2017 Author Share Posted October 8, 2017 Thanks, that looks promising! Quote Link to comment Share on other sites More sharing options...
Atom Posted October 9, 2017 Author Share Posted October 9, 2017 I was able to integrate your solution into my cloth stitching. Now I have a working sleeve! 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.