Class DxfArc
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
An ARC of a DXF file, as AutoCAD's Arc: the part of the circle of Radius about
Center that runs counter-clockwise, seen from the tip of its Normal, from
StartAngle to EndAngle.
public sealed class DxfArc : DxfCurve
- Inheritance
-
DxfArc
- Inherited Members
Remarks
The angles are in radians, as AutoCAD's .NET API gives them, from the x axis of the system the normal makes by the arbitrary axis algorithm of the DXF reference, from nought up to 2 pi; the file holds them in degrees (groups 50 and 51), and an angle set is written in degrees from nought up to 360. The arc of radius 10 about (0, 0, 0) from 0 to pi / 2 runs from (10, 0, 0) to (0, 10, 0): TotalAngle pi / 2, Length 15.708. An end angle at or below the start runs on past 2 pi: from 3 pi / 2 to pi / 2 is half a turn through 0.
Its parameter is the angle, as AutoCAD's is: StartParam is the start angle and EndParam the end angle, 2 pi more where it is not above the start. The centre is in world coordinates and the file holds it in the system of the normal, as for a DxfCircle; every other group of the record is kept as it was.
Constructors
- DxfArc()
Initializes an arc of no radius at the origin on the normal (0, 0, 1), both angles nought, as AutoCAD's
new Arc(), on layer 0 in no file; give it its radius and angles before it is drawn.
- DxfArc(GeoPoint3, GeoVector3, double, double, double)
Initializes an arc about a centre in the plane square to a normal, as AutoCAD's
new Arc(center, normal, radius, startAngle, endAngle), on layer 0 with no look of its own, in no file until it is added to one.
- DxfArc(GeoPoint3, double, double, double)
Initializes an arc about a centre on the normal (0, 0, 1), as AutoCAD's
new Arc(center, radius, startAngle, endAngle), on layer 0 with no look of its own, in no file until it is added to one.
Properties
- Area
Gets the area between the arc and the chord from its start to its end, as AutoCAD's
Areacloses an open curve: a half of the square of the radius times the angle less its sine; 78.540 for the half of a circle of radius 10.
- Center
Gets or sets the centre of the arc, in world coordinates, as AutoCAD's
Center: the groups 10, 20 and 30 taken from the system of the Normal into the world; the origin where the record gives none.
- Closed
Gets false: an arc is not closed.
- EndAngle
Gets or sets the angle the arc ends at (group 51, in degrees), as AutoCAD's
EndAngle: in radians from the x axis of the normal's own system, from nought up to 2 pi; nought where the record gives none, which DXF reads as 360.
- EndParam
Gets the parameter at the end of the arc: its EndAngle, 2 pi more where that is not above the start.
- Length
Gets the length of the arc, its radius times its TotalAngle, as AutoCAD's
Length.
- Normal
Gets or sets the normal of the arc (groups 210, 220, 230), square to its plane, of unit length; (0, 0, 1) where the record gives none. Set, the centre keeps its place in the world, as AutoCAD keeps it, and the angles are kept in the system of the new normal.
- Radius
Gets or sets the radius of the arc (group 40), as AutoCAD's
Radius; 1 where the record gives none.
- StartAngle
Gets or sets the angle the arc starts at (group 50, in degrees), as AutoCAD's
StartAngle: in radians from the x axis of the normal's own system, from nought up to 2 pi; nought where the record gives none.
- StartParam
Gets the parameter at the start of the arc: its StartAngle, as AutoCAD's.
- Thickness
Gets or sets how far the arc stands up along its Normal (group 39), a curved wall of that height; nought where the record gives none.
- TotalAngle
Gets the angle the arc sweeps, as AutoCAD's
TotalAngle: the end angle less the start, 2 pi more where that is not above nought; from 3 pi / 2 to pi / 2 is pi.
Methods
- Extend(bool, GeoPoint3)
Extends the arc at one end round its circle to a point of the circle, as AutoCAD's
Extend.
- Extend(double)
Extends the arc round its circle to a parameter past one of its ends, as AutoCAD's
Extend: below StartParam moves its start back, above EndParam moves its end on.
- GetClosestPointTo(GeoPoint3, bool)
Gets the point of the arc nearest a point, as AutoCAD's
GetClosestPointTo: that of the point seen along the normal where it falls within the arc's angles, else the nearer end; on the whole circle where the arc is extended.
- GetDistAtPoint(GeoPoint3)
Gets the distance along the arc from its start to a point of it.
- GetDistanceAtParameter(double)
Gets the distance along the arc from its start to a parameter: the radius times the angle past the start.
- GetFirstDerivative(double)
Gets the derivative of the arc at a parameter, as AutoCAD's
GetFirstDerivative: the tangent, of the length of the radius, pointing the way the angle grows.
- GetOffsetCurves(double)
Gets the arc at a distance from this one, as AutoCAD's
GetOffsetCurves: about the same centre between the same angles, its radius the larger by the distance, so that a distance above nought offsets it outwards.
- GetOffsetCurvesGivenPlaneNormal(GeoVector3, double)
Gets the arc at a distance from this one in the plane of a normal, as AutoCAD's
GetOffsetCurvesGivenPlaneNormal: as GetOffsetCurves(double), the plane being the arc's own, its radius growing with a distance above nought whichever way the normal given points, as AutoCAD offsets an arc by its radius. An arc, a circle and an ellipse are the exceptions to the side every other curve offsets to, the right seen from the tip of the normal given: a DxfPolyline of one segment that is this arc goes the other way under the normal turned over.
- GetParameterAtDistance(double)
Gets the parameter at a distance along the arc from its start: the start angle and the distance over the radius.
- GetParameterAtPoint(GeoPoint3)
Gets the parameter at a point of the arc, its angle from the x axis of the normal's own system, as AutoCAD's
GetParameterAtPoint: from StartParam to EndParam.
- GetPointAtDist(double)
Gets the point at a distance along the arc from its start.
- GetPointAtParameter(double)
Gets the point at a parameter, an angle in radians from the x axis of the normal's own system, as AutoCAD's
GetPointAtParameter.
- GetSecondDerivative(double)
Gets the second derivative of the arc at a parameter: from the point to the centre, of the length of the radius.
- GetSplitCurves(IReadOnlyList<double>)
Gets the pieces the arc is cut into at parameters, as AutoCAD's
GetSplitCurves: arcs of the same look in no file, from the start to the first angle, on to the next, and to the end, the angles taken in increasing order, those at an end or within the point tolerance along the arc of another cutting nothing.
- ReverseCurve()
Turns the arc to run from its end to its start, as AutoCAD's
ReverseCurve: its normal turned over, its centre kept where it is in the world, and its angles those of its old end and start in the system of the new normal. The record is written once.
- SetFromGeCurve(object)
Gives the arc the centre, normal, radius and angles of a GeoArc3, as AutoCAD's
SetFromGeCurve, or of a GeoArc2 at z = 0 on the normal (0, 0, 1), each written as DxfWriter writes one: a clockwise GeoArc2 from its end to its start, so that it comes back counter-clockwise over the same points, and the angles through degrees.
- ToGeoArc2()
Gets the arc in the plane, as DxfReader reads it with PlanAs2D within the default tolerance: the arc of radius 10 about (0, 0, 0) from 0 to 90 degrees is the counter-clockwise GeoArc2 from (10, 0) to (0, 10); on the normal (0, 0, -1) it is the clockwise one from (-10, 0) to (0, 10), from pi to pi / 2, starting where the arc in space starts. One at a height, or on a tilted normal, does not lie on the floor, and is refused.
- ToGeoArc2(Tolerance)
Gets the arc in the plane, as ToGeoArc2() does, within a tolerance, which says whether it has a radius.
- ToGeoArc3()
Gets the arc as the library's, as AutoCAD's
GetGeCurveand the AutoCAD bridge'sToGeoArc3give it: the shape GetGeometry() gives, to the bit. The arc of radius 10 about (0, 0, 0) from 0 to 90 degrees is the GeoArc3 from (10, 0, 0) to (0, 10, 0) about the normal (0, 0, 1); on the normal (0, 0, -1), as AutoCAD writes a mirrored arc, it runs from (-10, 0, 0) to (0, 10, 0), clockwise seen from above.