mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Merge pull request #212 from digitalbytes/process-multiple-files
Support skeining multiple files from the command line.
This commit is contained in:
		
						commit
						9ac92facdd
					
				
					 2 changed files with 14 additions and 16 deletions
				
			
		| 
						 | 
					@ -23,6 +23,7 @@ sub go {
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    # skein the STL into layers
 | 
					    # skein the STL into layers
 | 
				
			||||||
    # each layer has surfaces with holes
 | 
					    # each layer has surfaces with holes
 | 
				
			||||||
 | 
					    $self->status_cb->(5, "Processing input file " . $self->input_file);    
 | 
				
			||||||
    $self->status_cb->(10, "Processing triangulated mesh");
 | 
					    $self->status_cb->(10, "Processing triangulated mesh");
 | 
				
			||||||
    my $print;
 | 
					    my $print;
 | 
				
			||||||
    if ($self->input_file =~ /\.stl$/i) {
 | 
					    if ($self->input_file =~ /\.stl$/i) {
 | 
				
			||||||
| 
						 | 
					@ -127,8 +128,8 @@ sub go {
 | 
				
			||||||
    $print->extrude_skirt;
 | 
					    $print->extrude_skirt;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    # output everything to a GCODE file
 | 
					    # output everything to a GCODE file
 | 
				
			||||||
    $self->status_cb->(90, "Exporting GCODE");
 | 
					 | 
				
			||||||
    my $output_file = $self->expanded_output_filepath;
 | 
					    my $output_file = $self->expanded_output_filepath;
 | 
				
			||||||
 | 
					    $self->status_cb->(90, "Exporting GCODE to $output_file");
 | 
				
			||||||
    $print->export_gcode($output_file);
 | 
					    $print->export_gcode($output_file);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    # run post-processing scripts
 | 
					    # run post-processing scripts
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -71,11 +71,8 @@ if (!@ARGV && !$opt{save} && eval "require Slic3r::GUI; 1") {
 | 
				
			||||||
    exit;
 | 
					    exit;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ($ARGV[0]) {
 | 
					if (@ARGV) {
 | 
				
			||||||
 | 
					    foreach my $input_file ( @ARGV ) {
 | 
				
			||||||
    # skein
 | 
					 | 
				
			||||||
    my $input_file = $ARGV[0];
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
        my $skein = Slic3r::Skein->new(
 | 
					        my $skein = Slic3r::Skein->new(
 | 
				
			||||||
            input_file  => $input_file,
 | 
					            input_file  => $input_file,
 | 
				
			||||||
            output_file => $opt{output},
 | 
					            output_file => $opt{output},
 | 
				
			||||||
| 
						 | 
					@ -85,7 +82,7 @@ if ($ARGV[0]) {
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        $skein->go;        
 | 
					        $skein->go;        
 | 
				
			||||||
    
 | 
					    }
 | 
				
			||||||
} else {
 | 
					} else {
 | 
				
			||||||
    usage(1) unless $opt{save};
 | 
					    usage(1) unless $opt{save};
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue