Mesh to boundary curve (opening included)

Hello,

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

1 Like

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, @p1r4t3b0y. 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


re.gh (11.6 KB)

1 Like

another way which use Medges

re2.gh (9.8 KB)

1 Like

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

191017_GetNakedEdges_GHPython_00.gh (29.2 KB)

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

1 Like