Hi,
Can I ask for help with how to retreive the rotation matrix that transforms MassProperties.XYZMomentsOfInertia to MassProperties.PrincipalMomentsOfInertia when they are represented as matrices.
As you may know, mathematically speaking, the principal inertia tensor (Ii) is mapped into the inertia tensor (Ix) with respect to a coordinate frame (frame x) whose origin coincides with the origin of the inertia frame (the center of mass) and whose axes are aligned with those of the global coordinate frame using the rotation matrix (Rxi) describing the orientation of the principal inertia frame with respect to the frame x like:
Ix = Rxi @ Ii @ Rxi.T
where @ is matrix muliplication and .T is transpose.
In my understanding, PrincipalMomentsOfInertia is Ii and XYZMomentsOfInertia is Ix. And I know that MassProperties.RotationToPrincipal, which may provide the orientation of the principal inertia frame with respect to the frame x. But what type of orientation representation is it? Is it Euler angles? If so, what is the order, X-Y-Z Euler or Z-Y-X Euler?
Besides, does anybody know a convenient way to get a 4x4 Matirx object (homogeneous version of Rxi) from the output of RotationToPrincipal only using Inventor API?
Thanks in advance!
Okay, I found out that the output of RotationOfToPrincipal is an extrinsic XYZ-euler. But I still got confused. That method is described that:
Gets the rotation from the active edit coordinate system of the target to the principal coordinate system.
But, as far as I have checked the rotation matrix converted from the method's output, RotationOfToPrincipal gets the rotation from the principal coordinate system to the active edit coordinate system of the target. So, the reference frame and the described frame are inverted.
I am wondering whether the method is correctly described. Does someone have any ideas?
Can't find what you're looking for? Ask the community or share your knowledge.