Ensure that modifiers are aligned to the center of the part. (#4170)

This commit is contained in:
Giles Bathgate 2017-12-21 16:36:50 +00:00 committed by Joseph Lenox
parent d27b8a933e
commit d0e2adea4e

View File

@ -407,6 +407,14 @@ sub on_btn_lambda {
} else {
return;
}
my $center = $self->{model_object}->bounding_box->center;
if (!$Slic3r::GUI::Settings->{_}{autocenter}) {
#TODO what we really want to do here is just align the
# center of the modifier to the center of the part.
$mesh->translate($center->x, $center->y, 0);
}
$mesh->repair;
my $new_volume = $self->{model_object}->add_volume(mesh => $mesh);
$new_volume->set_modifier($is_modifier);