Polyline.transform

Polyline.transform(T)[source]

Transform this polyline.

Parameters

T (compas.geometry.Transformation | list[list[float]]) – The transformation.

Examples

>>> from math import radians
>>> from compas.geometry import Rotation
>>> polyline = Polyline([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [1.0, 1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 0.0]])
>>> R = Rotation.from_axis_and_angle([0.0, 0.0, 1.0], radians(90))
>>> polyline.transform(R)