Case 1 Lines:
I have touching lines, I like to join them into polylines but stop at large angles.
So in the below case, I want the red lines to become one polyline, and the yellow and green lines to become others.
Two possible methods attached here, comparing the angle of the neighboring segments to get discontinuity within angular tolerance and, secondly, exploiting the offset curve component to detect “hard edges”.
SplitAtCorners should be enough, but your polyline has some overlapping vertices,
fix it and it should work. @DanielPiker the split part shouldn’t work with open polylines too?
I realize this is outside the scope of what was provided in the input curves but I can’t seem to get the Split At Corners method working with a list of non-planar curves/mix of polylines and nurbs curves, but even though my original method is longer, it does appear to handle this use case as well. Just sharing for what it’s worth.
Here’s a test file with conditions breaking the logic & the updated cluster that solves for all tested conditions (with the caveat of using many more components):