[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 152)] [Serializable] public struct Arc : IEquatable<Arc>, IEpsilonComparable<Arc>, ICloneable
Represents the value of a plane, two angles and a radius in a sub-curve of a three-dimensional circle.

The curve is parameterized by an angle expressed in radians. For an IsValid arc the total subtended angle AngleRadians() = Domain()(1) - Domain()(0) must satisfy 0 < AngleRadians() < 2*Pi

The parameterization of the Arc is inherited from the Circle it is derived from. In particular

t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis

where xaxis and yaxis, (part of Circle.Plane) form an orthonormal frame of the plane containing the circle.

Constructors

Arc

#Since v5.0
public Arc(Circle circle, double angleRadians)
Initializes a new instance of an arc from a base circle and an angle.
circle (Circle)Circle to base arc upon.
angleRadians (double)Sweep angle of arc (in radians)

Arc

#Since v5.0
public Arc(Circle circle, Interval angleIntervalRadians)
Initializes a new instance of an arc from a base circle and an interval of angles.
circle (Circle)Circle to base arc upon.
angleIntervalRadians (Interval)Increasing angle interval in radians with angleIntervalRadians.Length() <= 2.0*Math.PI.

Arc

#Since v5.0
public Arc(Plane plane, double radius, double angleRadians)
Initializes a new arc from a base plane, a radius value and an angle.
plane (Plane)The plane of the arc (arc center will be located at plane origin)
radius (double)Radius of arc.
angleRadians (double)Sweep angle of arc (in radians)

Arc

#Since v5.0
public Arc(Plane plane, Point3d center, double radius, double angleRadians)
Initializes a new aligned arc at the given center point, with a custom radius and angle.
plane (Plane)Alignment plane for arc. The arc will be parallel to this plane.
center (Point3d)Center point for arc.
radius (double)Radius of arc.
angleRadians (double)Sweep angle of arc (in radians)

Arc

#Since v5.0
public Arc(Point3d center, double radius, double angleRadians)
Initializes a new horizontal arc at the given center point, with a custom radius and angle.
center (Point3d)Center point of arc.
radius (double)Radius of arc.
angleRadians (double)Sweep angle of arc (in radians)

Arc

#Since v5.0
public Arc(Point3d pointA, Vector3d tangentA, Point3d pointB)
Initializes a new arc from end points and a tangent vector. If the tangent is parallel with the line segment between the two endpoints this will result in an Invalid arc.
pointA (Point3d)Start point of arc.
tangentA (Vector3d)Tangent at start of arc.
pointB (Point3d)End point of arc.

Arc

#Since v5.0
public Arc(Point3d startPoint, Point3d pointOnInterior, Point3d endPoint)
Initializes a new arc through three points. If the points are coincident or co-linear, this will result in an Invalid arc.
startPoint (Point3d)Start point of arc.
pointOnInterior (Point3d)Point on arc interior.
endPoint (Point3d)End point of arc.

Properties

Angle

#Since v5.0
public double Angle { get; set; }
Gets or sets the sweep -or subtended- angle (in Radians) for this arc segment. Setting this property only alters the EndAngle property such that Angle = EndAngle - StartAngle.

AngleDegrees

#Since v5.0
public double AngleDegrees { get; set; }
Gets or sets the sweep -or subtended- angle (in Degrees) for this arc segment.

AngleDomain

#Since v5.0
public Interval AngleDomain { get; set; }
Gets or sets the angle domain (in Radians) of this arc.

Center

#Since v5.0
public Point3d Center { get; set; }
Gets or sets the center point for this arc.

Circumference

#Since v5.0
public double Circumference { get; }
Gets the circumference of the circle that is coincident with this arc.

Diameter

#Since v5.0
public double Diameter { get; set; }
Gets or sets the Diameter of this arc.

EndAngle

#Since v5.0
public double EndAngle { get; set; }
Gets or sets the end angle (in Radians) for this arc segment.

EndAngleDegrees

#Since v5.0
public double EndAngleDegrees { get; set; }
Gets or sets the end angle (in Degrees) for this arc segment.

EndPoint

#Since v5.0
public Point3d EndPoint { get; }
Gets the end point of the arc.

IsCircle

#Since v5.0
public bool IsCircle { get; }
Gets a value indicating whether or not this arc is a complete circle.

IsValid

#Since v5.0
public bool IsValid { get; }
Gets a value indicating whether or not this arc is valid. Detail: Radius>0 and 0<AngleRadians()<=2*Math.Pi.
true if the arc is valid.

Length

#Since v5.0
public double Length { get; }
Gets the length of the arc. (Length = Radius * (subtended angle in radians)).

MidPoint

#Since v5.0
public Point3d MidPoint { get; }
Gets the mid-point of the arc.

