mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 13:34:05 -06:00
Refactor the AMF parser so that it popolates a Model object directly. Also read constellations
This commit is contained in:
parent
23f6842bd4
commit
f29d455319
4 changed files with 59 additions and 35 deletions
|
@ -43,9 +43,10 @@ my %opt = ();
|
|||
$f;
|
||||
} @{ $model->objects->[0]->volumes->[0]->facets };
|
||||
|
||||
push @{$new_model->materials}, { Name => basename($ARGV[$m]) };
|
||||
my $material_id = scalar keys %{$new_model->materials};
|
||||
$new_model->materials->{$material_id} = { Name => basename($ARGV[$m]) };
|
||||
$new_object->add_volume(
|
||||
material_id => $#{$new_model->materials},
|
||||
material_id => $material_id,
|
||||
facets => [@new_facets],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue