API Reference > OdDg Classes > OdDgCurveElement2dPE Class > OdDgCurveElement2dPE Methods > OdDgCurveElement2dPE::getClosestPointTo Method
OdDgCurveElement2dPE::getClosestPointTo Method
Syntax
C++
virtual OdResult getClosestPointTo(const OdDgCurveElement2d* pCurve, const OdGePoint2d& givenPoint, OdGePoint2d& pointOnCurve, bool extend = false) const = 0;
Parameters 
Description 
const OdDgCurveElement2d* pCurve 
[in] Pointer to the curve.  
const OdGePoint2d& givenPoint 
[in] Given point.  
OdGePoint2d& pointOnCurve 
[out] Receives the closed point on this Curve object.  
bool extend = false 
[in] Extends this Curve object if and only if true. 

Returns eOk if successful, or an appropriate error code if not.

Returns the point on the specified Curve object closest to the given point. 

 

Copyright © 2002–2020. Open Design Alliance. All rights reserved.