virtual Acad::ErrorStatus
getClosestPointTo(
const AcGePoint3d& givenPnt,
const AcGeVector3d& direction,
AcGePoint3d& pointOnCurve,
Adesk::Boolean extend = Adesk::kFalse) const;
givenPnt |
Input point (in WCS coordinates) for which to find nearest point on curve |
direction |
Input normal vector (in WCS coordinates) for plane to project onto |
pointOnCurve |
Returns the point (in WCS coordinates) on the curve that is nearest to givenPnt |
extend |
Input Boolean indicating whether or not to extend curve in search for nearest point |
This function projects the curve onto the plane defined by givenPnt and normal, finds the point on the projected curve that is nearest to givenPnt, then projects this nearest point back onto the original curve and sets pointOnCurve to the result. |