Table of Contents

Class DxfSpline

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

A SPLINE of a DXF file, as AutoCAD's Spline: a NURBS curve of its Degree, control points, knots and weights, in the world, or given by the points it passes through alone.

public sealed class DxfSpline : DxfCurve
Inheritance
DxfSpline
Inherited Members

Remarks

The control points are groups 10, 20 and 30, the knots 40 and the weights 41, each counted in groups 73, 72 and 41's count; the fit points 11, 21 and 31, counted in 74. The parameter is AutoCAD's, the knot value: a cubic of five control points with the knots 0, 0, 0, 0, 1, 2, 2, 2, 2 runs from StartParam 0 to EndParam 2, and a closed periodic spline from its knot of index degree to that of index count of its points. A spline given by its fit points alone is walked on the spline DxfReader passes through them, whose parameters are its own.

A file of R12 has no SPLINE: AppendEntity(DxfEntity) refuses one there.

Constructors

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.

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.

Properties

Closed

Gets whether the spline is closed (flag 1 of group 70), as AutoCAD's Closed.

ControlPoints

Gets or sets the control points (groups 10, 20, 30), in the world, a new list on each call; their count (73) with them. A spline of fit points AutoCAD reads as the cubic through them (NurbsData) gives that cubic's, as AutoCAD 2021 gave the cubic's 7 for a record of five fit points whose control point 1 was moved (its D32 c2) or that had none (c1); its Knots, Weights (none) and Degree (3) go with them.

Degree

Gets or sets the degree (group 71), as AutoCAD's Degree; 3 where the record gives none, and 3, the degree of the cubic AutoCAD fits, for a spline of fit points it reads as that cubic (NurbsData): AutoCAD 2021 gave 3 for a record of fit points alone of 71 2 or 5 (its D32 c3-deg2 and c3-deg5).

EndFitTangent

Gets the direction the spline ends in at its last fit point (groups 13, 23, 33), as AutoCAD's EndFitTangent; of no length where the record gives none, and as StartFitTangent the derivative at the end of a spline whose fit points are those at its knots.

EndParam

Gets the parameter at the end: the knot of index count of the control points, as AutoCAD's.

FitData

Gets or sets the fit data in one value, as AutoCAD's FitData: the fit points, the degree, the fit tolerance (group 44), the tangents at the ends (12 and 13) and whether they are given, and the parameters the flags of group 70 say, as AutoCAD 2021 read them (its D32b run): by the square root of the chord for 64 (its 1096), one step each for 128 (1160), its own for 256 (1288, a knot put in), else by the chord. A spline not periodic whose fit points are the points at its knots gives its derivatives at its ends as its tangents (StartFitTangent).

FitPoints

Gets the fit points (groups 11, 21, 31), in the world, a new list on each call; where the record holds none and the flag 1024 of its group 70 is set, the points of the curve at each of its knots from its start to its end, as AutoCAD 2021 gives them: (0, 0), (30, 0), (30, 15), (20, 15) and (0, 0) again for its periodic cubic of the knots 0, 30, 45, 55 and 80, saved with 70 3115 and no fit points.

FitTolerance

Gets or sets the tolerance the spline is fitted to its fit points within (group 44), as AutoCAD's FitTolerance; nought where the record gives none.

HasFitData

Gets whether the spline has fit points, as AutoCAD's HasFitData: NumFitPoints above nought.

IsNull

Gets whether the spline has neither control points nor fit points, as AutoCAD's IsNull.

IsPeriodic

Gets whether the spline is periodic, as AutoCAD's IsPeriodic: the flag 2048 of group 70, on a curve that runs on round its seam as one periodic curve. AutoCAD 2021 writes the flag 2 on its closed splines of a smooth seam too and reads no period from it: its periodic cubic of 70 3115 is periodic, its closed cubic of 70 11 is not, and either is the other with the flag 2048 alone taken out or put in (its 17-h). Its 2059 with the control point 1 moved down by 5, or the point 5 up by 5, a corner at the seam, is not periodic (17-n, 17-o).

IsPlanar

Gets whether the record says the spline lies in a plane (flag 8 of group 70), as AutoCAD's IsPlanar.

IsRational

