Is there any method in Python that can merge collinear lines
2 Likes
Thank you very much for this method. I would like to know if there are any other lines that can connect to the endpoints of multiple collinear lines
I want the second effect, and the third image uses lines
See what the attached does and try to translate it to P (good luck: hope dies last).
Clusters_CoLinearLinesl_V1.gh (184.3 KB)
Steps:
- Learn how to code (NOT with computer on).
- Get the gist of a classic hard flat Clustering (NOT possible via LINQ or a “classic” double Loop).
- Get the gist of finding the “extremes” of a given Colinear pts collection. That said that’s elementary: just OrderBy the collection 2 times (see inside C#).
BTW: This is the classic Clustering approach without using pre-filters (as is the norm in real-life). Clustering means: find indices.
And for this case this is the 1M question: