py3dframe.FrameTransform.input_frame#

property FrameTransform.input_frame: Frame#

The input frame of the transformation.

Note

This attribute is settable.

The input_frame attribute is a Frame object.

Warning

dynamic attribute must be set to True to take into account the changes in the input frame.

See also

  • output_frame for the output frame of the transformation.

  • dynamic for the dynamic attribute of the transformation.

  • get_active_input_frame() to extract the active input frame of the transformation if dynamic is set to True.

Parameters:

input_frame (Optional[Frame]) – The input frame of the transformation. If None, the global canonical frame is used.

Returns:

The input frame of the transformation.

Return type:

Frame

Examples

Lets create a FrameTransform object with the global frame as input frame and a local frame as output frame.

from py3dframe import Frame, FrameTransform

frame_E = Frame.canonical() # Input frame - Global frame
frame_F = Frame.from_axes(origin=[1, 2, 3], x_axis=[1, 0, 0], y_axis=[0, 1, 0], z_axis=[0, 0, 1]) # Output frame - Local frame

transform = FrameTransform(input_frame=frame_E, output_frame=frame_F, dynamic=True, convention=0)

To extract the input frame of the transformation, use the input_frame property.

input_frame = transform.input_frame
print(input_frame)
# Output: Frame(origin=[[0.] [0.] [0.]], x_axis=[[1.] [0.] [0.]], y_axis=[[0.] [1.] [0.]], z_axis=[[0.] [0.] [1.]])

The user can also change the input frame of the transformation.

new_input_frame = Frame.from_axes(origin=[[1.] [1.] [1.]], x_axis=[[0.] [1.] [0.]], y_axis=[[0.] [0.] [1.]], z_axis=[[1.] [0.] [0.]])
transform.input_frame = new_input_frame

Now the transformation allows to transform points from the new input frame to the output frame.