RotationUtil
Implementation of the rotation utility
RotationUtil
Canonical path: Utils.RotationUtil.RotationUtil
Class used to describe the rotation around the three axes (X,Y,Z) in order to transform a geometry from local to global coordinate system or the other way around.
Often used in context of transforming a bending shape (rebar or mesh) from/to its local coordinate system.
angle_x
property
Rotation angle around the X axis (in degrees)
Returns:
-
float–Rotation angle around the X axis (in degrees)
angle_y
property
Rotation angle around the Y axis (in degrees)
Returns:
-
float–Rotation angle around the Y axis (in degrees)
angle_z
property
Rotation angle around the Z axis (in degrees)
Returns:
-
float–Rotation angle around the Z axis (in degrees)
__init__
Construct the object by setting all three angles. The angles are given in degrees.
Parameters:
-
angle_x(float) –Rotation angle (degree) around the local x axis
-
angle_y(float) –Rotation angle (degree) around the local y axis
-
angle_z(float) –Rotation angle (degree) around the local z axis
__repr__
create a string from the object data
Returns:
-
str–string with the object data
get_rotation_matrix
inverse
inverse() -> RotationUtil
Get the inverse rotation, which can be used to transform from global to local coordinate system if the original rotation is used to transform from local to global coordinate system (or the other way around).
Returns:
-
RotationUtil–RotationUtil object with the inverse angles