mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Update file_info.pl after the recent introduction of Slic3r::Model
This commit is contained in:
		
							parent
							
								
									d1e0bcf113
								
							
						
					
					
						commit
						048e58c071
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -25,12 +25,14 @@ my %opt = ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    my $input_file = $ARGV[0];
 | 
					    my $input_file = $ARGV[0];
 | 
				
			||||||
    my $mesh;
 | 
					 | 
				
			||||||
    $mesh = Slic3r::Format::STL->read_file($input_file) if $input_file =~ /\.stl$/i;
 | 
					 | 
				
			||||||
    die "This script doesn't support AMF yet\n" if $input_file =~ /\.amf$/i;
 | 
					    die "This script doesn't support AMF yet\n" if $input_file =~ /\.amf$/i;
 | 
				
			||||||
    die "Unable to read file\n" if !$mesh;
 | 
					    
 | 
				
			||||||
 | 
					    my $model;
 | 
				
			||||||
 | 
					    $model = Slic3r::Format::STL->read_file($input_file) if $input_file =~ /\.stl$/i;
 | 
				
			||||||
 | 
					    die "Unable to read file\n" if !$model;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    printf "Info about %s:\n", basename($input_file);
 | 
					    printf "Info about %s:\n", basename($input_file);
 | 
				
			||||||
 | 
					    my $mesh = $model->mesh;
 | 
				
			||||||
    $mesh->check_manifoldness;
 | 
					    $mesh->check_manifoldness;
 | 
				
			||||||
    printf "  number of facets: %d\n", scalar @{$mesh->facets};
 | 
					    printf "  number of facets: %d\n", scalar @{$mesh->facets};
 | 
				
			||||||
    printf "  size: x=%s y=%s z=%s\n", $mesh->size;
 | 
					    printf "  size: x=%s y=%s z=%s\n", $mesh->size;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue