transform

open fun transform(transform: Transform2d): Shape2d


open fun transform(matrix: Matrix2d): Shape2d

Applies an arbitrary transformation. This is equivalent to OpenSCAD's 'multmatrix'. Beware that using negative scales can change the order of the points. Which will leave the shape mal-formed.

Consider using ensurePathDirections if you are unsure. e.g.

result = myShape.transform( myMatrix ).ensureWellFormed()

NOTE, there is a times operator which does the same thing, which may be more readable.