Frame.from_rotation

classmethod Frame.from_rotation(rotation, point=[0, 0, 0])[source]

Constructs a frame from a Rotation.

Parameters:
rotationcompas.geometry.Rotation

The rotation defines the orientation of the frame.

point[float, float, float] | compas.geometry.Point, optional

The origin of the frame.

Returns:
compas.geometry.Frame

The constructed frame.

Examples

>>> from compas.geometry import Rotation
>>> f1 = Frame([1, 1, 1], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15])
>>> R = Rotation.from_frame(f1)
>>> f2 = Frame.from_rotation(R, point=f1.point)
>>> f1 == f2
True