API Reference > OdDb Classes > OdDb3dSolid Class > OdDb3dSolid Methods > OdDb3dSolid::createTorus Method
OdDb3dSolid::createTorus Method
Syntax
C++
virtual void createTorus(double majorRadius, double minorRadius);
Parameters 
Description 
double majorRadius 
[in] Radius of the torus  
double minorRadius 
[in] Radius of the tube. 

Creates a WCS aligned torus centered about the world origin and the Z-axis as its axis of rotation. 

 

majorRadius in contrast to minorRadius can't be equal to zero. If majorRadius is smaller than zero, minorRadius must be larger than the absolute value of majorRadius. 

The following constraints are applied: 

 

  • minorRadius >= 1e-6.
  • |majorRadius| >= 1e-6
  • if majorRadius < 0, then minorRadius > |majorRadius| + 1e-6
Copyright © 2002–2020. Open Design Alliance. All rights reserved.