Scale.from_frame
- classmethod Scale.from_frame(frame)[source]
Construct a transformation from world XY to frame.
- Parameters:
- frame
compas.geometry.Frame
A frame describing the targeted Cartesian coordinate system.
- frame
- Returns:
compas.geometry.Transformation
The transformation.
Notes
It is the same as from_frame_to_frame(Frame.worldXY(), frame).
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