Surface Closest Point, multiple surfaces

Hi everyone, I’m new to Grasshopper and struggling to solve the following problem.
I’ve different surfaces at different heights. For every height, I’ve multiple points and I have to select only the points inside the surfaces of that level. I started to use the component Surface Closest Point, but it seems working with just one surface at a time. How can I work with multiple surfaces?

I attached the Grasshopper files. Be careful cause I used the Clipper component plugin.

Select (16.4 KB)


You need to match the tree structures by dropping 2 levels for the points.
Then all points in a branch “correspond” to the surface so the filtering should work level by level.

Select (17.4 KB)

1 Like

Thank you very much, you really saved my day!!!

Just a last thing I would like to ask. After the Cull Pattern component, I have all the correct points. But if I try to create a polyline the final result, for every list, is just one polyline and not 3 (image below). How can I recreate the 3 different polylines for every layer?

Select (15.9 KB)

Since your polylines seem to fully enclosed on a surface, you could cheat by filtering those instead of the points.
Otherwise, I’m afraid you’ll need to stick with the level 3 data tree (x;y;z = level;side;offset) which means duplicating the surfaces as many times as necessary to graft them into a level-3 datatree. Please tell me you don’t need this :sweat_smile:

Select (20.2 KB)

1 Like

thanks a lot! I’m trying with your first solution that seems smarter.
But, just in case, how hard would the second option be? :joy:

I confirm that your first idea perfectly works. So really thank you again!!!

1 Like

That should do it (cyan group)

See how the tree structure is maintained at three levels, so some branches end up with a null polyline. Essentially this only tells you which offsets were removed.

Select (25.0 KB)

1 Like

ok perfect I’ll save both this option and the previous one.

thanks a lot!!!