mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 12:41:18 -07:00
Read OBJ and AMF
This commit is contained in:
parent
a821eb7f3c
commit
4c96a52012
3 changed files with 27 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue