mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 22:54:08 -06:00
Out of bed detection - 1st installment
This commit is contained in:
parent
83a2d2af4b
commit
bdd2d725c8
15 changed files with 689 additions and 188 deletions
|
@ -8,6 +8,8 @@ use Wx qw(:misc :pen :brush :sizer :font :cursor :keycode wxTAB_TRAVERSAL);
|
|||
use Wx::Event qw(EVT_KEY_DOWN EVT_CHAR);
|
||||
use base qw(Slic3r::GUI::3DScene Class::Accessor);
|
||||
|
||||
use Wx::Locale gettext => 'L';
|
||||
|
||||
__PACKAGE__->mk_accessors(qw(
|
||||
on_arrange on_rotate_object_left on_rotate_object_right on_scale_object_uniformly
|
||||
on_remove_object on_increase_objects on_decrease_objects));
|
||||
|
@ -208,6 +210,20 @@ sub reload_scene {
|
|||
$self->{model}->bounding_box->z_max, $self->UseVBOs);
|
||||
}
|
||||
}
|
||||
|
||||
# checks for geometry outside the print volume to render it accordingly
|
||||
if (scalar @{$self->volumes} > 0)
|
||||
{
|
||||
if (!$self->{model}->fits_print_volume($self->{config})) {
|
||||
$self->set_warning_enabled(1);
|
||||
$self->volumes->update_outside_state($self->{config}, 0);
|
||||
Slic3r::GUI::_3DScene::generate_warning_texture(L("Detected object outside print volume"));
|
||||
} else {
|
||||
$self->set_warning_enabled(0);
|
||||
$self->volumes->update_outside_state($self->{config}, 1);
|
||||
Slic3r::GUI::_3DScene::reset_warning_texture();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub update_bed_size {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue