API Reference > OdGe Classes > OdGeCurve2d Class > OdGeCurve2d Methods > closestPointTo Method > OdGeCurve2d::closestPointTo Method (OdGePoint2d&, double&, OdGeInterval*, OdGeTol&)
OdGeCurve2d::closestPointTo Method (OdGePoint2d&, double&, OdGeInterval*, OdGeTol&)
Syntax
C++
OdGePoint2d closestPointTo(const OdGePoint2d& point, double& param, const OdGeInterval* range, const OdGeTol& tol = OdGeContext::gTol) const;
Parameters 
Description 
const OdGePoint2d& point 
[in] Point to be evaluated.  
double& param 
[out] uv-coord of closest point.  
const OdGeInterval* range 
[in] Interval on curve.  
const OdGeTol& tol = OdGeContext::gTol 
[in] Geometric tolerance. 

Finds the closest point on this curve to the input point. 

 

Native interval is not considered. If projection of the point does not lie in range-interval, the closest bound of the interval is returned. In case of uvBox == NULL closestPointTo(point, range, tol) is called where range is a native curves interval. An unbounded interval should not be used here.

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