`curve.toPolyline([opt])`

Return a polyline that approximates the curve at given precision.

The polyline points are found as endpoints of curve subdivisions whose flattened length is up to the specified precision level away from actual curve length. Refer to `curve.length()`

documentation for more information about precision and curve flattening.

The default value for `opt.precision`

is 3; this corresponds to maximum observed error of 0.1% in flattened curve length.

Instead of `opt.precision`

, the `opt.subdivisions`

property may be specified, directly providing an array of pre-computed curve subdivisions from which to obtain the polyline. Use the `curve.getSubdivisions()`

function to obtain an array of curve subdivisions.