Gets whether the spline has weights (flag 4 of group 70), as AutoCAD's IsRational; false for a spline of fit points AutoCAD reads as the cubic through them (NurbsData), as it read the library's cubic through five points given a weight of 2 (its D32 B0-setweight).

Knots

Gets or sets the knots (groups 40), a new list on each call; their count (72) with them.

NumControlPoints

Gets how many control points the spline has, as AutoCAD's NumControlPoints: its groups 10, or those of the cubic AutoCAD reads a spline of fit points as (NurbsData), 7 for five fit points alone (its D32 c1-fitonly).

NumFitPoints

Gets how many fit points the spline has, as AutoCAD's NumFitPoints: its groups 11, or where it has none and the flag 1024 of its group 70 is set, the points of the curve at its knots (FitPoints), as AutoCAD 2021 reads them: 5 on its periodic cubic through (0, 0), (30, 0), (30, 15) and (20, 15), saved with 70 3115 and 74 0.

NurbsData

Gets or sets the NURBS data in one value, as AutoCAD's NurbsData: degree, flags, control points, knots, weights and the tolerances of the points (group 43) and knots (42). A spline given by its fit points alone gives the data of the spline DxfReader passes through them, the cubic AutoCAD fits; so does one whose fit points are not its control points, as AutoCAD reads it, the record's control points another curve.

Spline

Gets a spline of this one's NURBS data, as AutoCAD's Spline gives one for a spline: a new DxfSpline in no file, on layer 0 with no look of its own; the fit data are not carried.

StartFitTangent

Gets the direction the spline starts in at its first fit point (groups 12, 22, 32), as AutoCAD's StartFitTangent; of no length where the record gives none. A spline not periodic whose fit points are those at its knots (the flag 1024 and no groups 11) gives its derivative at its start, as AutoCAD 2021 read its own of SqrtChord parameters through five points, (7.01, -1.77, 0), and its cubic given a knot (70 1288), (1.11, -0.34, 0) (its D32b run).

StartParam

Gets the parameter at the start: the knot of index degree, as AutoCAD's.

Type

Gets how the spline is given, as AutoCAD's Type: by its fit points where it has some, else by its control points.

Weights

Gets or sets the weights (groups 41), a new list on each call: empty for a spline that is not rational, as the file has none.

Methods

ElevateDegree(int)

Raises the degree of the spline, as AutoCAD's ElevateDegree: the curve kept exactly, a knot standing as many times more as the degree is raised, so that the spline is as smooth everywhere as it was; its fit data taken out, as it is given by its control points from then on. A cubic of 4 points raised to 4 has 5 points, the knots 0, 0, 0, 0, 0, 1, 1, 1, 1, 1. Raised to 25, the most (AutoCAD's order of 26), it has 26 points and is the same curve: the cubic from (0, 0) by (10, 20) and (30, 20) to (40, 0), raised to 12, has the 13 points that AutoCAD 2021 gave, the second (2.5, 5) and the third (5.4545, 9.0909), as it has at 11, 15 and 25. The spline's own measures (GetPointAtParameter(double), GetDistanceAtParameter(double)) work at any of these degrees, and so does ToGeoSpline3(), whose spline of degree 25 has the length and the points of the cubic it was raised from.

Extend(bool, GeoPoint3)

Runs the spline on past one of its ends to a point on its run carried on, as AutoCAD's Extend: as Extend(double) to the parameter of the point there, found by Newton's steps along the polynomial of the end span.

Extend(double)

Runs the spline on past one of its ends to a parameter, as AutoCAD's Extend: the polynomial of its end span carried on, so that the spline keeps its curve and runs on as smoothly as it ran; below StartParam it starts earlier, above EndParam it ends later. The fit data are taken out.

GetClosestPointTo(GeoPoint3, bool)

Gets the point of the spline nearest a point, as AutoCAD's GetClosestPointTo: of the least parameter where two are as near.

GetControlPointAt(int)

Gets a control point, as AutoCAD's GetControlPointAt: one of ControlPoints.

GetDistAtPoint(GeoPoint3)

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

GetDistanceAtParameter(double)

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

GetFirstDerivative(double)

Gets the derivative of the point by the knot parameter, as AutoCAD's GetFirstDerivative.

GetFitPointAt(int)

