Base: add new API Rotation::get/setEulerAngles()

Exposed to Python as new constructor parameters and
Rotation.toEulerAngles()

This function uses the code from OCCT
gp_Quaternion::Get/SetEulerAngles() to support all 24 possible
generalized euler rotation sequences. Call Rotation.toEulerAngles()
without argument to obtain all possible sequence types.
This commit is contained in:
Zheng, Lei
2021-03-07 18:02:16 +08:00
parent ccc4151b30
commit c1454dfbed
4 changed files with 365 additions and 1 deletions

View File

@@ -24,6 +24,8 @@
-- a Vector (axis) and a float (angle)
-- two Vectors (rotation from/to vector)
-- three floats (Euler angles) as yaw-pitch-roll in XY'Z'' convention
-- one string and three floats (Euler angles) as euler rotation
of a given type. Call toEulerSequence() for supported sequence types.
-- four floats (Quaternion) where the quaternion is specified as:
q=xi+yj+zk+w, i.e. the last parameter is the real part
-- three vectors that define rotated axes directions + an optional
@@ -84,12 +86,21 @@
<Methode Name="toEuler" Const="true">
<Documentation>
<UserDocu>
toEuler(Vector) -> list
toEuler() -> list
Get the Euler angles of this rotation
as yaw-pitch-roll in XY'Z'' convention
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toEulerAngles" Const="true">
<Documentation>
<UserDocu>
toEulerAngles(seq='') -> list
Get the Euler angles in a given sequence for this rotation.
Call this function without arguments to output all possible values of 'seq'.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toMatrix" Const="true">
<Documentation>
<UserDocu>