Hi!
Would anyone know how to convert a slighly irregular polyline in another polyline with all internal angles as 90 degrees?
curve_internalized.gh (2.7 KB)
Hi!
Would anyone know how to convert a slighly irregular polyline in another polyline with all internal angles as 90 degrees?
curve_internalized.gh (2.7 KB)
Hi @mariana.santos ,
This definition could be simplified but for now it should get you what you need,
the algorithm gets a single edge from the input polyline, creates an aligned bounding box using that edge and then calculates the difference in angle at each segment against the aligned bounding box and finally rotating and extending the original segments to end up with overlapping segments that can be used to find a region.
Again, could be simplified for sure but that’s my first pass.
Graph Space:
Model Space (manual selection of edge):
Model Space (automatic selection of longest edge):
All 90 degrees:
Cheers, hope this helps you!
20240712_Straighten_Polyline_Response_01a.gh (15.7 KB)
20240712_Straighten_Polyline_Response_01b.gh (18.0 KB)
Certainly it does! wow! thank you!