Table of Contents

Method SplineFit

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

SplineFit()

Fits the polyline with a spline, as AutoCAD's SplineFit: of the header's SPLINETYPE (5 quadratic, 6 cubic, cubic where the file gives none) and SPLINESEGS (8 where it gives none), as SplineFit(DxfPoly3dType, 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(DxfPoly3dType, int)

Fits the polyline with a spline, as AutoCAD's SplineFit: its vertices made the frame of a uniform B-spline in space (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, as many segments to each span of the spline as asked (their count is taken where it is below nought, a 3D polyline having no arcs); flag 4 of the polyline's group 70 and group 75, 5 or 6. A fitted polyline is straightened first.

public void SplineFit(DxfPoly3dType value, int segments)

Parameters

value DxfPoly3dType

The spline, QuadSplinePoly or CubicSplinePoly.

segments int

The segments to a span, not nought.

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.