Polyline.divide
- Polyline.divide(num_segments)[source]
Divide a polyline in equal segments.
- Parameters:
- num_segmentsint
- Returns:
- list
list[
compas.geometry.Point
]
Examples
>>> polyline = Polyline([(0, 0, 0), (1, 1, 0), (2, 3, 0), (4, 4, 0), (5, 2, 0)]) >>> divided_polylines = polyline.divide(3) >>> divided_polyline [Point(0.000, 0.000, 0.000), Point(1.578, 2.157, 0.000), Point(3.578, 3.789, 0.000), Point(5.000, 2.000, 0.000)]