View Issue Details
ID  Project  Category  View Status  Date Submitted  Last Update 

0025946  Community  OCCT:Coding  public  20150316 14:24  20160329 17:35 
Reporter  shoogen  Assigned To  shoogen  
Priority  normal  Severity  just a question  
Status  closed  Resolution  fixed  
Target Version  7.0.0  Fixed in Version  7.0.0  
Summary  0025946: extrinsic Euler conventions in gp_Quaternion  
Description  According to the English Wikipedia the relation between extrinsic and intrinsic Euler conventions is as follows: > Any extrinsic rotation is equivalent to an intrinsic rotation by the same angles but with inverted order of elemental rotations, and viceversa. When I set a quaternion using gp_Intrinsic_ZYX and extract the Euler angles for gp_Extrinsic_ZYX i get the same angles but in the reverse order. (I would expect totally different numbers) But from my understanding of the wikipedia page i would expect that gp_Intrinsic_ZYX would return the same numbers as gp_Extrinsic_XYZ, which isn't case. If my understanding is correct, then there is a bug in the current implementation and the first axis and the odd flag need to be adjusted for extrinsic Euler conventions.  
Steps To Reproduce  gp_Quaternion q; Standard_Real alpha,beta,gamma; q.Set(0.06766916507860499, 0.21848101129786085, 0.11994599260380681,0.9660744746954637); q.GetEulerAngles(gp_Intrinsic_ZYX, alpha,beta, gamma); std::cout << "Intrinsic_ZYX: " << alpha / M_PI * 180.0 << "," << beta / M_PI * 180.0 << "," << gamma / M_PI * 180.0 << std::endl; q.GetEulerAngles(gp_Extrinsic_XYZ, alpha,beta,gamma); std::cout << "Extrinsic_XYZ: " << alpha / M_PI * 180.0 << "," << beta / M_PI * 180.0 << "," << gamma / M_PI * 180.0 << std::endl;  
Tags  No tags attached.  
Test case number  

The error will only show Taitâ€“Bryan angle conventions (three different axes). For the pure Euler angle conventions the behavior should be correct. 

CR25946.gitbundle (717 bytes) 

I attached a reworked commit to include a fix for 0025574. The order of the angles has to be reversed for the extrinsic cases. $ git fetch CR25946_2.gitbundle CR25946:CR25946 

CR25946_2.gitbundle (743 bytes) 

Hello Sebastian, Sorry for long time passed since the issue registration. The fix is now available, as patch for 0025574 (see branch CR25574_4). Note that by our analysis we concluded that extrinsic sequences were OK, and intrinsic are the ones to be corrected. This is opposite to what you proposed in your fix, thus I suggest you to check this point (if you are still using this functionality). In the case if you believe your fix was correct one, please give your arguments. 
Date Modified  Username  Field  Change 

20150316 14:24  shoogen  New Issue  
20150316 14:24  shoogen  Assigned To  => kgv 
20150316 14:34  shoogen  Note Added: 0038393  
20150316 16:47  shoogen  File Added: CR25946.gitbundle  
20150316 16:51  shoogen  Note Added: 0038402  
20150319 22:05  kgv  Relationship added  related to 0025574 
20150319 23:53  shoogen  File Added: CR25946_2.gitbundle  
20150319 23:56  shoogen  Note Edited: 0038402  
20150323 09:27  kgv  Assigned To  kgv => abv 
20150323 09:27  kgv  Target Version  => 6.9.0 
20150506 13:48  abv  Target Version  6.9.0 => 7.0.0 
20160122 14:19  abv  Note Added: 0050051  
20160122 14:19  abv  Assigned To  abv => shoogen 
20160122 14:19  abv  Status  new => feedback 
20160329 17:35  abv  Status  feedback => closed 
20160329 17:35  abv  Resolution  open => fixed 
20160329 17:35  abv  Fixed in Version  => 7.0.0 