CreateRevolvedGeometry Method (Frame, IList(CurveLoop), Double, Double)


Creates a solid of revolution by revolving a set of closed curve loops around an axis by a specified angle.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Since: 2012

Syntax

C#
public static Solid CreateRevolvedGeometry(
	Frame coordinateFrame,
	IList<CurveLoop> profileLoops,
	double startAngle,
	double endAngle
)
Visual Basic
Public Shared Function CreateRevolvedGeometry ( _
	coordinateFrame As Frame, _
	profileLoops As IList(Of CurveLoop), _
	startAngle As Double, _
	endAngle As Double _
) As Solid
Visual C++
public:
static Solid^ CreateRevolvedGeometry(
	Frame^ coordinateFrame, 
	IList<CurveLoop^>^ profileLoops, 
	double startAngle, 
	double endAngle
)

Parameters

coordinateFrame
Type: Autodesk.Revit.DB Frame
A right-handed orthonormal frame of vectors. The frame's z-vector is the axis of revolution. The start and end angle inputs refer to this frame.
profileLoops
Type: System.Collections.Generic IList CurveLoop
The profile loops to be revolved. No conditions are imposed on the orientations of the loops. This function will use copies of the input loops that have been oriented as necessary to conform to Revit's orientation conventions. Restrictions:
  • The loops must lie in the xz coordinate plane of the input coordinate frame.
  • The curve loop(s) must be closed and must define a single planar domain (one outer loop and, optionally, one or more inner loops).
  • The curve loops must be without intersections, self-intersections, or degeneracies.
  • The loops must lie on the "right" side of the z axis (where x >= 0).
  • No loop may contain just one closed curve - split such loops into two or more curves beforehand.
startAngle
Type: System Double
The start angle for the revolution, in radians, measured counter-clockwise from the coordinate frame's x-axis as viewed looking down the frame's z-axis.
endAngle
Type: System Double
The end angle for the revolution, using the same conventions as the start angle. The end angle may be less than (but not equal to) the start angle. The total angle of revolution, equal to the absolute value of (endAngle – startAngle), must be at most 2*PI.

Return Value

The requested solid. Note that if less than a full revolution is used, planar end faces will be added as part of the solid.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The input argument coordinateFrame should be a right-handed orthonormal frame of vectors. -or- The profile CurveLoops do not satisfy the input requirements. -or- The absolute value of %(endAngle – startAngle)%, must be at most 2*PI.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also