Frame.from_transformation

classmethod Frame.from_transformation(transformation)[source]

Constructs a frame from a Transformation.

Parameters

transformation (compas.geometry.Transformation) – The transformation defines the orientation of the frame through the rotation and the origin through the translation.

Returns

compas.geometry.Frame – The constructed frame.

Examples

>>> from compas.geometry import Transformation
>>> f1 = Frame([1, 1, 1], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15])
>>> T = Transformation.from_frame(f1)
>>> f2 = Frame.from_transformation(T)
>>> f1 == f2
True