Function to check whether 2 lines are tounching in rhinoscriptsyntax?

I want to find function which can check whether 2 lines in the argument are touching or not.
Does anyone know whether this function exist in rhinoscriptsyntax?

Well, if this was a normal script running in Rhino, I might try one of several ways - but I’m not sure how you want to define “touching” - do you want to see if they intersect, or if the ends meet within tolerance, or something else…? Some things that might be useful:

  1. rs.LineMaxDistanceTo(line,line)
  2. rs.LineClosestPoint(line,point)
  3. rs.CurveCurveIntersection(curve, curve) - more general

There are others as well…

–Mitch

1 Like