Spline.ToPolylineWithPrecision(int) Method

Description

Generates a polyline to approximate a spline.

C#

public Curve ToPolylineWithPrecision(
    int precision
);

Visual Basic

Public Function ToPolylineWithPrecision(
    precision As Integer
) As Curve

Parameters

Parameters Description
int precision Target precision

Returns

The resulting polyline

Remarks

The resulting curve could be an AcDbPolyline, an AcDb2dPolyline, or an AcDb3dPolyline. It depends on the system variable PLINETYPE and the spline itself. An AcDb3dPolyline will always have line segments. Otherwise, the resulting polyline has line segments when the system varible PLINECONVERTMODE is 0, and has arc segments when PLINECONVERTMODE is 1.

The target precision is expected to be between 0 to 99, but larger values are also acceptable. The default value used in AutoCAD is 10. If the precision is unnecessarily high, the resulting polyline could have too many vertices, thus significantly degrading display performance.

Links

Spline Class, Autodesk.AutoCAD.DatabaseServices Namespace