Transformation.from_frame
-
classmethod
Transformation.
from_frame
(frame) Computes a transformation from world XY to frame.
- Parameters
frame (
Frame
) – A frame describing the targeted Cartesian coordinate system.- Returns
Transformation – The
Transformation
object.
Examples
>>> from compas.geometry import Frame >>> 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
Notes
It is the same as from_frame_to_frame(Frame.worldXY(), frame).