I stepped into the source code and compared the OCCT method with the algorithm by Ken Shoemake mentioned in gp_Quaternion.cxx:
---snip---
//=======================================================================
//function : translateEulerSequence
//purpose :
// Code supporting conversion between quaternion and generalized
// Euler angles (sequence of three rotations) is based on
// algorithm by Ken Shoemake, published in Graphics Gems IV, p. 222-22
// http://tog.acm.org/resources/GraphicsGems/gemsiv/euler_angle/EulerAngles.c
//=======================================================================
---snap---
I am doing the following rotation:
with c around the worlds x-Axis
with b around the worlds y-Axis
with a around the worlds z-Axis
In "Graphics Gems IV" this is EulOrdXYZs, which means:
- Initial axis: X
- parity of axis permutation: even
- repetition of initial axis as last: no
- take axes from initial frame (static axes): yes
The same euler parameters in OCCT results in the euler sequence "gp_Intrinsic_XYZ". But the equivalent gp_EulerSequence for EulOrdXYZs should be "gp_Extrinsic_XYZ", because I am rotating around static axes! I integrated the "Graphics Gems IV" sources into my tests and the results confirmed this: EulOrdXYZs is gp_Intrinsic_XYZ in OCCT!
Now I am using gp_Intrinsic_XYZ everywhere I rotate around static XYZ. Now all my algorithms are working correctly, but the naming of the "gp_EulerSequence"s in OCCT is obviously WRONG!
Is there any OCCT developer who can confirm this as a BUG (or a feature...)?