Method FromArc
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
FromArc(GeoArc2)
Builds the spline that is exactly an arc: rational quadratic pieces of a quarter turn at most, each the arc of its angle of a circle, to rounding.
public static GeoSpline2 FromArc(GeoArc2 arc)
Parameters
arcGeoArc2The arc.
Returns
- GeoSpline2
The spline, of degree 2 and rational, running the way the arc runs, over [0, 1] with each piece taking an equal share.
Remarks
A quarter circle of radius 100 about the origin is one piece: the control points (100, 0), (100, 100), (0, 100) with the weights 1, 0.7071, 1. A half circle is two pieces, a whole one four, and a sweep of 100 degrees two of 50. The ends are the arc's own: the spline starts at StartPoint and ends at its end point, but that an arc of a whole turn, and so the circle, ends on its start exactly, its first control point repeated.
Exceptions
- ArgumentException
Thrown when the centre has a coordinate that is not a finite number.