MeshLib icon indicating copy to clipboard operation
MeshLib copied to clipboard

MeshInspector rotation

Open theElandor opened this issue 3 months ago • 2 comments

In MeshInspector when I try to rotate my mesh 180 degrees around a specific axis, it automatically clips the rotation to 90 degrees. Am I missing something or is it a bug?

theElandor avatar Sep 17 '25 08:09 theElandor

Hello! Rotation in MeshInspector transform box is set in Euler angles, which might lead to "Gimbal lock". To avoid this we limit Y axis in [-90;90] degrees range.

To achieve 180 deg rotation on Y axis you can set X and Z axes to 180, and Y to 0

EDIT: We cannot actually avoid gimbal lock, but this limitation allows us to convert data without degenerations: https://github.com/MeshInspector/MeshLib/blob/0aadb8cf16304cb5537cf7b57e40007711e0dfaf/source/MRMesh/MRMatrix3.h#L241-L250 https://stackoverflow.com/questions/15022630/how-to-calculate-the-angle-from-rotation-matrix

Grantim avatar Sep 17 '25 09:09 Grantim

Thanks!

theElandor avatar Sep 17 '25 09:09 theElandor