Files
OrcaSlicer-bambulab/lib/Slic3r/Format/STL.pm
T

20 lines
363 B
Perl
Raw Normal View History

package Slic3r::Format::STL;
use Moo;
2011-09-01 21:06:28 +02:00
2014-02-14 22:24:30 +01:00
use File::Basename qw(basename);
sub write_file {
my $self = shift;
2014-04-25 10:20:30 +02:00
my ($file, $mesh, %params) = @_;
$mesh = $mesh->mesh if $mesh->isa('Slic3r::Model');
my $path = Slic3r::encode_path($file);
$params{binary}
2014-04-25 10:20:30 +02:00
? $mesh->write_binary($path)
: $mesh->write_ascii($path);
2012-02-19 15:45:27 +01:00
}
2011-09-01 21:06:28 +02:00
1;