Jump to content

Sort Points In Order They Appear In Edge Group?


Recommended Posts

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.



Edited by Atom
Link to comment
Share on other sites

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 by Atom
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...