In another thread, I ended up with “dirty polylines” that double back on themselves with overlapping segments. I tried various ways to find the pair of points (in a cloud of segment end points) most distant from each other and stumbled on Discontinuity for that job, though am not quite sure why it works?
Here I’ve created a test using 77 random lines. I divide each line and Jitter the points to create visually identical “dirty polylines” (verified by comparing their lengths, not shown). The pink points are the “real end points” of the lines while the rest of the points come from Discontinuity, proving that the method doesn’t work here as it did in the other model.
dirty_polylines_2020Sep14a.gh (20.5 KB)
- Why the difference?
- More importantly, how to fix the dirty polylines? (without using the original “clean lines”)
Of the eight discontinuity points for each line (why 8?), which pair are furthest apart, suitable for recreating “clean lines”?
P.S. I guess the answer to the first question is that this test doesn’t replicate the conditions in the other model, which is more likely two segments of different lengths with a shared start or end point. I could just be grateful that the other model works and forget about it, I guess… but I’m curious?