How to select all points on a mesh surface that are within a closed polyline

Hi, I have a high resolution mesh and I have used PolylineOnMesh to draw a closed polyline on the surface of the mesh. Now I would like to select all points in the mesh that fits within that closed poly line.
Is there a way to do this?

If the mesh isn’t flat (forming a Plane), then you would have a bit of a problem defining what is “inside” or not.

But if the curve is flat enough so as to enable deriving a Plane from it (averaging its direction in 3D space), then you could extrude the curve in both directions of the Plane and so have a volume to test for inclusion.

In GrassHopper you could then use PointInBrep to test which Vertices are inside the volume (attached to GrassHopper as a “Brep”).

I do this kind of thing all the time (in GrassHopper) using mainly Spheres, Boxes, Cylinders or Toruses to test for point inclusion. The generic PointInBrep (pictured) isn’t superfast but in most cases it does the job.

// Rolf


Hello - it depends on exactly what you have but turning on the points for the mesh and using SelBoundary might work…


1 Like

Thank you very much for the quick reply!
I think my surface should be flat enough to do what you suggests. I don’t plan to use GrassHopper, but I I hope it will be possible using Rhinocommon as well.


SelBoundary seems to work quite well except that I get the points on the other side of the shape as well. My shape looks a bit like a somewhat deformed beer can and my closed polyline is on one side of the can. Do you know if there is a way to only get the points where the polyline is on the can surface? I guess what @RIL suggested would solve this issue. Also from Rhinocommon, I guess I need to run the command as a script, right? Then what arguments would I send to the command?

Thank you,

Hi Arne - with CullControlPolygon set, you can avoid selecting the back side points.


Thanks a lot for this great and fast help to a Rhino beginner, this seems to work very well!

Now I shall try doing it through Rhinocommon.