Gets a fit point, as AutoCAD's GetFitPointAt: one of FitPoints.

GetOffsetCurves(double)

Gets the spline at a distance from this one in its plane, as AutoCAD's GetOffsetCurves: to the right of its direction seen from the tip of its normal where the distance is above nought, outwards for a spline running counter-clockwise, as GetOffsetCurvesGivenPlaneNormal(GeoVector3, double) offsets it about that normal. The normal is the spline's own (210) where it lies square to it, else that of the plane it lies in.

GetOffsetCurvesGivenPlaneNormal(GeoVector3, double)

Gets the spline at a distance from this one in the plane of a normal, as AutoCAD's GetOffsetCurvesGivenPlaneNormal: each point moved square to the spline's direction there within the plane, to the right of that direction seen from the tip of the normal where the distance is above nought, and a cubic fitted to the points so moved. The spline is cut at its corners, knots standing as many times as its degree where its direction turns (the knots of a circle's spline, where it runs on smoothly, are none), and each smooth piece fitted on its own: through points of the true offset, four to a span of the knots at first and twice as many in a span, up to 512, until the fit keeps within the point tolerance (1E-3) of the true offset both ways halfway between each two points, leaving and reaching the piece's ends in the spline's own directions there. The pieces are joined as a polyline's offsets are: run on along their ends to where those meet past a corner they part at, cut back to where they cross at one they overlap at, so that the L of degree 2 from (0, 0) to (10, 0) to (10, 10) offset by 1 has its corner at (11, -1). A spline with no corner gives a cubic over its own domain; one with corners, a cubic over the length along it from the spline's start. A span that does not keep within the tolerance at 512 points is given as fitted, and where the spline bends tighter than the distance the offset folds back on itself and is given as it folds.

GetParameterAtDistance(double)

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

GetParameterAtPoint(GeoPoint3)

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

GetPointAtDist(double)

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

GetPointAtParameter(double)

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

GetSecondDerivative(double)

Gets the second derivative of the point by the knot parameter, as AutoCAD's GetSecondDerivative.

GetSplitCurves(IReadOnlyList<double>)

Gets the pieces the spline is cut into at parameters, as AutoCAD's GetSplitCurves: splines of the same look in no file, each the part of the spline between two cuts exactly, its knots those of the spline there with the cut standing as many times as the degree and one at its ends; an open spline from its start to the first parameter, on to the next and to its end, a closed one from each to the next and from the last on round its start to the first, given whole where it is cut at fewer than two places. A parameter at an end or within the point tolerance along the spline of another cuts nothing. A spline of fit data gives pieces whose fit points are their points at their knots, of parameters of their own (70 1288), as AutoCAD 2021 gave its cubic through five points cut at 43.36 two pieces of 3 and 4 such fit points, the first leaving along the spline's derivative (1.11, -0.34, 0) (its D32b run).

InsertControlPointAt(double, GeoPoint3, double)

Puts a control point in, as AutoCAD's InsertControlPointAt: the knot added to the knots, and the point with its weight put in among the control points where that knot works most, the middle of the points the span of the knot moves (for a cubic the second of the three, so that a cubic of 4 points from (0, 0) to (30, 0) given (15, 10) at 0.5 has it as its third point of 5). The curve changes with the point, as AutoCAD's; the fit data are taken out.

InsertFitPointAt(int, GeoPoint3)

Puts a fit point in, as AutoCAD's InsertFitPointAt: before the point of the index, or after the last where the index is their count, and the spline fitted through the points anew, as FitData fits it.

InsertKnot(double)

Inserts a knot, as AutoCAD's InsertKnot, by Boehm's rule: one control point more, the curve the same. A spline with weights has them carried too. A spline of fit points has them taken out and its fit points read at its knots from then on (the flag 1024), as AutoCAD 2021 saved its cubic through five points given the knot 72.27: 70 1288, 8 control points and the 6 points at its knots as fit points, where the 5 fit points left in it would fit anew of 7.

ModifyPositionAndTangent(double, GeoPoint3, GeoVector3)

Moves the control points so that the spline passes a point at a parameter in a direction there, as AutoCAD's ModifyPositionAndTangent: the points the span of the parameter is made of each moved the least that does it (the change of least squares that meets the point and the derivative), the weights kept. A spline of fit data keeps its points at its knots as fit points, of parameters of its own, as AutoCAD 2021 saved its cubic through five points so moved 70 1288 and its closed one 1289 (its D32b run).

PurgeFitData()

Takes the fit data out, as AutoCAD's PurgeFitData: the fit points, their count, and the tangents at the ends; the spline is given by its control points from then on, the flag 1024 of its group 70, by which AutoCAD gives the points at its knots as fit points, and the flag 32 taken off too, as AutoCAD 2021 saved its cubic through five points of 70 1064 purged 70 8. A spline AutoCAD reads as the cubic through its fit points (NurbsData) keeps that cubic's control points; one with no control points keeps its fit points.

Rebuild(int, int)

Gives the spline another degree and count of control points that run as near the curve as they can, as AutoCAD's Rebuild: the spline of least squares through points of the curve taken at even steps of its parameter (ten for each control point and at least 200), each fitted at its own parameter, so that the ends are where they were and the domain the same; not rational, its fit data taken out. A cubic 13 long of 5 points with an inner knot at 0.49, rebuilt as a cubic of 20 points, keeps within 0.003 of the old curve. The least squares are solved over the band of their equations, a point of the curve lying under degree + 1 control points: a spline of 1 000 spans is rebuilt of 5 000 points in 0.05 s.

RemoveControlPointAt(int)

Takes a control point out, as AutoCAD's RemoveControlPointAt: the point and its weight, and the knot inside the spline its putting in would have added, that of the span the point works most in, so that the spline stays one; the curve changes, and the fit data are taken out.

RemoveFitPointAt(int)

Takes a fit point out, as AutoCAD's RemoveFitPointAt, and fits the spline through the others anew.

ReverseCurve()

Turns the spline to run from its end to its start, as AutoCAD's ReverseCurve: its control points, weights and fit points in the other order, each knot u made a + b - u of the first and last and their order turned, the tangents at the ends swapped and turned.

SetControlPointAt(int, GeoPoint3)

Moves a control point, as AutoCAD's SetControlPointAt: its groups written anew, the others kept. A spline of fit data has them taken out with it (PurgeFitData()), as AutoCAD 2021 saved its cubic through five points of 70 1064 with its control point 2 moved 70 8 and no fit points, its 1067 11 and its 3115 2059: it fits a spline of fit points anew through them when it reads one, which would put the point back. A point set where it is, to the bit, changes nothing.

SetFitPointAt(int, GeoPoint3)

Moves a fit point, as AutoCAD's SetFitPointAt, and fits the spline through the points anew; a point set where it is changes nothing.

SetFromGeCurve(object)

Gives the spline the degree, knots, control points and weights of a GeoSpline3, as AutoCAD's SetFromGeCurve: its fit data taken out. A GeoSpline2 is written as DxfWriter writes one, at z = 0, planar on the normal (0, 0, 1), flagged closed only where its ends are one point exactly, and comes back from ToGeoSpline2() to the bit.

SetNurbsData(int, bool, bool, bool, IEnumerable<GeoPoint3>, IEnumerable<double>, IEnumerable<double>)

Gives the spline its whole NURBS data at once, as setting AutoCAD's NurbsData does: degree, flags, control points, knots and weights, checked together and written in one go, its fit data (fit points and end tangents) taken out, as the spline is given by its control points from then on. A cubic of 4 points from (0, 0, 0) to (4, 0, 0) takes the knots 0, 0, 0, 0, 1, 1, 1, 1. A curve whose ends meet (within 1E-3) is written closed, the flag 1 of group 70, and where it runs on across its seam in the one direction (within 1E-12 of a radian, whatever its size), with the flag 2 as well, whatever closed and periodic say, as AutoCAD 2021 writes one: its closed cubic of 70 11 given its own data back not periodic, or not closed, was saved 70 11 and read closed (its 17-k), and with its seam turned by a hundred-millionth of a degree saved 70 9 (17-x); the flags 32 and 1024 of fit data go with the fit data, its periodic cubic of 70 3115 given its own data back being saved 70 2059.

SetWeightAt(int, double)

Sets the weight of a control point, as AutoCAD's SetWeightAt: a spline that was not rational is made so, every other point weighing 1.

ToGeoSpline2()

Gets the spline in the plane, as DxfReader reads it with PlanAs2D within the default tolerance: the cubic above is the GeoSpline2 of the control points (0, 0), (100, 150), (200, 150) and (300, 0). One with a control point at a height does not lie on the floor, and is refused.

ToGeoSpline2(Tolerance)

Gets the spline in the plane, as ToGeoSpline2() does, within a tolerance, which says which fit points are one.

ToGeoSpline3()

Gets the spline as the library's, as AutoCAD's GetGeCurve and the AutoCAD bridge's ToGeoSpline3 give it: the shape GetGeometry() gives, to the bit, of its degree, knots, weights and control points, one whose knots are not clamped clamped by knot insertion, and one of fit points alone the cubic AutoCAD 2021 fits through them. The cubic with the control points (0, 0, 0), (100, 150, 0), (200, 150, 0) and (300, 0, 0) is the GeoSpline3 of those points and the knots 0, 0, 0, 0, 1, 1, 1, 1.

ToPolyline()

Gets the polyline that runs along the spline, as AutoCAD's ToPolyline: as ToPolylineWithPrecision(int, bool, bool) of precision 10, of arcs, a DxfPolyline where the spline is flat.

ToPolyline(bool, bool)

Gets the polyline that runs along the spline, as AutoCAD's ToPolyline, as ToPolylineWithPrecision(int, bool, bool) of precision 10.

ToPolyline(int)

Gets the polyline of a count of vertices that runs along the spline, the library's own reading of AutoCAD's ToPolyline, as ToPolyline(int, bool, bool) says: of arcs, a DxfPolyline where the spline is flat.

ToPolyline(int, bool, bool)

Gets the polyline of a count of vertices that runs along the spline, the library's own reading of AutoCAD's ToPolyline: the vertices set evenly along the spline's length, a closed spline's last on its first, which the closed polyline joins back to; each segment a line, or the arc through its ends and the spline's point halfway between them. A quarter of a circle of radius 100 made a spline, given 3 vertices and arcs, is two arcs of radius 100 to within the rounding. AutoCAD 2021 keeps a different promise: it was seen to give the cubic of one span 33 vertices for every count from 2 to 50 and 65 for 99, the cubic of two spans 50 for every count from 3 to 99, and to refuse the smallest counts (2 for two spans, 2 and 3 for three); the count it is given is not the count it makes.

ToPolylineWithPrecision(int)

Gets the polyline that runs along the spline within a precision, as AutoCAD's ToPolylineWithPrecision, of arcs, a DxfPolyline where the spline is flat.

ToPolylineWithPrecision(int, bool, bool)

Gets the polyline that runs along the spline within a precision, as AutoCAD's ToPolylineWithPrecision. Of lines, as AutoCAD 2021 makes it: the spline's whole parameter range, from its start to its end, halved again and again until the spline's points halfway, a quarter and three quarters along each piece's parameter are no farther from the chord's points there than the larger of one over the spline's sharpest bend and a ten-thousandth of its length, over the square of one more than the precision, max(1 / M, L / 10 000) / (p + 1)^2, M the largest length of the spline's second derivative by its parameter; each piece a segment. AutoCAD's 156 counts at hand, of cubics, a quadratic, a quartic, quintics and rational cubics, at 0 to 99 (its plugin runs v4 to v7 and D32), are the rule's but 9, each within 3 of AutoCAD's, 7 of them of rational cubics: a quintic Bezier gives 86, 478 and 7 929 vertices at 0, 5 and 99 and the same 10 times its size, a hairpin cubic of 100 by 1 over the knots 0 to 1 129 at 0, where its length decides, and over 0 to 100 5, where its bend does, and an S of three spans whose middle lies on its chord 173. The rule gives AutoCAD's counts of vertices for the three cubics of its plugin runs v4 and v5 at every precision tried: the cubic of one span on (0, 0), (10, 10), (20, 10), (30, 0), whose bend is 60 everywhere, 33, 65, 129, 257 and 4 097 vertices at 0, 1, 3, 10 and 99; the cubic of two spans on (0, 40), (10, 50), (20, 50), (30, 40), (40, 30), 50 at 0, 513 at 10 and 4 750 at 99; the cubic of three spans on (0, 0), (10, 10), (20, 10), (30, 0), (40, -10), (50, 0), 78 at 0 and 7 562 at 99. The sharpest bend is read at the ends of each span of the knots and at seven points between, which for a cubic, whose second derivative runs straight along a span, is its largest; a piece is halved no more than 20 times over and no finer than the rounding of the spline's largest coordinate, and a straight spline is one segment. The rule gives AutoCAD's counts for a quadratic of three spans and a cubic of a double knot too (29, 342 and 2 732, and 76, 933 and 8 011 at 0, 10 and 99), a spline of degree 5 (96 at 0) and a rational one (130 at 0, 1 378 at 10 where AutoCAD gives 1 377). A closed spline has its last vertex on its first, the polyline closed; one closed, or of the flag 2 of its 70 (the periodic of the DXF reference, which AutoCAD writes on its closed splines of a smooth seam), that runs through fit points, or that AutoCAD keeps by its fit points, the flag 1024 of its 70 set (its 3115 of a periodic cubic, written with no fit points), has each of its knots, one after another, in the place of the vertex of the halving nearest it, the later of two as near, a knot taking the place another took before it, as AutoCAD 2021 gave them: the closed cubic through (0, 0), (40, 0), (50, 30) and (10, 25), its knots the lengths of the chords, is those four points and the first again at 0, and 48 vertices at 10, the range halved into 64ths and the knot 40 standing in the place of the 64th at 39.05; through (0, 0), (40, 0), (40.5, 0.5), (50, 30) and (10, 25) it is at 0 the vertices at 0, 40.71, 71.70, 112.01 and its end, the knot 40.71 in the place the knot 40 took. The same spline of no fit points and no flag 1024, its 70 of 3, is the halving alone, as AutoCAD 2021 gave it: (0, 0), (34.42, -3.51), (50.86, 28.40), (18.15, 30.49) and the first again at 0. AutoCAD's closed cubic not periodic through (0, 0), (30, 0), (30, 15) and (20, 15), a corner at its seam (70 1065), has its knots in place as well: at 0 (0, 0), (22.66, -5.01), (30, 15), (20, 15) and the first again, the knots 45 and 55 for the quarters 40 and 60 (its D32 run, where 35 of the 36 polylines of six such cubics at 0 to 10 are the library's). Each arc is bent as the piece the halving made, its first, from (0, 0) to (40, 0) at 0, by the turn of the tangent over the first quarter of the range. Of arcs, for a flat spline, the same vertices, each segment the arc that turns as the spline's tangent turns along it, its bulge the tangent of a quarter of that turn, as AutoCAD 2021 makes them: the cubic of one span at 0 gives 33 vertices, its first arc, from (0, 0) to (0.9375, 0.908), of bulge -0.00806, the spline's tangent turning from 45 degrees to 43.15 along it. A spline not periodic of n control points is cut instead into (n - 3) + (n - 2) k pieces even in its parameter, k half the precision rounded down, where that is more pieces than the halving gives, as AutoCAD 2021 cut them where and as the rule says in each of 448 polylines of sixteen closed cubics, of fit points and of control points, and 80 of eight open curves of few pieces (its D32b run): a closed one has no last vertex on its first, and of its knots only as many as its vertices less two are put in place, so that the closed cubic through (0, 0), (40, 0), (40.5, 0.5), (50, 30) and (10, 25) is at 0 its vertices at 0, 40.71, 55.57 (two fifths of the range), 71.70 and 111.15; the straight cubic of 4 points is 1 segment at 0 and 1, 3 at 2 and 3; the quintic Bezier over 0 to 50 is cut in thirds at 0.

UpdateFitData()

Brings the fit data up to the control points, as AutoCAD 2021's UpdateFitData does: it takes them out, the spline given by its control points from then on, as PurgeFitData(). AutoCAD held no fit data after it on its cubic through five points, nor on its cubic of 5 control points, and saved both 70 8 (its D32 run); fit points of the curve at its knots, which AutoCAD fits anew when it reads them, would not give the curve back.

WeightAt(int)

Gets the weight of a control point, as AutoCAD's WeightAt: 1 for every point of a spline that is not rational.