toPolygon

open fun toPolygon(): Polygon

Converts to a Polygon using this shapes paths data. Useful for debugging, and in some instances, the generated scad file will be smaller (but even more inscrutable).

Throws

Some shapes, such as Union2d do not have paths and therefore they cannot be converted.