Table of Contents

Property FitData

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

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).

public DxfFitData FitData { get; set; }

Property Value

DxfFitData

Set, the fit points and the rest written, and the control points worked out anew through them, as AutoCAD keeps both: the cubic AutoCAD 2021 fits through them, whatever degree is asked, each point on it at its knot, its knots the lengths of the chords from the first point, at an end of a tangent its derivative that tangent at the length given (written as given), and at an end of none, or of one of no length, its curve bent no more. Through (0, 0, 0), (30, 40, 0) and (60, 0, 0) it is the cubic of the control points (0, 0), (10, 20), (30, 60), (50, 20) and (60, 0) from 0 to 100, as AutoCAD fitted it, and through five points, alone or given tangents of length 1 or 5, AutoCAD's control points to 1E-13 (its D32 run); two points give the straight cubic of 4 points a third apart. Points one after another within 1E-10 are taken as one, as AutoCAD took two points a trillionth apart, and kept two a millionth apart. It passes through every point: a fit tolerance above 1E-10, within which AutoCAD fits a curve that passes near the points (1.5 times the tolerance off at most in its D32 run), is written but not fitted to. A spline closed, or set periodic data, is closed through its first point again, its curve bent no more at the seam where no tangents are given, and stays closed, as AutoCAD 2021 kept its closed cubic of 70 1035 given fit data not periodic, saving it 70 1067 or, of no tangents, 70 1065 (its 17-l). The flags 32 and 1024 of fit data are set, and the flags 1 and 2 as SetNurbsData(int, bool, bool, bool, IEnumerable<GeoPoint3>, IEnumerable<double>, IEnumerable<double>) gives them. Periodic data give AutoCAD's periodic cubic through the points taken round, of whatever degree they ask, each point on the curve at its knot, the knots the lengths of the chords, clamped into 3 and the count of the points as control points, written with the flag 2048 and no fit points, tangents or fit tolerance, its fit points the points at its knots by the flag 1024: as AutoCAD wrote 70 3115 for its 1035 through (0, 0), (40, 1), (50, 30) and (10, 25), its control points the library's to 1E-14, and the same cubic through (0, 0), (40, 0), (50, 30) and (10, 25) asked a degree 2 (its 17-v). Three points give the cubic too, of 3 control points to a period (AutoCAD's through (0, 0), (30, 0) and (20, 15), its D32 ring3-periodic), two a line there and back. Where two of the points are one, within 1E-3, which make no periodic spline, the data give the closed spline above. Parameters by the square root of the chord or one step each (SqrtChord, Uniform) give the same cubic, its knots going up by those, written as AutoCAD 2021 writes it with no fit points, tangents or fit tolerance and the flag 64 or 128 in place of 32, its fit points the points at its knots by the flag 1024: through five points the knots 0, 1, 2, 3 and 4 and AutoCAD's control points to 3E-14, saved 70 1160 (its D32b run). Data equal to the data read changes nothing.

Exceptions

ArgumentException

Thrown when there are fewer than two points, a point or a tangent is not finite, or the points are all one.

ArgumentOutOfRangeException

Thrown when the degree is outside 1 to 10, or the tolerance below nought.

NotSupportedException

Thrown for parameters of the program's own (CustomParameterization), which the library does not fit by.

InvalidOperationException

Thrown when set on a spline that is erased.