offset_polyline
- compas.geometry.offset_polyline(polyline, distance, normal=[0.0, 0.0, 1.0], tol=1e-06)[source]
Offset a polyline by a distance.
- Parameters
polyline (list of point) – The XYZ coordinates of the vertices of a polyline.
distance (float or list of tuples of floats) – The offset distance as float. A single value determines a constant offset globally. Alternatively, pairs of local offset values per line segment can be used to create variable offsets. Distance > 0: offset to the “left”, distance < 0: offset to the “right”.
normal (vector) – The normal of the offset plane.
- Returns
offset polyline (list of point) – The XYZ coordinates of the resulting polyline.