Struct DxfNurbsData
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
The NURBS data of a DxfSpline in one value, as AutoCAD's NurbsData: its degree, whether it is rational,
closed and periodic, its control points, knots and weights, and the tolerances of its points and knots.
public readonly struct DxfNurbsData
- Inherited Members
Remarks
It is what NurbsData gives and takes: a cubic of 4 control points from (0, 0, 0) to (30, 0, 0) has the knots 0, 0, 0, 0, 1, 1, 1, 1 and no weights. The lists are copied when the value is made and given out read-only, so a value once made does not change.
The value is not checked when it is made: a spline checks it when it is given one, as AutoCAD does.
Constructors
- DxfNurbsData(int, bool, bool, bool, IEnumerable<GeoPoint3>, IEnumerable<double>, IEnumerable<double>, double, double)
Initializes the NURBS data of a spline, as AutoCAD's
new NurbsData(degree, rational, closed, periodic, controlPoints, knots, weights, controlPointTolerance, knotTolerance).
Properties
- Closed
Gets whether the spline is closed, as AutoCAD's
Closed.
- ControlPointTolerance
Gets the tolerance of the control points, as AutoCAD's
ControlPointTolerance.
- Degree
Gets the degree, as AutoCAD's
Degree.
- KnotTolerance
Gets the tolerance of the knots, as AutoCAD's
KnotTolerance.
- Periodic
Gets whether the spline is periodic, as AutoCAD's
Periodic: of a SPLINE, the flag 2 of its group 70, the periodic of the DXF reference, which AutoCAD writes on its closed splines of a smooth seam too; IsPeriodic is AutoCAD's reading, the flag 2048.
- Rational
Gets whether the weights count, as AutoCAD's
Rational.
Methods
- GetControlPoints()
Gets the control points, in the world, as AutoCAD's
GetControlPoints.
- GetKnots()
Gets the knots, as AutoCAD's
GetKnots.
- GetWeights()
Gets the weights, as AutoCAD's
GetWeights: none for a spline that is not rational.
- IsEqualTo(DxfNurbsData)
Gets whether this data is the same as another's within Default, as AutoCAD's
IsEqualTo: the same degree and flags, the same counts, and points, knots and weights each within the point tolerance.
- IsEqualTo(DxfNurbsData, Tolerance)
Gets whether this data is the same as another's within a tolerance, as AutoCAD's
IsEqualTo.
- ToString()
Gives the data as a line for debugging: its degree and counts.