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.
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?
It does. The “Download and Install” feature fails so I used the copy you posted, thanks again.
The sandboxtopology.gha file from Food4Rhino is 59 KB compared to Topologizer.gha at 19 KB so I guess there are more features in it? I didn’t install it to find out as I am reluctant to install any plugins for several reasons… But in the spirit of trust, let go and let it flow, I tried Topologizer.
This model has two sets of SOURCE geometry, ‘Sphere Lines’ and ‘Random Grid’ (from the other thread). And two METHODS, ‘Topologizer’ and ‘By Hand’ (from the other thread). Two Value List components (blue groups) allow any combination of SOURCE and METHOD.
Surprisingly, the ‘By Hand’ method seems to work with ‘Sphere Lines’, despite Dispatch ‘B’ having no output. Otherwise, the results are very similar.
Using ‘Random Grid’:
‘Topologizer’ treats all four edges of the perimeter as a single curve whereas ‘By Hand’ sees them as four segments.
Evaluate Curve indicates that ‘t’ values are different between the two methods as the moving point is at a slightly different location for a given ‘t’ value and slows down and speeds up using ‘Topologizer’.
I’m uncomfortable with the mysterious black box nature of plugins but concede this works well.
Fit Line works well with the ‘Sphere Lines’ because their discontinuity points are distinctly linear.
The ‘Random Grid’ is more problematic because the rectangular curves must be broken up and sifted into horizontal and vertical segments before joining each type separately (both outputs ofDispatchin the yellow “dirty polylines” group). At that point, there is no difference between Fit Line and what I am doing because Discontinuity returns only two points.