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) – If True, return the curve parameter in addition to the closest point.
- Returns
Point
| tuple[Point
, float] – If return_parameter is False, the nearest point on the curve. If return_parameter is True, the nearest point on the curve and the corresponding parameter.