[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
Initializes a new instance of an arc from a base circle and an angle.
public Arc(
circle,
Circle to base arc upon.
angleRadians
Sweep angle of arc (in radians)
)

Arc

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

Arc

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

Arc

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

Arc

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

Arc

#Since v5.0
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.
public Arc(
pointA,
Start point of arc.
tangentA,
Tangent at start of arc.
pointB
End point of arc.
)

Arc

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

Properties

Angle

#Since v5.0
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.
public double Angle { get; set; }

AngleDegrees

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

AngleDomain

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

Center

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

Circumference

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

Diameter

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

EndAngle

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

EndAngleDegrees

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

EndPoint

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

IsCircle

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

IsValid

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

Length

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

MidPoint

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

Plane

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

Radius

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

StartAngle

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

StartAngleDegrees

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

StartPoint

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

Unset

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

Methods

BoundingBox

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

ClosestParameter

#Since v5.0
Gets parameter on the arc closest to a test point.
[ConstOperation] public double ClosestParameter(
testPoint
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
Computes the point on an arc that is closest to a test point.
[ConstOperation] public Point3d ClosestPoint(
testPoint
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
Check that all values in other are within epsilon of the values in this
[ConstOperation] public bool EpsilonEquals(
other,
epsilon
)
EpsilonEquals

Equals

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

Equals

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

GetHashCode

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

PointAt

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

Reverse

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

ICloneable.Clone

#

TangentAt

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

ToNurbsCurve

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

ToNurbsCurve

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

Transform

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

Trim

#Since v5.0
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.
public bool Trim(
domain
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.