mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Enable all tests for support point generator
This commit is contained in:
		
							parent
							
								
									ea9a8b7e93
								
							
						
					
					
						commit
						a9a99de939
					
				
					 1 changed files with 14 additions and 15 deletions
				
			
		|  | @ -105,26 +105,25 @@ TEST_CASE("Overhanging edge should be supported", "[SupGen]") { | |||
|     REQUIRE(min_point_distance(pts) >= cfg.minimal_distance); | ||||
| } | ||||
| 
 | ||||
| // FIXME: Not working yet
 | ||||
| //TEST_CASE("Hollowed cube should be supported from the inside", "[SupGen][Hollowed]") {
 | ||||
| //    TriangleMesh mesh = make_cube(20., 20., 20.);
 | ||||
| TEST_CASE("Hollowed cube should be supported from the inside", "[SupGen][Hollowed]") { | ||||
|     TriangleMesh mesh = make_cube(20., 20., 20.); | ||||
| 
 | ||||
| //    hollow_mesh(mesh, HollowingConfig{});
 | ||||
|     hollow_mesh(mesh, HollowingConfig{}); | ||||
| 
 | ||||
| //    mesh.WriteOBJFile("cube_hollowed.obj");
 | ||||
|     mesh.WriteOBJFile("cube_hollowed.obj"); | ||||
| 
 | ||||
| //    auto bb = mesh.bounding_box();
 | ||||
| //    auto h  = float(bb.max.z() - bb.min.z());
 | ||||
| //    Vec3f mv = bb.center().cast<float>() - Vec3f{0.f, 0.f, 0.5f * h};
 | ||||
| //    mesh.translate(-mv);
 | ||||
| //    mesh.require_shared_vertices();
 | ||||
|     auto bb = mesh.bounding_box(); | ||||
|     auto h  = float(bb.max.z() - bb.min.z()); | ||||
|     Vec3f mv = bb.center().cast<float>() - Vec3f{0.f, 0.f, 0.5f * h}; | ||||
|     mesh.translate(-mv); | ||||
|     mesh.require_shared_vertices(); | ||||
| 
 | ||||
| //    sla::SupportPointGenerator::Config cfg;
 | ||||
| //    sla::SupportPoints pts = calc_support_pts(mesh, cfg);
 | ||||
| //    sla::remove_bottom_points(pts, mesh.bounding_box().min.z() + EPSILON);
 | ||||
|     sla::SupportPointGenerator::Config cfg; | ||||
|     sla::SupportPoints pts = calc_support_pts(mesh, cfg); | ||||
|     sla::remove_bottom_points(pts, mesh.bounding_box().min.z() + EPSILON); | ||||
| 
 | ||||
| //    REQUIRE(!pts.empty());
 | ||||
| //}
 | ||||
|     REQUIRE(!pts.empty()); | ||||
| } | ||||
| 
 | ||||
| TEST_CASE("Two parallel plates should be supported", "[SupGen][Hollowed]") | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tamasmeszaros
						tamasmeszaros