ArcCreate(XYZ, Double, Double, Double, XYZ, XYZ) Method |
Creates a new geometric arc object based on center, radius, unit vectors, and angles.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static Arc Create(
XYZ center,
double radius,
double startAngle,
double endAngle,
XYZ xAxis,
XYZ yAxis
)
Public Shared Function Create (
center As XYZ,
radius As Double,
startAngle As Double,
endAngle As Double,
xAxis As XYZ,
yAxis As XYZ
) As Arc
public:
static Arc^ Create(
XYZ^ center,
double radius,
double startAngle,
double endAngle,
XYZ^ xAxis,
XYZ^ yAxis
)
static member Create :
center : XYZ *
radius : float *
startAngle : float *
endAngle : float *
xAxis : XYZ *
yAxis : XYZ -> Arc
Parameters
- center XYZ
-
The center of the arc.
- radius Double
-
The radius of the arc.
- startAngle Double
-
The start angle of the arc (in radians).
- endAngle Double
-
The end angle of the arc (in radians).
- xAxis XYZ
-
The x axis to define the arc plane. Must be normalized.
- yAxis XYZ
-
The y axis to define the arc plane. Must be normalized.
Return Value
Arc
The new arc.
ExceptionsException | Condition |
---|
ArgumentNullException |
A non-optional argument was NULL
|
ArgumentOutOfRangeException |
xAxis is not length 1.0.
-or-
yAxis is not length 1.0.
-or-
The given value for radius must be between 0 and 30000 feet.
|
ArgumentsInconsistentException |
The vectors xAxis and yAxis are not perpendicular.
-or-
Start angle must be less than end angle.
-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 circle.
Example
double radius = 10;
double startAngle = 0;
double endAngle = Math.PI;
XYZ center = new XYZ(5, 0, 0);
XYZ xAxis = new XYZ(1, 0, 0);
XYZ yAxis = new XYZ(0, 1, 0);
Arc arc = Arc.Create(center, radius, startAngle, endAngle, xAxis, yAxis);
Dim radius As Double = 10
Dim startAngle As Double = 0
Dim endAngle As Double = Math.PI
Dim center As New XYZ(5, 0, 0)
Dim xAxis As New XYZ(1, 0, 0)
Dim yAxis As New XYZ(0, 1, 0)
Dim arc__1 As Arc = Arc.Create(center, radius, startAngle, endAngle, xAxis, yAxis)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also