mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
		
							parent
							
								
									30bcadab3e
								
							
						
					
					
						commit
						1555904bef
					
				
					 3771 changed files with 1251328 additions and 0 deletions
				
			
		
							
								
								
									
										7
									
								
								sandboxes/meshboolean/CMakeLists.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								sandboxes/meshboolean/CMakeLists.txt
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
add_executable(meshboolean MeshBoolean.cpp)
 | 
			
		||||
 | 
			
		||||
target_link_libraries(meshboolean libslic3r)
 | 
			
		||||
 | 
			
		||||
if (WIN32)
 | 
			
		||||
    prusaslicer_copy_dlls(meshboolean)
 | 
			
		||||
endif()
 | 
			
		||||
							
								
								
									
										43
									
								
								sandboxes/meshboolean/MeshBoolean.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								sandboxes/meshboolean/MeshBoolean.cpp
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
#include <iostream>
 | 
			
		||||
#include <vector>
 | 
			
		||||
 | 
			
		||||
#include <libslic3r/TriangleMesh.hpp>
 | 
			
		||||
#include <libslic3r/Model.hpp>
 | 
			
		||||
#include <libslic3r/SLAPrint.hpp>
 | 
			
		||||
#include <libslic3r/SLAPrintSteps.hpp>
 | 
			
		||||
#include <libslic3r/MeshBoolean.hpp>
 | 
			
		||||
 | 
			
		||||
#include <libnest2d/tools/benchmark.h>
 | 
			
		||||
 | 
			
		||||
#include <boost/log/trivial.hpp>
 | 
			
		||||
 | 
			
		||||
int main(const int argc, const char * argv[])
 | 
			
		||||
{
 | 
			
		||||
    using namespace Slic3r;
 | 
			
		||||
    
 | 
			
		||||
    if (argc <= 1) {
 | 
			
		||||
        std::cout << "Usage: meshboolean <input_file.3mf>" << std::endl;
 | 
			
		||||
        return EXIT_FAILURE;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
    TriangleMesh input;
 | 
			
		||||
    
 | 
			
		||||
    input.ReadSTLFile(argv[1]);
 | 
			
		||||
    
 | 
			
		||||
    Benchmark bench;
 | 
			
		||||
    
 | 
			
		||||
    bench.start();
 | 
			
		||||
    bool fckd = MeshBoolean::cgal::does_self_intersect(input);
 | 
			
		||||
    bench.stop();
 | 
			
		||||
    
 | 
			
		||||
    std::cout << "Self intersect test: " << fckd << " duration: " << bench.getElapsedSec() << std::endl;
 | 
			
		||||
    
 | 
			
		||||
    bench.start();
 | 
			
		||||
    MeshBoolean::self_union(input);
 | 
			
		||||
    bench.stop();
 | 
			
		||||
    
 | 
			
		||||
    std::cout << "Self union duration: " << bench.getElapsedSec() << std::endl;
 | 
			
		||||
    
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue