Table of Contents

Class DxfXline

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

An XLINE of a DXF file, as AutoCAD's Xline: the line without ends through BasePoint along UnitDir, both ways, in world coordinates.

public sealed class DxfXline : DxfCurve
Inheritance
DxfXline
Inherited Members

Remarks

The xline through (0, 5, 0) along (0, 1, 0) is the y axis moved 5 along itself: it runs through (0, -100, 0) and (0, 100, 0) alike. Its parameter is the distance from its base point along its direction, below nought behind it, so StartParam and EndParam are infinite and it has no start or end point.

The file holds the base point (groups 10, 20, 30) and the direction (groups 11, 21, 31), as AutoCAD gives them; a direction set is written made of unit length, and every other group of the record is kept as it was. A file of R12 has no xlines: one made in code is added to a drawing of R13 or later.

Constructors

DxfXline()

Initializes an xline through the origin along the x axis, as AutoCAD's new Xline(), on layer 0 in no file; give it its base point and direction before it is drawn.

Properties

Area

Gets nought: an xline closes no area.

BasePoint

Gets or sets the point the xline is placed by (groups 10, 20, 30), in world coordinates, as AutoCAD's BasePoint; the origin where the record gives none.

Closed

Gets false: an xline is not closed.

EndParam

Gets the parameter at the end of the xline: infinite, as it runs without end.

EndPoint

Refuses: an xline runs without end both ways, and has no end point, as AutoCAD's has none.

SecondPoint

Gets or sets a second point of the xline, as AutoCAD's SecondPoint: the base point and the direction; set, the direction is made the way from the base point to it.

StartParam

Gets the parameter at the start of the xline: minus infinity, as it runs without end behind its base point.

StartPoint

Refuses: an xline runs without end both ways, and has no start point, as AutoCAD's has none.

UnitDir

Gets or sets the direction of the xline (groups 11, 21, 31), as AutoCAD's UnitDir: as the file holds it, of unit length in a file AutoCAD wrote; (0, 0, 1) where the record gives none.

Methods

Extend(bool, GeoPoint3)

Refuses, as AutoCAD does: an xline runs without end both ways and has no end to be extended.

Extend(double)

Refuses, as AutoCAD does: an xline runs without end both ways and has no end to be extended.

GetClosestPointTo(GeoPoint3, bool)

Gets the point of the xline nearest a point, as AutoCAD's GetClosestPointTo: the foot of the point on it.

GetDistAtPoint(GeoPoint3)

Gets the distance from the base point to a point of the xline, below nought behind it.

GetDistanceAtParameter(double)

Gets the distance from the base point at a parameter: the parameter itself, below nought behind the base point.

GetFirstDerivative(double)

Gets the derivative of the xline at a parameter, as AutoCAD's GetFirstDerivative: its direction made of unit length.

GetOffsetCurves(double)

Refuses: an xline has no plane of its own to be offset in; GetOffsetCurvesGivenPlaneNormal(GeoVector3, double) takes one.

GetOffsetCurvesGivenPlaneNormal(GeoVector3, double)

Gets the xline at a distance from this one in the plane of a normal, as AutoCAD's GetOffsetCurvesGivenPlaneNormal: to the left of its direction seen from the tip of the normal where the distance is above nought, as a DxfLine is offset, AutoCAD 2021's side for a line.

GetParameterAtDistance(double)

Gets the parameter at a distance from the base point: the distance itself.

GetParameterAtPoint(GeoPoint3)

Gets the parameter at a point of the xline, the distance from the base point along the direction, as AutoCAD's GetParameterAtPoint.

GetPointAtDist(double)

Gets the point at a distance from the base point, below nought behind it.

GetPointAtParameter(double)

Gets the point at a parameter, the distance from the base point along the direction, as AutoCAD's GetPointAtParameter.

GetSecondDerivative(double)

Gets the second derivative of the xline: nought, as an xline does not bend.

GetSplitCurves(IReadOnlyList<double>)

Gets the pieces the xline is cut into at parameters, as AutoCAD's GetSplitCurves: a ray from the first parameter running back, lines from each parameter to the next, and a ray from the last running on, all of the same look in no file; the parameters taken in increasing order, one within the point tolerance of another cutting nothing, and an xline cut nowhere given whole, as a copy.

ReverseCurve()

Turns the xline to run the other way, as AutoCAD's ReverseCurve: its direction turned over, its base point kept.

SetFromGeCurve(object)

Gives the xline the origin and direction of a GeoXLine3, as AutoCAD's SetFromGeCurve, or of a GeoXLine2 at z = 0, each written as DxfWriter writes one.

ToGeoXLine2()

Gets the xline in the plane, as DxfReader reads it with PlanAs2D within the default tolerance: the xline through (0, 0, 0) along (3, 4, 0) is the GeoXLine2 through (0, 0) along (0.6, 0.8). One whose origin is at a height, or whose direction rises, does not lie on the floor, and is refused.

ToGeoXLine2(Tolerance)

Gets the xline in the plane, as ToGeoXLine2() does, within a tolerance, which says whether it has a direction.

ToGeoXLine3()

Gets the xline as the library's, as AutoCAD's GetGeCurve and the AutoCAD bridge's ToGeoXLine3 give it: the shape GetGeometry() gives, to the bit. The xline through (0, 0, 0) along (3, 4, 0) is the GeoXLine3 through there along (0.6, 0.8, 0).