mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 20:51:23 -07:00
Refactoring: new Slic3r::Model class to represent files
This commit is contained in:
parent
c0322ec703
commit
f90520ed06
14 changed files with 255 additions and 88 deletions
|
|
@ -25,12 +25,12 @@ my %opt = ();
|
|||
}
|
||||
|
||||
{
|
||||
my $mesh = Slic3r::Format::AMF->read_file($ARGV[0]);
|
||||
my $model = Slic3r::Format::AMF->read_file($ARGV[0]);
|
||||
my $output_file = $ARGV[0];
|
||||
$output_file =~ s/\.amf(?:\.xml)?$/\.stl/i;
|
||||
|
||||
printf "Writing to %s\n", basename($output_file);
|
||||
Slic3r::Format::STL->write_file($output_file, $mesh, !$opt{ascii});
|
||||
Slic3r::Format::STL->write_file($output_file, $model, binary => !$opt{ascii});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue