mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fixed 3mf unit tests to pass on ARM 64bit
This commit is contained in:
		
							parent
							
								
									2ed57d1ba5
								
							
						
					
					
						commit
						d6bb8eead9
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		|  | @ -112,7 +112,17 @@ SCENARIO("2D convex hull of sinking object", "[3mf]") { | |||
|                 { -91501496, 4243 } | ||||
|             }; | ||||
| 
 | ||||
|             bool res = hull_2d.points == result; | ||||
|             // Allow 1um error due to floating point rounding.
 | ||||
|             bool res = hull_2d.points.size() == result.size(); | ||||
|             if (res) | ||||
|                 for (size_t i = 0; i < result.size(); ++ i) { | ||||
|                     const Point &p1 = result[i]; | ||||
|                     const Point &p2 = hull_2d.points[i]; | ||||
|                     if (std::abs(p1.x() - p2.x()) > 1 || std::abs(p1.y() - p2.y()) > 1) { | ||||
|                         res = false; | ||||
|                         break; | ||||
|                     } | ||||
|                 } | ||||
| 
 | ||||
|             THEN("2D convex hull should match with reference") { | ||||
|                 REQUIRE(res); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vojtech Bubnik
						Vojtech Bubnik