OCCNurbsCurve.closest_point
- OCCNurbsCurve.closest_point(point, return_parameter=False)[source]
Compute the closest point on the curve to a given point. If an orthogonal projection is not possible, the start or end point is returned, whichever is closer.
- Parameters
point (Point) – The point to project to the curve.
return_parameter (bool, optional) – Return the projected point as well as the curve parameter.
- Returns
compas.geometry.Point
– The nearest point on the curve, ifreturn_parameter
is false.(
compas.geometry.Point
,float
) – The nearest as (point, parameter) tuple, ifreturn_parameter
is true.