Method SplineFit
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
SplineFit()
Fits the polyline with a spline, as AutoCAD's SplineFit (PEDIT Spline): of the header's SPLINETYPE (5 quadratic,
6 cubic, cubic where the file gives none) and SPLINESEGS (8 where it gives none), as
SplineFit(DxfPoly2dType, int) fits it.
public void SplineFit()
Exceptions
- InvalidOperationException
Thrown when the polyline has fewer than two vertices, or three for a closed one, or is erased.
SplineFit(DxfPoly2dType, int)
Fits the polyline with a spline, as AutoCAD's SplineFit: its vertices made the frame of a uniform B-spline
(flag 16 of their group 70, each keeping its handle), clamped to the first and last vertex of an open polyline and
running round a closed one, and the vertices of the curve added after the first of them (flag 8), where AutoCAD
keeps them, a number of segments to each
span of the spline; flag 4 of the polyline's group 70 and group 75, 5 or 6. A negative number of segments gives as many,
each the arc through its ends and the spline's point between them, as AutoCAD's SPLINESEGS below nought fits arcs to
them. The widths run evenly from the first vertex's start width to the last's end width. A cubic on the frame (0, 0),
(10, 10), (20, 0) is of degree 2 on its three points, one span drawn through (0, 0) and (20, 0) with (10, 5) at its
middle, in 8 segments where SPLINESEGS is 8; on the frame (0, 0), (10, 10), (20, 0), (30, 10) it is a cubic of one
span too. A fitted polyline is straightened first.
public void SplineFit(DxfPoly2dType value, int segments)
Parameters
valueDxfPoly2dTypeThe spline, QuadSplinePoly or CubicSplinePoly.
segmentsintThe segments to a span, not nought; below nought for arcs.
Exceptions
- ArgumentOutOfRangeException
Thrown when the type is not a spline, or the segments are nought.
- InvalidOperationException
Thrown when the polyline has fewer than two vertices, or three for a closed one, or is erased.