Plane

#Since v5.0
public Plane Plane { get; set; }
Gets or sets the plane in which this arc lies.

Radius

#Since v5.0
public double Radius { get; set; }
Gets or sets the radius of this arc.

StartAngle

#Since v5.0
public double StartAngle { get; set; }
Gets or sets the start angle (in Radians) for this arc segment.

StartAngleDegrees

#Since v5.0
public double StartAngleDegrees { get; set; }
Gets or sets the start angle (in Degrees) for this arc segment.

StartPoint

#Since v5.0
public Point3d StartPoint { get; }
Gets the start point of the arc.

Unset

#Since v5.0
public static Arc Unset { get; }
Gets an Arc with Unset components.

Methods

BoundingBox

#Since v5.0
[ConstOperation] public BoundingBox BoundingBox()
Computes the 3D axis aligned bounding box for this arc.
Bounding box of arc.

ClosestParameter

#Since v5.0
[ConstOperation] public double ClosestParameter(Point3d testPoint)
Gets parameter on the arc closest to a test point.
testPoint (Point3d)Point to get close to.
Parameter (in radians) of the point on the arc that is closest to the test point. If testPoint is the center of the arc, then the starting point of the arc is (arc.Domain()[0]) returned. If no parameter could be found, RhinoMath.UnsetValue is returned.

ClosestPoint

#Since v5.0
[ConstOperation] public Point3d ClosestPoint(Point3d testPoint)
Computes the point on an arc that is closest to a test point.
testPoint (Point3d)Point to get close to.
The point on the arc that is closest to testPoint. If testPoint is the center of the arc, then the starting point of the arc is returned. UnsetPoint on failure.

EpsilonEquals

#Since v5.4
[ConstOperation] public bool EpsilonEquals(Arc other, double epsilon)
Check that all values in other are within epsilon of the values in this
other (Arc)
epsilon (double)
EpsilonEquals

Equals

#Since v5.0
[ConstOperation] public bool Equals(Arc other)
Determines whether another arc has the same value as this arc.
other (Arc)An arc.
true if obj is equal to this arc; otherwise false.

Equals

#
[ConstOperation] public override bool Equals(object obj)
Determines whether another object is an arc and has the same value as this arc.
obj (object)An object.
true if obj is an arc and is exactly equal to this arc; otherwise false.
ValueType.Equals

GetHashCode

#
[ConstOperation] public override int GetHashCode()
Computes a hash code for the present arc.
A non-unique integer that represents this arc.

PointAt

#Since v5.0
[ConstOperation] public Point3d PointAt(double t)
Gets the point at the given arc parameter.
t (double)Arc parameter to evaluate.
The point at the given parameter.

Reverse

#Since v5.0
public void Reverse()
Reverses the orientation of the arc. Changes the domain from [a,b] to [-b,-a].
Explicit

ICloneable.Clone

#

TangentAt

#Since v5.0
[ConstOperation] public Vector3d TangentAt(double t)
Gets the tangent at the given parameter.
t (double)Parameter of tangent to evaluate.
The tangent at the arc at the given parameter.

ToNurbsCurve

#Since v5.0
[ConstOperation] public NurbsCurve ToNurbsCurve()
Initializes a nurbs curve representation of this arc. This amounts to the same as calling NurbsCurve.CreateFromArc().
A nurbs curve representation of this arc or null if no such representation could be made.

ToNurbsCurve

#Since v6.0
[ConstOperation] public NurbsCurve ToNurbsCurve(int degree, int cvCount)
Create a uniform non-rational cubic NURBS approximation of an arc.
degree (int)>=1
cvCount (int)cv count >=5
NURBS curve approximation of an arc on success

Transform

#Since v5.0
public bool Transform(Transform xform)
Transforms the arc using a Transformation matrix.
xform (Transform)Transformations to apply. Note that arcs cannot handle non-euclidean transformations.
true on success, false on failure.

Trim

#Since v5.0
public bool Trim(Interval domain)
Sets the arc's angle domain (in radians) to the specified interval, provided it is increasing and its length does not exceed 2.0 * Math.PI (plus a small tolerance). If the interval length exceeds 2.0 * Math.PI it will be clamped to exactly 2.0 * Math.PI. Returns true if the domain was set successfully, false otherwise.
domain (Interval)The desired angle domain in radians. Must satisfy domain[0] < domain[1] and domain[1] - domain[0] <= 2.0 * Math.PI + tolerance.
True if the domain was set successfully; false if the interval is not increasing or exceeds the allowed length.

Operators

OperationResultDescription
Arc==ArcboolDetermines whether two arcs have equal values.
Arc!=ArcboolDetermines whether two arcs have different values.