Find Points from List A with refrence to List B

Hello Everyone,

I have a list of points projected on a 3D scan which is a branched data. I had to flatern the list to find the points that fall inside a 3D polyline curve using Closest points. Now I am unable to find and sort the points according to the branched List A . I have tried multiple things but becasue the data is big all methods have failed.
If you know a way to populate a curve bases on the poximity of the polyline curve that will be the best.
I hope someone has a better idea of how to do this.
regards,

Find points from List A to List B.gh (974.7 KB)

I wish you would add a sketch for better clarifying .
Not sure what exactly you want … I showed two guesses of mine
Find points from List A to List B-01.gh (1.9 MB)

Hi @Ali_Najmaei If you check my List B I have points in this. I need to select these points in List A. But it should maintain the branches…

So for example the {0;0} has 38 points and if List B has 5 points from this branch I need to select only 5 points from this branch…

I hope this explains better…

I can do this for you this afternoon.

this looks like the fastest solution, using Elefront’s plugin Create Tree component:

you can get the exact same result using no plugins via code, or with Replace Paths which will probably melt your CPU (unlock the component at your own risk :smiley: )

Find points from List A to List B_inno.gh (986.8 KB)

Sniped by the Treemaster.

@inno Sadly, I don’t think your solution works. Because duplicates.


A native Grasshopper solution:


Find points from List A to List B VR 02.gh (978.2 KB)

Is slow. Approx 25 sec.

I don’t know why you are using Closest Points instead of doing the hard work of creating BRep geometry to capture the points with Point in Brep. Faster and more exact. Creating the BReps is work you should do in Rhino though.


Find points from List A to List B VR 01.gh (1.0 MB)


Faster solution that uses only native Grasshopper components, excludes duplicates, and maintains empty branches:


Find points from List A to List B VR 05.gh (982.7 KB)

Sorry for all the edits.