Cull with trees

Hi there,

So, the problem is easy, but I am having problems to simplify the definition.

The idea is that points that are near from curves have to be deleted (see image). BUT! The exercise requires many groups with many points, and each group might have more than one curve (up to 4, but that doesn’t matter). Problem is, we need to keep the groups in the data tree structure to follow with the project.

Because of the amount of points and curves keeps changing it is needed a really clean data tree that doesn’t need to flatten, merge or explode groups. My attempts didn’t work… I tried duplicatting data and using logic gates but… :frowning: is too clonky.

In the file attached I just tried to simplify the problem, and there a few extra comments.

Any help/idea? Thanks in advance

cullingroups.gh (13.6 KB)

dispatch isnt really necessary here (but you might find it useful), cull pattern does the trick. i guess pull point is what youre looking for here.

cull_closest.gh (13.6 KB)

Thanks a lot Amir, for your speed and help. It work, perfectly, that “closest” option is awesome.
I wonder it there would be another way, without using that component… I was expecting a “fancy class of data trees”. :wink:

Thanks again for your help!