mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	 f8a5796ca5
			
		
	
	
		f8a5796ca5
		
	
	
	
	
		
			
			SPE-1072 Working but flipped normals with the interior. Testing on treefrog passed Oversampling for hollowed mesh should not be less than 3x Flip back normals after simplify and remove redundant test code.
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			587 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			587 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef MESHSIMPLIFY_HPP
 | |
| #define MESHSIMPLIFY_HPP
 | |
| 
 | |
| #include <vector>
 | |
| 
 | |
| #include <libslic3r/TriangleMesh.hpp>
 | |
| 
 | |
| namespace Slic3r {
 | |
| 
 | |
| void simplify_mesh(indexed_triangle_set &);
 | |
| 
 | |
| // TODO: (but this can be done with IGL as well)
 | |
| // void simplify_mesh(indexed_triangle_set &, int face_count, float agressiveness = 0.5f);
 | |
| 
 | |
| template<class...Args> void simplify_mesh(TriangleMesh &m, Args &&...a)
 | |
| {
 | |
|     m.require_shared_vertices();
 | |
|     simplify_mesh(m.its, std::forward<Args>(a)...);
 | |
|     m = TriangleMesh{m.its};
 | |
|     m.require_shared_vertices();
 | |
| }
 | |
| 
 | |
| } // namespace Slic3r
 | |
| 
 | |
| #endif // MESHSIMPLIFY_H
 |