curve.toPoints([opt])

Return an array of points that approximate the curve at given precision.

The points obtained are 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 array of points. Use the curve.getSubdivisions() function to obtain an array of curve subdivisions.