mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 00:03:17 +00:00
a543022bba
When merge_coplanar merges two sub-faces that share an edge from the original BRep (e.g. two rectangles forming an L-shape cap), that shared edge remained in boundary_edges via original_edges filtering, causing the edge_adjacency walk to produce wrong polygons. Fix: after coplanar merging, use edge frequency (edges used by exactly 1 triangle = boundary) instead of original_edges filtering, which correctly identifies only outer boundary edges. Also add safety checks: edge_adjacency emptiness guard, infinite loop protection, and minimum polygon length check. Generated with the assistance of an AI coding tool.