how to remove points from a group based on another?

   5709   4   2
User Avatar
Member
10 posts
Joined: April 2015
Offline
I have a curve with a few points, (group1)
I resample the curve using the resample by polygon edge setting and a fixed distance between points, (group2)

I would now like to delete those points which were in the original curve.
Since each line section of the curve may be a different length, there doesn't seem to be an expression I can use to group and delete these points.

Please someone tell me how can I delete the points from group2 which are also in group1? I can't figure how to do this with the delete, group or blast nodes but I feel I'm overlooking something simple..

thanks all!
User Avatar
Member
1746 posts
Joined: May 2006
Offline
normally you'd use the group logic on the combine tab to say ‘group2 != group1’.

As you've found though, the resample blows away your groups, so that's no good.

Here's an alternative method. create an attribute with a pointwrangle, ‘@deleteme=1’. Run the resample, another wrangle, ‘@deleteme=0’.

Add an attribtransfer, and transfer the pre-resample deleteme with a short falloff to the post-resample.

You can then blast based on @deleteme==1.

Attachments:
resample_delete_points.hip (62.3 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
8595 posts
Joined: July 2007
Offline
or you can just use attribwrangle:
if (nearpoint(1, @P, 0.0) != -1) removepoint(0, @ptnum);
plug resampled to first input and original to second

Attachments:
delete_points_by_proximity.hip (65.7 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1746 posts
Joined: May 2006
Offline
nice!
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
10 posts
Joined: April 2015
Offline
Ahh thanks both! That's perfect!
I came close to your method mestela but got confused when the resample copied my attribute to all the new points and missed the all important attribtransfer step!

Tamte> wow. That's truly elegant!
  • Quick Links