GetDistancesBetweenCurves?

I am using the call static bool Rhino.Geometry.Curve.GetDistancesBetweenCurves and tested on 2 lines that intersect
the result is a real number ( 0.2 meter units in my case )

Whats that ?

I was expecting a nice zero ( 0.0) or a very small number 1.0e-xx

What should I use to compute distance between 2 curves in exact way ?

gd

Yes you are right. It looks like this method is for the two curves that overlaps and not intersect.

I guess you’re looking for Curve.ClosestPoints:

private void RunScript(Curve x, Curve y, ref object A, ref object B, ref object D)
{
  Point3d p1, p2;
  x.ClosestPoints(y, out p1, out p2);
  A = p1;
  B = p2;
  D = p1.DistanceTo(p2);
}

ClosestPoints.gh (6.4 KB)