Curve.ClosestPoints

Hi,

Is there an equivalent to Curve.ClosestPoints in OpenNurbs or Rhino C++ SDK ?

This is the .net function:
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_ClosestPoints.htm

I depends on the curve type, I think. Lines, polylines, circles, arc, and such have closest point search methods. What kind of curve type are looking to find the closest point for?

Hi @Petras_Vestartas,

The Curve.ClosestPoints method eventually calls RhinoGetClosestPoint. See rhinoSdkUtilities.h for details.

– Dale

1 Like

Thank you. I assume that such intersection / search method are not included in OpenNurbs just basic geometry types and line/plane intersections? I tried to search something similar for curves but nothing is here. I ll try to use rhino sdk.

It is the case when you have two nurbs curves and you would like to find closest points in between them. Polylines would work as well.

For two polylines, it’s simpler than I imagine it being for Nurbs curves.

https://metacpan.org/release/SALVA/Math-Vector-Real-Polyline-0.01/source/lib/Math/Vector/Real/Polyline.pm#L74

If I remember correctly, there should also be an implementation in CGAL.