API Reference > OdDb Classes > OdDb3dSolid Class > OdDb3dSolid Methods > OdDb3dSolid::revolve Method
OdDb3dSolid::revolve Method
Syntax
C++
virtual OdResult revolve(const OdDbRegion* pRegion, const OdGePoint3d& axisPoint, const OdGeVector3d& axisDir, double angleOfRevolution);
Parameters 
Description 
const OdDbRegion* pRegion 
[in] Pointer to the region to be revolved.  
const OdGePoint3d& axisPoint 
[in] Point on the axis of revolution.  
const OdGeVector3d& axisDir 
[in] Vector defining the axis of revolution.  
double angleOfRevolution 
[in] Angle of revolution in radians.
 

Returns eOk if creating a solid by revolving is successful or an appropriate error code if not.

Creates a solid by revolving the specified region around the axis. Axis is specified with a point and vector. Revolution can be produced with an angle. 

 

The axis of revolution is projected onto the plane of the region, parallel to its normal. Revolution axis must be valid for a rotation of region: axisDir is not perpendicular to the plane of a region, axisDir does not pass through a region, etc. 

The following constraints are applied:

  • The projected axis of revolution cannot intersect the region.
  • angleOfRevolution >= 1e-6

 

This method is implemented for Spatial modeler and ModelerGeometry.

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