Curve.to_polygon

Curve.to_polygon(n=16)[source]

Convert the curve to a polygon.

Parameters:
nint, optional

The number of sides of the polygon. Default is 16.

Returns:
compas.geometry.Polygon
Raises:
ValueError

If the curve is not closed.