API Reference > OdDb Classes > OdDbCurve Class > OdDbCurve Methods > getClosestPointTo Method > OdDbCurve::getClosestPointTo Method (OdGePoint3d&, OdGeVector3d&, OdGePoint3d&, bool)
OdDbCurve::getClosestPointTo Method (OdGePoint3d&, OdGeVector3d&, OdGePoint3d&, bool)
Syntax
C++
virtual OdResult getClosestPointTo(const OdGePoint3d& givenPoint, const OdGeVector3d& normal, OdGePoint3d& pointOnCurve, bool extend = false) const;
Parameters 
Description 
const OdGePoint3d& givenPoint 
[in] Given point.  
const OdGeVector3d& normal 
[in] Normal to the projection plane. 
OdGePoint3d& 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. 

If normal is specified, this Curve object is projected onto the plane defined by givenPoint and normal, finds the closest point on the projected curve to givenPoint, and projects said closest point back onto the plane of this Curve object. It is this point that is returned as pointOnCurve.

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

 

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