API Reference > OdDb Classes > OdDbRegion Class > OdDbRegion Methods > OdDbRegion::getAreaProp Method
OdDbRegion::getAreaProp Method
Syntax
C++
virtual OdResult getAreaProp(const OdGePoint3d& origin, const OdGeVector3d& xAxis, const OdGeVector3d& yAxis, double& perimeter, double& area, OdGePoint2d& centroid, double momInertia[2], double& prodInertia, double prinMoments[2], OdGeVector2d prinAxes[2], double radiiGyration[2], OdGePoint2d& extentsLow, OdGePoint2d& extentsHigh) const;
Parameters 
Description 
const OdGePoint3d& origin 
[in] Origin of the coordinate system to use for evaluation (WCS).  
const OdGeVector3d& xAxis 
[in] X axis of the coordinate system to use for evaluation (WCS).  
const OdGeVector3d& yAxis 
[in] Y axis of the coordinate system to use for evaluation (WCS).  
double& perimeter 
[out] Reference for returning the value of region's perimeter.  
double& area 
[out] Reference for returning the value of region's area.  
OdGePoint2d& centroid 
[out] Reference for returning centroid of the region.  
double momInertia[2] 
[out] Static array for returning moments of inertia for the region.  
double& prodInertia 
[out] Reference for returning region's product of inertia.  
double prinMoments[2] 
[out] Static array for returning principal moments for the region.  
OdGeVector2d prinAxes[2] 
[out] Static array for returning principle axes of the region.  
double radiiGyration[2] 
[out] Static array for returning radii of gyration of the region.  
OdGePoint2d& extentsLow 
[out] Reference for returning region's minimum extents point.  
OdGePoint2d& extentsHigh 
[out] Reference for returning region's maximum extents point.
 

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

Calculates the area properties of the region. 

The method validates the origin, xAxis, and yAxis parameters to ensure that:

  • axes are perpendicular to each other.
  • axes and the origin lie in the same plane as the region.

 

Returned values are measured using the values of origin, xAxis, yAxis parameters. and are represented in WCS coordinates. 

This method is implemented only for Spatial modeler and returns eNotImplementedYet status for other modelers.

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