Arc.Create
Description:
Creates a new geometric arc object based on center, radius, unit vectors, and angles.
Creates a new geometric arc object based on center, radius, unit vectors, and angles.
Remarks:
If the angle range is equal to or greater than 2 * PI, the curve will be automatically converted to an unbounded circle.
If the angle range is equal to or greater than 2 * PI, the curve will be automatically converted to an unbounded circle.
Overloads (3):
-
centerThe center of the arc.
-
DoubleradiusThe radius of the arc.
-
DoublestartAngleThe start angle of the arc (in radians).
-
DoubleendAngleThe end angle of the arc (in radians).
-
xAxisThe x axis to define the arc plane. Must be normalized.
-
yAxisThe y axis to define the arc plane. Must be normalized.
Return Value
The new arc.
The new arc.
// Create a new arc defined by its center, radios, angles and 2 axes
double radius = 10;
double startAngle = 0; // In radian
double endAngle = Math.PI; // In radian
XYZ center = new XYZ(5, 0, 0);
XYZ xAxis = new XYZ(1, 0, 0); // The x axis to define the arc plane. Must be normalized
XYZ yAxis = new XYZ(0, 1, 0); // The y axis to define the arc plane. Must be normalized
Arc arc = Arc.Create(center, radius, startAngle, endAngle, xAxis, yAxis);
-
A non-optional argument was NULL
-
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.
-
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).