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 $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 "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);
|
||||
my $mesh = $model->mesh;
|
||||
$mesh->check_manifoldness;
|
||||
printf " number of facets: %d\n", scalar @{$mesh->facets};
|
||||
printf " size: x=%s y=%s z=%s\n", $mesh->size;
|
||||
|
|
Loading…
Reference in a new issue