API Reference > OdDb Classes > OdDbMPolygon Class > OdDbMPolygon Methods > OdDbMPolygon::getClosestLoopTo Method
OdDbMPolygon::getClosestLoopTo Method
Syntax
C++
virtual int getClosestLoopTo(const OdGePoint3d& worldPt) const;
Parameters 
Description 
const OdGePoint3d& worldPt 
[in] 3D point in world coordinate system.  

Index of the closest loop.

Finds the closest loop from the OdDbMPolygon within the pick box around the specified 3D point. 

 

  • Returns -1 if there is no loop in the pick box.
  • The pick box is created around the input point. The size of the pick box is specified by the system variable PICKBOX.
  • If two loops are at the same distance from the point, the function finds a loop with a lower index.
  • If two loops are within the pick box, the function finds a loop that is closer to the worldPt point.
Copyright © 2002–2021. Open Design Alliance. All rights reserved.