Projection.from_frame

classmethod Projection.from_frame(frame)

Construct a transformation from world XY to frame.

Parameters

frame (Frame) – A frame describing the targeted Cartesian coordinate system.

Returns

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