Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
OdDb3dSolid::createPyramid Method
Syntax
C++
virtual OdResult createPyramid(double height, int sides, double radius, double topRadius = 0.0);

Creates a pyramid. World origin is centered about the base of the pyramid and the pyramid is positioned at a half of the specified height above the world origin. 

 

Parameters
Description
height
[in] Value of the pyramid's height.
sides
[in] Quantity of sides for the pyramid.
radius
[in] Radius for circle inscribed into the bottom polygon.
topRadius
[in] Radius for circle inscribed into the top polygon.

eOk if successful or an appropriate error code in other case.

The pyramid's base is located in the X-Y plane of the WCS. The pyramid's direction (from the base to the top) coincides with the positive direction of the Z axis. When radius and topRadius values are equal, a prism is created. The following constraints are applied:

  • |height| >= 1e-6
  • |radius| >= 1e-6
  • |topRadius| >= 1e-6
  • 3 <= sides <= 64
Copyright © 2002-2022. Open Design Alliance All rights reserved.