Good bye, Perl Expat binding!

This commit is contained in:
bubnikv
2017-02-27 00:38:30 +01:00
parent 9ea570ea4e
commit f0f550783f
7 changed files with 2 additions and 253 deletions

View File

@@ -3,28 +3,6 @@ use Moo;
use File::Basename qw(basename);
sub read_file {
my $self = shift;
my ($file) = @_;
my $path = Slic3r::encode_path($file);
die "Failed to open $file\n" if !-e $path;
my $mesh = Slic3r::TriangleMesh->new;
$mesh->ReadSTLFile($path);
$mesh->repair;
die "This STL file couldn't be read because it's empty.\n"
if $mesh->facets_count == 0;
my $model = Slic3r::Model->new;
my $basename = basename($file);
my $object = $model->add_object(input_file => $file, name => $basename);
my $volume = $object->add_volume(mesh => $mesh, name => $basename);
return $model;
}
sub write_file {
my $self = shift;
my ($file, $mesh, %params) = @_;