Polyline.split

Polyline.split(num_segments)[source]

Split a polyline in equal segments.

Parameters:
num_segmentsint
Returns:
list

list[compas.geometry.Polyline]

Examples

>>> from compas.geometry import Polyline
>>> polyline = Polyline([(0, 0, 0), (1, 1, 0), (2, 3, 0), (4, 4, 0), (5, 2, 0)])
>>> polylines = polyline.split(3)
>>> len(polylines)
3