mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-05 17:17:06 +02:00
Read OBJ and AMF
This commit is contained in:
@@ -17,9 +17,13 @@ sub read_file {
|
||||
}
|
||||
close $fh;
|
||||
|
||||
my $mesh = Slic3r::TriangleMesh->new;
|
||||
$mesh->ReadFromPerl($vertices, $facets);
|
||||
$mesh->repair;
|
||||
|
||||
my $model = Slic3r::Model->new;
|
||||
my $object = $model->add_object(vertices => $vertices);
|
||||
my $volume = $object->add_volume(facets => $facets);
|
||||
my $object = $model->add_object;
|
||||
my $volume = $object->add_volume(mesh => $mesh);
|
||||
return $model;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user