mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fixed euler angles calculation for the singular case
This commit is contained in:
		
							parent
							
								
									2ce308693f
								
							
						
					
					
						commit
						94becf120b
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -1194,9 +1194,9 @@ Vec3d extract_euler_angles(const Eigen::Matrix<double, 3, 3, Eigen::DontAlign>& | |||
|     } | ||||
|     else | ||||
|     { | ||||
|         angles(0) = ::atan2(-rotation_matrix(1, 2), rotation_matrix(1, 1)); | ||||
|         angles(1) = 0.0; | ||||
|         angles(1) = ::atan2(-rotation_matrix(2, 0), sy); | ||||
|         angles(2) = 0.0; | ||||
|         angles(2) = (angles(1) >-0.0) ? ::atan2(rotation_matrix(1, 2), rotation_matrix(1, 1)) : ::atan2(-rotation_matrix(1, 2), rotation_matrix(1, 1)); | ||||
|     } | ||||
| 
 | ||||
|     return angles; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri