Table of Contents

Class DxfCurve

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

An entity that is a curve, as AutoCAD's Curve is: a line, an arc, a circle, an ellipse, a polyline, a spline, a ray or an xline; walked by its parameter and by the distance along it, as AutoCAD walks one.

public abstract class DxfCurve : DxfEntity
Inheritance
DxfCurve
Derived
Inherited Members

Remarks

The distances are measured on the library's shape for the entity, GetGeCurve(), from its start: a curve 100 long runs from distance 0 to 100. The parameter is AutoCAD's for the type: the distance itself on a line, the angle in radians on an arc or a circle, and so on, each class saying which; this class takes it to be the distance from StartParam where a class says nothing else.

A point is on the curve where it is within Default of it, as the shapes of a file are read; a parameter or a distance past either end by more than that is refused, as AutoCAD refuses one.

Properties

Area

Gets the area the curve closes, as AutoCAD's Area: that of a circle, a whole ellipse or a closed polyline; nought for an open curve unless the class says otherwise.

Closed

Gets whether the curve is closed, as AutoCAD's Closed: a circle, a whole ellipse, a closed polyline or spline; false for a line.

EndParam

Gets or sets the parameter at the end of the curve, as AutoCAD's EndParam: its length past StartParam unless the class says otherwise; set where the class can move it, as an ellipse's.

EndPoint

Gets or sets the point where the curve ends, as AutoCAD's EndPoint; set where the class can move it.

IsPeriodic

Gets whether the curve runs round on itself, as AutoCAD's IsPeriodic: false unless the class says otherwise.

Spline

Gets the spline that is exactly the curve, as AutoCAD's Spline: a new DxfSpline in no file, on layer 0 with no look of its own (give it the curve's with SetPropertiesFrom(DxfEntity)), its knots the curve's parameters at the ends of its pieces. A line is a spline of degree 1 from nought to its length; an arc, a circle and an ellipse the rational quadratic of a piece for each quarter turn or less, over their angles or parameters (a circle of radius 10 is 9 control points over 0 to 2 pi, at a quarter turn on the circle's point there, between such knots on the circle but not at the same angle); a polyline of the plane the same of its arcs and its lines, each segment over one step of its parameter, or of degree 1 where it has no arc, but one fitted with a spline the B-spline it is fitted with, as AutoCAD 2021 gives it: on its frame (the vertices of flag 16) as control points, of degree 2 or 3 as its type says, its knots one step apart, clamped where it is open and periodic where it is closed, which runs through the vertices drawn but not along the lines between them; a 3D polyline of degree 1 over its parameter; a spline its own data.

StartParam

Gets or sets the parameter at the start of the curve, as AutoCAD's StartParam: nought unless the class says otherwise; set where the class can move it, as an ellipse's.

StartPoint

Gets or sets the point where the curve starts, as AutoCAD's StartPoint; set where the class can move it.

Methods

CreateFromGeCurve(object)

Makes the curve of a shape of the library, as AutoCAD's CreateFromGeCurve: a DxfLine of a GeoLine3, in no file, on layer 0 with no look of its own.

Extend(bool, GeoPoint3)

Extends the curve at one end to a point, as AutoCAD's Extend.

Extend(double)

Extends the curve to a parameter past one of its ends, as AutoCAD's Extend.

GetClosestPointTo(GeoPoint3, bool)

Gets the point of the curve nearest a point, as AutoCAD's GetClosestPointTo.

GetDistAtPoint(GeoPoint3)

Gets the distance along the curve from its start to a point of it, as AutoCAD's GetDistAtPoint.

GetDistanceAtParameter(double)

Gets the distance along the curve from its start to a parameter, as AutoCAD's GetDistanceAtParameter.

GetFirstDerivative(GeoPoint3)

Gets the derivative of the curve at a point of it, as AutoCAD's GetFirstDerivative at a point.

GetFirstDerivative(double)

Gets the derivative of the curve at a parameter, as AutoCAD's GetFirstDerivative: how the point moves as the parameter grows.

GetGeCurve()

Gets the library's shape for the curve, as AutoCAD's GetGeCurve gives its geometry's: the one shape of GetGeometry(), a GeoLine3 for a line; null where the reader reads none, as for a line of no length. Each class also gives its shape typed, with no cast, by the names of the AutoCAD bridge: ToGeoLine3(), and ToGeoLine2() for the shape of the plane.

GetOffsetCurves(double)

Gets the curves at a distance from this one, as AutoCAD's GetOffsetCurves: new entities of the same look, in no file, to be added to one.

GetOffsetCurvesGivenPlaneNormal(GeoVector3, double)

Gets the curves at a distance from this one within the plane of a normal, as AutoCAD's GetOffsetCurvesGivenPlaneNormal.

GetOrthoProjectedCurve(GeoPlane3)

Gets the curve projected square onto a plane, as AutoCAD's GetOrthoProjectedCurve: as GetProjectedCurve(GeoPlane3, GeoVector3) along the plane's normal.

GetParameterAtDistance(double)

Gets the parameter at a distance along the curve from its start, as AutoCAD's GetParameterAtDistance.

GetParameterAtPoint(GeoPoint3)

Gets the parameter at a point of the curve, as AutoCAD's GetParameterAtPoint.

GetPointAtDist(double)

Gets the point at a distance along the curve from its start, as AutoCAD's GetPointAtDist.

GetPointAtParameter(double)

Gets the point at a parameter, as AutoCAD's GetPointAtParameter.

GetProjectedCurve(GeoPlane3, GeoVector3)

Gets the curve projected onto a plane along a direction, as AutoCAD's GetProjectedCurve: a new curve of the same look in no file, each point of it moved along the direction until it meets the plane. A line, ray, xline, 3D polyline and spline stay of their kind, their points projected (a spline's fit data taken out, as the projected control points are its curve exactly); an arc, circle or ellipse in a plane parallel to the plane stays of its kind, moved, and otherwise becomes the part of the ellipse it projects to (a circle of radius 10 on the floor projected along (0, 0, 1) onto the plane y + z = 0 is an ellipse of radii 14.14 and 10); a polyline of the plane stays one where its plane is parallel or it has no arc, its vertices taken into the new plane, and otherwise becomes the DxfSpline of its projected Spline, its arcs being parts of ellipses there. A curve that projects to a point, its length there within the point tolerance (a 3D polyline standing along the direction), is refused, and so is a conic seen edge on, or so nearly that its minor axis is within the point tolerance or 1E-6 of its major one, AutoCAD's least ratio of an ellipse's axes: it projects to a line.

GetSecondDerivative(GeoPoint3)

Gets the second derivative of the curve at a point of it, as AutoCAD's GetSecondDerivative at a point.

GetSecondDerivative(double)

Gets the second derivative of the curve at a parameter, as AutoCAD's GetSecondDerivative.

GetSplitCurves(IReadOnlyList<GeoPoint3>)

Gets the pieces the curve is cut into at points of it, as AutoCAD's GetSplitCurves: new entities in no file.

GetSplitCurves(IReadOnlyList<double>)

Gets the pieces the curve is cut into at parameters, as AutoCAD's GetSplitCurves: new entities in no file.

ReverseCurve()

Turns the curve to run the other way, from its end to its start, as AutoCAD's ReverseCurve.

SetFromGeCurve(object)

Gives the curve the geometry of a shape of the library, as AutoCAD's SetFromGeCurve: a line a GeoLine3.