SmApiCurveClosestPoint#

Defined in SM_API/inc/SmApiQueries.h

SmApiStatus SmApiCurveClosestPoint(
const SmCurve *pCurve,
const SmPoint3d &crPoint,
SmPoint3d &rClosestPoint,
double &rdParameter,
double &rdDistance,
)#

Returns SM_ERR_INVALID_INPUT for a NULL curve, propagates solver/evaluation failures, and returns SM_ERR if the solve succeeds without any solution.

Parameters:
  • pCurve – [in ]: Curve to query

  • crPoint – [in ]: Point to find closest on curve

  • rClosestPoint – [out]: Closest point on curve

  • rdParameter – [out]: Curve parameter at closest point

  • rdDistance – [out]: Distance from input point to closest point