Constructor DxfSpline
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
DxfSpline()
Initializes a spline of degree 3 with no points, as AutoCAD's new Spline(), on layer 0 in no file; give it its
control points, knots and weights.
public DxfSpline()
DxfSpline(int, bool, bool, bool, IEnumerable<GeoPoint3>, IEnumerable<double>, IEnumerable<double>, double, double)
Initializes a spline of its control points, as AutoCAD's new Spline(degree, rational, closed, periodic,
controlPoints, knots, weights, controlPointTolerance, knotTolerance), on layer 0 in no file until it is added to one.
public DxfSpline(int degree, bool rational, bool closed, bool periodic, IEnumerable<GeoPoint3> controlPoints, IEnumerable<double> knots, IEnumerable<double> weights, double controlPointTolerance, double knotTolerance)
Parameters
degreeintThe degree, 1 or more.
rationalboolWhether the weights are written (flag 4 of group 70).
closedboolWhether it is closed (flag 1); a curve whose ends meet is closed whatever this says, as SetNurbsData(int, bool, bool, bool, IEnumerable<GeoPoint3>, IEnumerable<double>, IEnumerable<double>) writes it.
periodicboolWhether it is periodic as the DXF reference has it (flag 2), the Periodic of its data, which a curve closed round a smooth seam is whatever this says; AutoCAD reads a spline as periodic by the flag 2048 (IsPeriodic), which is not written.
controlPointsIEnumerable<GeoPoint3>The control points, in the world.
knotsIEnumerable<double>The knots, as many as the points and the degree and one.
weightsIEnumerable<double>The weights, one to each point where the spline is rational; empty or null otherwise.
controlPointTolerancedoubleThe tolerance of the control points (group 43).
knotTolerancedoubleThe tolerance of the knots (group 42).
Exceptions
- ArgumentNullException
Thrown when the points or the knots are null.
- ArgumentException
Thrown when a point is not finite, or the counts do not make a spline.
- ArgumentOutOfRangeException
Thrown when the degree is below 1, or a number is not finite.