Jump to content

Sort Points In Order They Appear In Edge Group?


Atom

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.

Untitled-1.jpg

ap_sort_points_along_edge_group.hiplc

Edited by Atom
Link to comment
Share on other sites

So here is the original edge group from the shape.

Untitled-1.jpg.699d8a6b85aef98c9973f402195e52dd.jpg

 

Here is that same edge resampled to add more points.

Untitled-1.jpg.2dbacb0481a77d85f9292376cd4a2955.jpg

 

A grid based version of the original shape (via divide) is overlayed near the sample points.

Untitled-1.jpg.202983afda985c62b398a8f6dced5d79.jpg

 

Points from the overlayed grid are selected based upon proximity to the resample points. This is called the result set.

Untitled-1.jpg.5d79290eaff5db4f705532c753d62500.jpg

 

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.

Untitled-1.jpg.d7286b0a4c302cd96fd379c239b5cac4.jpg

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.

Guest
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...