How to get the corresponding polygon from an edge collection

We can get the edge Collection of a polygonObj by using the each_edgemethod,
How can we get the corresponding polygonfrom the set of edges, is this possible?
I didn't find the answer in the documentation


  • Hello Bian,

    Not directly as that can be tricky in general. Edges may not form closed loops or bifurcate. The DXF reader internally does something like that - or it tries to.

    If your polygons are single loops (no holes) and you're safe to have closed loops, you can try this:

    polygons = edges.extended(in: 10.nm, joined: true).hulls


Sign In or Register to comment.