Hi everyone,
I’m working on a Dynamo model for Revit where I extract boundary curves (Lines and Arcs) from walls and floors to define compartmentation areas. I’ve already managed to get all the perimeter lines projected to a common Z level (like a floor plan). Now, I want to “fillet” or connect the corners where these lines meet.
The challenge is that due to imprecise geometry, the ends of adjacent lines don’t always touch. I want to:
- Sort the boundary curves into a continuous ordered loop (preferably clockwise),
- Identify gaps between endpoints
- Extend the lines to meet at a common point (fillet with sharp 90º corners, not rounded),
- Avoid creating overlapping or duplicated lines,
- Skip gaps if the lines clearly do not meet or are far apart.
Important notes:
- I’m working only with 2D geometry (everything is planar),
- Curves include both straight lines and arcs,
- No openings expected outside of corners for now,
- If the gap cannot be resolved reasonably, I just want to log a warning.
I’d prefer to do this with Dynamo nodes, but I’m open to Python solutions as well. I’m using packages like Clockwork, GeniusLoci, and Springs.
Thanks in advance for any help or suggestions!