grasshopper2 Rhinorhino3d.com
ComponentCurve
Non-crossing Lines
00000000-0623-4798-887b-c486728fb691
object preview

Connect two equally large sets of points with lines so that no two lines intersect. There are often several solutions for any given pair of point sets. Note that it is not possible to select a specific solution with this component, or indeed view multiple solutions.

The algorithm starts by creating an initial connectivity, linking each point in the Pa set to the nearest, still unconnected, point in the Pb set. Note that this does not necessarily result in the optimal shortest possible connectivity.

Next every pair of lines found to be crossing have their end points swapped, until no crossing lines remain.

1
2
3
4
5
6
Example file NonCrossingLines.ghz.Interactive in Grasshopper 2
Connect two sets of points with lines that never intersect. The outer set is a radially random distribution of points which can be rotated using a protractor.