EllipseCreateCurve Method |
Creates a new geometric ellipse or elliptical arc object.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static Curve CreateCurve(
XYZ center,
double xRadius,
double yRadius,
XYZ xAxis,
XYZ yAxis,
double startParameter,
double endParameter
)
Public Shared Function CreateCurve (
center As XYZ,
xRadius As Double,
yRadius As Double,
xAxis As XYZ,
yAxis As XYZ,
startParameter As Double,
endParameter As Double
) As Curve
public:
static Curve^ CreateCurve(
XYZ^ center,
double xRadius,
double yRadius,
XYZ^ xAxis,
XYZ^ yAxis,
double startParameter,
double endParameter
)
static member CreateCurve :
center : XYZ *
xRadius : float *
yRadius : float *
xAxis : XYZ *
yAxis : XYZ *
startParameter : float *
endParameter : float -> Curve
Parameters
- center XYZ
-
The center.
- xRadius Double
-
The x vector radius of the ellipse.
- yRadius Double
-
The y vector radius of the ellipse.
- xAxis XYZ
-
The x axis to define the ellipse plane. Must be normalized.
- yAxis XYZ
-
The y axis to define the ellipse plane. Must be normalized.
- startParameter Double
-
The raw parameter value at the start of the ellipse.
- endParameter Double
-
The raw parameter value at the end of the ellipse.
Return Value
Curve
The new ellipse or elliptical arc.
ExceptionsException | Condition |
---|
ArgumentNullException |
A non-optional argument was NULL
|
ArgumentOutOfRangeException |
The given value for xRadius must be greater than 0 and no more than 30000 feet.
-or-
The given value for yRadius must be greater than 0 and no more than 30000 feet.
-or-
xAxis is not length 1.0.
-or-
yAxis is not length 1.0.
|
ArgumentsInconsistentException |
The vectors xAxis and yAxis are not perpendicular.
-or-
Start parameter must be less than end parameter.
-or-
Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance).
|
Remarks
If the angle range is equal to or greater than 2 * PI, the curve will be
automatically converted to an unbounded ellipse.
If xRadius and yRadius are almost equal, the curve will be
returned as an arc.
See Also