transform

open fun transform(transform: Transform3d): Shape3d

Applies an arbitrary transformation, which does NOT have to be an affine transformation. OpenSCAD has no equivalent, and therefore the result is always a nasty polyhedron, (or a compound of lots of polyhedrons), which makes the resulting .scad file even more unreadable than usual!

Use sparingly?

Beware that only the points of the shape are adjusted. No new points are added, and the relationships between the points (the faces) remains the same. This can have unexpected consequences. For example, if we attempt to transform a cylinder, so that it is wider in the middle, but the same size at each end, this will fail, because there are no points in the middle, only straight lines connecting the ends.


Applies an arbitrary transformation. This is equivalent to OpenSCAD's 'multmatrix'. NOTE, there is a times operator which does the same thing, which may be more readable.