mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
Fixes to complete_objects to make t/gcode.t pass
This commit is contained in:
parent
c5ead0f2a6
commit
7ddf4f3ddf
5 changed files with 15 additions and 11 deletions
|
@ -90,7 +90,7 @@ sub model {
|
|||
my $object = $model->add_object;
|
||||
$object->add_volume(mesh => $mesh);
|
||||
$object->add_instance(
|
||||
offset => Slic3r::Point->new(0,0),
|
||||
offset => [0,0],
|
||||
rotation => $params{rotation} // 0,
|
||||
);
|
||||
return $model;
|
||||
|
@ -108,6 +108,9 @@ sub init_print {
|
|||
$model_name = [$model_name] if ref($model_name) ne 'ARRAY';
|
||||
for my $model (map model($_, %params), @$model_name) {
|
||||
die "Unknown model in test" if !defined $model;
|
||||
if (defined $params{duplicate} && $params{duplicate} > 1) {
|
||||
$model->duplicate($params{duplicate} // 1, $config->min_object_distance);
|
||||
}
|
||||
$model->arrange_objects($config->min_object_distance);
|
||||
$model->center_instances_around_point($config->print_center);
|
||||
$print->add_model_object($_) for @{$model->objects};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue