Jump to content

Sorting point number by group membership


Recommended Posts

Hello, I have a number of point groups, and i`d like to sort the numbers by group.

Group_1 should have its points sorted so they are ordered 0-number of points in this group,

Group_2 should have its points sorted so they follow on from that.... etc

Is there a way to do this? Some kind of expression in the sort node?

Thanks!

Link to comment
Share on other sites

This can be very easily done by using delete and merge nodes. ;)

Per group you delete all the rest. (so you only have group 1 left in one node and group 2 in another node)

Then you can simply merge them again.

depending on the order at which you connect the nodes to the merge node, the order changes.

The first node will get the lowest numbers.

Link to comment
Share on other sites

just append For Each SOP

set it to Each Group mode with Group_* as a mask

and check Apply To Points since they are point groups

this will automatically sort them by group since it processes each group separately then merges together

of course groups should include all points and not overlap each other

if you have geometry as well not just points then you will need to transfer point numbers from new points back to original geometry and sort by that

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