Jump to content

Generating Proximity Groups in SOPs


Recommended Posts

I attempting to create a group for each point which contains the 3 nearest particles, in vops i plugged in PT to a print to generate groups using Create Point Group, i would then pc open/iterate through the points and add them to each respective group but it appears if you try to use more than one group inside the vop it just applies to the first group which was read (usually group0)

i figured that to work around that you could just use a foreach to generate groups for every point, but adding the points to each group doesnt appear to work, is there a solution to this in sops?

Link to comment
Share on other sites

you can do it in the same foreach in which you are creating groups

create group

fill it with neighbour numbers from second input which will be full geometry not just currently processed point

(and don't forget to skip first point when pcimporting which will be current point)

it would be of course slower than single VOP SOP, but it really seems that group name in addgroup() is not evaluated per point

what you may also consider is to create vector attribute containing numbers of 3 closest neighbours instead of groups

or you can use array if there is more

it depends on your usage however

Link to comment
Share on other sites

the problem becomes this: within the foreach loop i can make a group from the second input for each point based on a bounding box which is essentially the proximity group, but if you have "merge results" turned on its going to replicate all of your points for every point.

i need to retain the grouping patterns without accumulating copies of points

edit: simple solution, adding a fuse to afterwards with group propagation set to union consolidates all the point copies and places them in appropriate groups

Edited by ikarus
Link to comment
Share on other sites

  • 3 weeks later...

I attempting to create a group for each point which contains the 3 nearest particles, in vops i plugged in PT to a print to generate groups using Create Point Group, i would then pc open/iterate through the points and add them to each respective group but it appears if you try to use more than one group inside the vop it just applies to the first group which was read (usually group0)

i figured that to work around that you could just use a foreach to generate groups for every point, but adding the points to each group doesnt appear to work, is there a solution to this in sops?

why not create attribute + partition sop afterwards?

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