/***************************************************/ public static Output <Point, Point> CurveProximity(this PolyCurve curve1, PolyCurve curve2, double tolerance = Tolerance.Distance) { Output <Point, Point> result = curve2.ICurveProximity(curve1.Curves[0]); Output <Point, Point> cp = new Output <Point, Point>(); for (int i = 1; i < curve1.Curves.Count; i++) { cp = curve1.Curves[i].ICurveProximity(curve2); if (cp.Item1.Distance(cp.Item2) < result.Item1.Distance(result.Item2)) { result = cp; } } return(result); }