diff options
author | bubnikv <bubnikv@gmail.com> | 2017-02-26 23:54:42 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-02-26 23:54:42 +0300 |
commit | b7aeeb968b4fc6d1725816b264e1238df9d0a17a (patch) | |
tree | 08d0f09ea52f0095ec74e5a5d93ee7678bb6a9ea /utils | |
parent | 121b3c31d2eb4c882d7798d118ccd68573f8fdb9 (diff) |
Using the C++ file loaders.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/dump-stl.pl | 3 | ||||
-rwxr-xr-x | utils/split_stl.pl | 2 | ||||
-rwxr-xr-x | utils/stl-to-amf.pl | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/utils/dump-stl.pl b/utils/dump-stl.pl index 08b4d750a..f96e3f5bb 100644 --- a/utils/dump-stl.pl +++ b/utils/dump-stl.pl @@ -12,12 +12,13 @@ BEGIN { use Slic3r; use Slic3r::Test; +use File::Basename qw(basename); $|++; $ARGV[0] or usage(1); if (-e $ARGV[0]) { - my $model = Slic3r::Format::STL->read_file($ARGV[0]); + my $model = Slic3r::Model->load_stl(Slic3r::encode_path($ARGV[0]), basename($ARGV[0])); $model->objects->[0]->add_instance(offset => Slic3r::Pointf->new(0,0)); my $mesh = $model->mesh; $mesh->repair; diff --git a/utils/split_stl.pl b/utils/split_stl.pl index 8e7d957a4..23fc91b26 100755 --- a/utils/split_stl.pl +++ b/utils/split_stl.pl @@ -25,7 +25,7 @@ my %opt = (); } { - my $model = Slic3r::Format::STL->read_file($ARGV[0]); + my $model = Slic3r::Model->load_stl(Slic3r::encode_path($ARGV[0]), basename($ARGV[0])); my $basename = $ARGV[0]; $basename =~ s/\.stl$//i; diff --git a/utils/stl-to-amf.pl b/utils/stl-to-amf.pl index e1adec7ce..525dcb52a 100755 --- a/utils/stl-to-amf.pl +++ b/utils/stl-to-amf.pl @@ -25,7 +25,7 @@ my %opt = (); } { - my @models = map Slic3r::Format::STL->read_file($_), @ARGV; + my @models = map Slic3r::Model->load_stl(Slic3r::encode_path($_), basename($_)), @ARGV; my $output_file = $ARGV[0]; $output_file =~ s/\.stl$/.amf.xml/i; |