Mesh to boundary curve (opening included)


I have a mesh (of a wall) with some openings (holes). I want to get the boundary curve of the wall and also the boundary curve of the openings. I tried naked edges but I did not work properly. Can you help me out? Thanks.

You could use Weaverbird plugin
Weaverbird’s naked boundary component


You can also use the MEdges (Mesh Edges) component. and get the naked mesh edges from it’s E1 output. The edges are individual lines, but you can join them to get the polylines.

1 Like

Thanks for your answer @kts.nguyenhoangloc, @diff-arch. I have one more question, how can I know which curves are belong to the holes and which curves are the boundary of the wall (programmatically)?

If the area (or perimeter) of your boundary curve is always bigger than the area (or perimeter) of each individual opening outline, you can simply sort the polylines with their areas (or perimeters) and cull the last item (index -1) from your sorted polylines, which should be the biggest one, and thus the boundary curve. Vis versa, you can fetch the boundary curve by getting the item at index -1 from the sorted polylines.

Another strategy could be to evaluate, which curve includes all the other curves. Although this would be a little more involved, since it probably requires some scripting (i.e. Python, C#, VB).

2 Likes (11.6 KB)

1 Like

another way which use Medges (9.8 KB)

1 Like

You can also call this method of the Rhino mesh class (in e.g. GHPython/C#): (29.2 KB)

(also note how having the largest length does not guarantee this is the outer perimeter)

1 Like

Greetings from post-Covid age,

I’ve tried Wb naked boundary, Mesh Edges, and @AndersDeleuran method, non is working with my mesh.

What happened with my mesh? (92.6 KB)

Try aligning and welding the vertices first, see this topic:

I got another solution, rebuild mesh to surfaces, Brep Edges works perfectly.

1 Like