diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm index 278d1a6c45..daef81f751 100644 --- a/lib/Slic3r/GUI/3DScene.pm +++ b/lib/Slic3r/GUI/3DScene.pm @@ -924,6 +924,7 @@ use base qw(Slic3r::GUI::3DScene::Base); use OpenGL qw(:glconstants :gluconstants :glufunctions); use List::Util qw(first); use Slic3r::Geometry qw(scale unscale epsilon); +use Slic3r::Print::State ':steps'; use constant COLORS => [ [1,1,0,1], [1,0.5,0.5,1], [0.5,1,0.5,1], [0.5,0.5,1,1] ]; @@ -1102,14 +1103,18 @@ sub load_print_object_toolpaths { foreach my $copy (@{ $object->_shifted_copies }) { foreach my $layerm (@{$layer->regions}) { - $self->_extrusionentity_to_verts($layerm->perimeters, $top_z, $copy, - \@perim_qverts, \@perim_qnorms, \@perim_tverts, \@perim_tnorms); + if ($object->step_done(STEP_PERIMETERS)) { + $self->_extrusionentity_to_verts($layerm->perimeters, $top_z, $copy, + \@perim_qverts, \@perim_qnorms, \@perim_tverts, \@perim_tnorms); + } - $self->_extrusionentity_to_verts($layerm->fills, $top_z, $copy, - \@infill_qverts, \@infill_qnorms, \@infill_tverts, \@infill_tnorms); + if ($object->step_done(STEP_INFILL)) { + $self->_extrusionentity_to_verts($layerm->fills, $top_z, $copy, + \@infill_qverts, \@infill_qnorms, \@infill_tverts, \@infill_tnorms); + } } - if ($layer->isa('Slic3r::Layer::Support')) { + if ($layer->isa('Slic3r::Layer::Support') && $object->step_done(STEP_SUPPORTMATERIAL)) { $self->_extrusionentity_to_verts($layer->support_fills, $top_z, $copy, \@support_qverts, \@support_qnorms, \@support_tverts, \@support_tnorms); diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 7164e358eb..1a53c72a84 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -28,7 +28,6 @@ use constant TB_SCALE => &Wx::NewId; use constant TB_SPLIT => &Wx::NewId; use constant TB_CUT => &Wx::NewId; use constant TB_SETTINGS => &Wx::NewId; -use constant CONFIG_TIMER_ID => &Wx::NewId; # package variables to avoid passing lexicals to threads our $THUMBNAIL_DONE_EVENT : shared = Wx::NewEventType; @@ -53,8 +52,6 @@ sub new { $self->{model} = Slic3r::Model->new; $self->{print} = Slic3r::Print->new; $self->{objects} = []; - $self->{apply_config_timer} = Wx::Timer->new($self, CONFIG_TIMER_ID) - if $Slic3r::have_threads; $self->{print}->set_status_cb(sub { my ($percent, $message) = @_; @@ -291,10 +288,14 @@ sub new { Slic3r::thread_cleanup(); }); - EVT_TIMER($self, CONFIG_TIMER_ID, sub { - my ($self, $event) = @_; - $self->async_apply_config; - }); + if ($Slic3r::have_threads) { + my $timer_id = Wx::NewId(); + $self->{apply_config_timer} = Wx::Timer->new($self, $timer_id); + EVT_TIMER($self, $timer_id, sub { + my ($self, $event) = @_; + $self->async_apply_config; + }); + } $self->{canvas}->update_bed_size; if ($self->{canvas3D}) {