Create Method (XYZ, XYZ, Curve)


Creates a Surface object coincident with the surface of revolution defined by an axis and a profile curve.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2017

Syntax

C#
public static Surface Create(
	XYZ axisBasePoint,
	XYZ axisDirection,
	Curve profileCurve
)
Visual Basic
Public Shared Function Create ( _
	axisBasePoint As XYZ, _
	axisDirection As XYZ, _
	profileCurve As Curve _
) As Surface
Visual C++
public:
static Surface^ Create(
	XYZ^ axisBasePoint, 
	XYZ^ axisDirection, 
	Curve^ profileCurve
)

Parameters

axisBasePoint
Type: Autodesk.Revit.DBXYZ
The base point of the axis of revolution. Expected to lie within the Revit design limits IsWithinLengthLimits(XYZ).
axisDirection
Type: Autodesk.Revit.DBXYZ
The direction of the axis.
profileCurve
Type: Autodesk.Revit.DBCurve
The profile curve, which should satisfy the following conditions:
  • It is bounded and non-degenerate.
  • It is co-planar with the axis of revolution.
  • It lies on only one side of the axis.
  • Only the end points of the profile curve can touch the axis.

Return Value

The created surface. Note that this surface may not be of type RevolvedSurface.

Remarks

The returned surface may not be of type RevolvedSurface - this function will create a surface of the simplest possible type (Plane, Cylinder, etc.) that can be used to represent the required surface of revolution. Given that the surface may be simplified, this function does not guarantee any particular parameterization of the surface.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The input point lies outside of Revit design limits. -or- The input profile curve is not valid to create a surface revolution around the given axis.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException axisDirection has zero length.

See Also