split

fun split(shape: Shape, cutter: LineSegment): Pair<Shape, Shape>

Splits a Shape into two separate Shapes from given LineSegment.

LineSegment doesn't necessarily need to cover the full length of the Shape, as it will be extended on both ends to ensure it splits the whole Shape.

Return

A pair containing two partial Shapes.

fun split(from: ShapeContour, cutter: ShapeContour): List<ShapeContour>

Splits a ShapeContour with another ShapeContour.

If there is no intersection, the original contour is returned.

fun split(from: ShapeContour, cutters: List<ShapeContour>): List<ShapeContour>

Splits a ShapeContour with all other ShapeContour in a List.

fun ShapeContour.split(cutter: ShapeContour): List<ShapeContour>

Splits a ShapeContour with another ShapeContour.

fun ShapeContour.split(cutters: List<ShapeContour>): List<ShapeContour>

Splits a ShapeContour with a List of ShapeContours.