diff --git a/lib/Slic3r/Model.pm b/lib/Slic3r/Model.pm index 04b5b6f52..10668b6b9 100644 --- a/lib/Slic3r/Model.pm +++ b/lib/Slic3r/Model.pm @@ -393,8 +393,12 @@ sub raw_mesh { sub raw_bounding_box { my $self = shift; - my @meshes = map $_->mesh, grep !$_->modifier, @{ $self->volumes }; + my @meshes = map $_->mesh->clone, grep !$_->modifier, @{ $self->volumes }; die "No meshes found" if !@meshes; + + my $instance = $self->instances->[0]; + $instance->transform_mesh($_, 1) for @meshes; + my $bb = (shift @meshes)->bounding_box; $bb->merge($_->bounding_box) for @meshes; return $bb; diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index b4ca45363..abd25fce1 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -171,7 +171,7 @@ sub add_model_object { } else { $o = $self->add_object($object, $object->raw_bounding_box); } - + $o->set_copies([ map Slic3r::Point->new_scale(@{ $_->offset }), @{ $object->instances } ]); $o->set_layer_height_ranges($object->layer_height_ranges);