Skip to main content

utils.splitCurve()

The utils.splitCurve() function splits a curve defined by 4 points start, cp1, cp2, and end on the point split and returns an array holding both halves.

Signature

array utils.splitCurve(
Point start,
Point cp1,
Point cp2,
Point end,
Point check,
)

Example

A Utils.splitCurve() example

Notes

The returned object has this signature:

[
{
start: Point,
cp1: Point,
cp2: Point,
end: Point,
},
{
start: Point,
cp1: Point,
cp2: Point,
end: Point,
},
]