From 048e58c07123e5f56172cfab42be271d543d375a Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 13 Oct 2012 19:03:08 +0200 Subject: Update file_info.pl after the recent introduction of Slic3r::Model --- utils/file_info.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/file_info.pl b/utils/file_info.pl index 36e57e9b0..e8eb09456 100755 --- a/utils/file_info.pl +++ b/utils/file_info.pl @@ -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; -- cgit v1.2.3