Group Points by Location


I have a list of points and a sort of nurb surface. My goal is to group these points by the location in relation to this surface…the ones that are on the exterior of the surface in one list and the others in another list. I need at the end to evaluate the distance between these “internal” points and the projected points on this surface.
Please find attache a diagram:

Thank you.

@john1 Here is a planar solution.
You should either be able to adapt this to a 3D case or reduce the 3D case to 2D (by projecting to a base plane)
inOut.dyn (8.4 KB)


Vikram, thank you for your suggestion. In 2d your solution works beautifully, but my case, I have a 3D surface and a bunch of points, few of them “inside”, few " outside" as in the picture attached.
I need from this list to get only the ones Inside (red ones). I think that if I use Geometry.Closest Point, will get the projected points on the surface from both sides. Then, I could create vector by start, end point, where the start points are the initial list of points and the end points are the projected on surface ones. Of course that the vectors created using the Inside points as start, will have a opposite direction from the ones created from the start Outside ones. The trick is to group these vectors by Orientation and then based on that filter the Inside points based on that.
What do you think ?

Thank you!

Kind regards.

Not necessarily true

You can calculate directionality (to an extent), through the dot product of the vectors. The scalar can be used to establish which vectors point ‘upwards’ and which point ‘downwards’ solving any issues caused by the normals flipping. You can then filter the list that way. However This method is only going to work if your surface is ‘roof-like’ and doesn’t fold in on itself

I thought that can use the vectors/ direction or something like that to filter these points.
If this or something else is not possible, I will thicken the surface, get a solid, Geometry.DoesIntersect, Filter by Bool Mask…get the points…end of story.

Or…offset the surface 1mm towards the Inside…Line by Start point( initial list) End Point ( projected points on surface)…Geometry.DoesIntersect ( offset surface vs lines) Filter by Bool Mask…get the points…

I just thought that there is a clever way to find a set of points that are inside a Dome…or outside.

Thank you.

There is: project points using world Z vector. If it intersects the surface you return a point. If it returns a point it’s under the dome!