toPolygon
The closed Polygon over the same walk.
A last vertex coinciding with the first at the SCALE quantum is dropped — the polygon's closing edge is implicit.
Throws
When fewer than 3 vertices remain — a 2-vertex polyline has no polygon form.