Boundary that encloses polygons

I’d like to get the outermost boundary/a boundary that encloses the polygons but I don’t have any good idea on how to make dynamo to automatically get those points.

• Convex Hull 2D
• Take every odd or even curve of the resulting polygon
• Intersect each of those curves with the next one
• Create new polygon from resulting points

This will give you both possible solutions for polygon E

Come to think of it you can get the desired result right away if in step 2 you filter out all curves that coincide with any of the boundary curves of A, B, C and D:

• Convex Hull 2D
• Filter out all curves from the resulting polygon that coincide with any of the boundary curves of A, B, C and D
• Intersect each of the remaining curves with the next one
• Create new polygon from resulting intersection points
2 Likes

Great solution as always @Andreas_Dieckmann!

1 Like

You could also extend this with the Rotating Calipers algorithm and find the minimal area rectangle that encompasses all of the shapes.

@jair_gh I used custom convex hull algorithm

@Andreas_Dieckmann
Thank you. I managed with a simple convex hull.
So far works for what I need .

I kept developing my graph and as I went on I found something rather confusing. When I converted my curves onto polygons and then onto sufraces to thicken them some of the normals were flipped, as you see on the first image.

My solution was to decompose the surfaces and filter out the negative and positive Z values via a boolean mask and then make another surface resulting on a longer-than-expected graph.

Would you guys take a look and point me on a simpler solution, or was my approach just fine?

You could just use your Z vector for driving the thickness (negative thickness will extrude the other way). No need to filter or create new surfaces.

1 Like

Solved by connecting Polygon.ByPoints to Curve.ExtrudeAsSolid. The problem only showed whenever I tried to thicken a Surface.ByPatch