mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Refactored hollowing backend to use indexed_triangle_mesh
This commit is contained in:
		
							parent
							
								
									f12187b53d
								
							
						
					
					
						commit
						e6f97358bc
					
				
					 14 changed files with 204 additions and 68 deletions
				
			
		| 
						 | 
				
			
			@ -20,3 +20,23 @@ TEST_CASE("Hollow two overlapping spheres") {
 | 
			
		|||
    sphere1.WriteOBJFile("twospheres.obj");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_CASE("Split its") {
 | 
			
		||||
    using namespace Slic3r;
 | 
			
		||||
 | 
			
		||||
    TriangleMesh sphere1 = make_sphere(10., 2 * PI / 20.), sphere2 = sphere1;
 | 
			
		||||
 | 
			
		||||
    sphere1.translate(-5.f, 0.f, 0.f);
 | 
			
		||||
    sphere2.translate( 5.f, 0.f, 0.f);
 | 
			
		||||
 | 
			
		||||
    sphere1.merge(sphere2);
 | 
			
		||||
    sphere1.require_shared_vertices();
 | 
			
		||||
 | 
			
		||||
    std::vector<indexed_triangle_set> parts;
 | 
			
		||||
    its_split(sphere1.its, std::back_inserter(parts));
 | 
			
		||||
 | 
			
		||||
    size_t part_idx = 0;
 | 
			
		||||
    for (auto &part_its : parts) {
 | 
			
		||||
        its_write_obj(part_its, (std::string("part_its") + std::to_string(part_idx++) + ".obj").c_str());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue