mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Replace the flip word with mirror. #3060
This commit is contained in:
parent
f8d2c69713
commit
61f0a9e4da
8 changed files with 31 additions and 31 deletions
|
@ -783,7 +783,7 @@ sub rotate {
|
|||
$self->schedule_background_process;
|
||||
}
|
||||
|
||||
sub flip {
|
||||
sub mirror {
|
||||
my ($self, $axis) = @_;
|
||||
|
||||
my ($obj_idx, $object) = $self->selected_object;
|
||||
|
@ -792,13 +792,13 @@ sub flip {
|
|||
my $model_object = $self->{model}->objects->[$obj_idx];
|
||||
my $model_instance = $model_object->instances->[0];
|
||||
|
||||
# apply Z rotation before flipping
|
||||
# apply Z rotation before mirroring
|
||||
if ($model_instance->rotation != 0) {
|
||||
$model_object->rotate($model_instance->rotation, Z);
|
||||
$_->set_rotation(0) for @{ $model_object->instances };
|
||||
}
|
||||
|
||||
$model_object->flip($axis);
|
||||
$model_object->mirror($axis);
|
||||
$model_object->update_bounding_box;
|
||||
|
||||
# realign object to Z = 0
|
||||
|
@ -1688,17 +1688,17 @@ sub object_menu {
|
|||
$self->rotate(undef, Z);
|
||||
});
|
||||
|
||||
my $flipMenu = Wx::Menu->new;
|
||||
my $flipMenuItem = $menu->AppendSubMenu($flipMenu, "Flip", 'Mirror the selected object');
|
||||
$frame->_set_menu_item_icon($flipMenuItem, 'shape_flip_horizontal.png');
|
||||
$frame->_append_menu_item($flipMenu, "Along X axis…", 'Mirror the selected object along the X axis', sub {
|
||||
$self->flip(X);
|
||||
my $mirrorMenu = Wx::Menu->new;
|
||||
my $mirrorMenuItem = $menu->AppendSubMenu($mirrorMenu, "Mirror", 'Mirror the selected object');
|
||||
$frame->_set_menu_item_icon($mirrorMenuItem, 'shape_flip_horizontal.png');
|
||||
$frame->_append_menu_item($mirrorMenu, "Along X axis…", 'Mirror the selected object along the X axis', sub {
|
||||
$self->mirror(X);
|
||||
});
|
||||
$frame->_append_menu_item($flipMenu, "Along Y axis…", 'Mirror the selected object along the Y axis', sub {
|
||||
$self->flip(Y);
|
||||
$frame->_append_menu_item($mirrorMenu, "Along Y axis…", 'Mirror the selected object along the Y axis', sub {
|
||||
$self->mirror(Y);
|
||||
});
|
||||
$frame->_append_menu_item($flipMenu, "Along Z axis…", 'Mirror the selected object along the Z axis', sub {
|
||||
$self->flip(Z);
|
||||
$frame->_append_menu_item($mirrorMenu, "Along Z axis…", 'Mirror the selected object along the Z axis', sub {
|
||||
$self->mirror(Z);
|
||||
});
|
||||
|
||||
my $scaleMenu = Wx::Menu->new;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue