Polyline.shortened

Polyline.shortened(length)[source]

Returns a copy of this polyline shortened by a given length.

Parameters:
length: float or tuple[float, float]

A single length value to shorten the polyline only at the end, or two length values to shorten at both ends.

Returns:
compas.geometry.Polyline