Method ElevateDegree
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
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.
public void ElevateDegree(int newDegree)
Parameters
newDegreeintThe degree, above the spline's, at most 25; the spline's own changes nothing.
Exceptions
- ArgumentOutOfRangeException
Thrown when the degree is below the spline's or above 25.
- InvalidOperationException
Thrown when the spline has no data that make a spline, or is erased.