mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 07:02:01 +08:00
Ensure that modifiers are aligned to the center of the part. (#4170)
This commit is contained in:
parent
d27b8a933e
commit
d0e2adea4e
@ -407,6 +407,14 @@ sub on_btn_lambda {
|
|||||||
} else {
|
} else {
|
||||||
return;
|
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;
|
$mesh->repair;
|
||||||
my $new_volume = $self->{model_object}->add_volume(mesh => $mesh);
|
my $new_volume = $self->{model_object}->add_volume(mesh => $mesh);
|
||||||
$new_volume->set_modifier($is_modifier);
|
$new_volume->set_modifier($is_modifier);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user