diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-06-05 11:56:55 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-06-05 11:56:55 +0300 |
commit | 5392008916aa5b951771c4a23579528c797070c8 (patch) | |
tree | aa286165d60f279fe785022fb0342298a4c14b80 /lib | |
parent | 1f79713c15414e8e4564ef09becbe4b9442062cc (diff) |
Generation of gcode paths moved to c++
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Slic3r/GUI/3DScene.pm | 16 | ||||
-rw-r--r-- | lib/Slic3r/GUI/Plater.pm | 1 | ||||
-rw-r--r-- | lib/Slic3r/GUI/Plater/3DPreview.pm | 6 | ||||
-rw-r--r-- | lib/Slic3r/GUI/Plater/ObjectCutDialog.pm | 1 | ||||
-rw-r--r-- | lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm | 1 |
5 files changed, 13 insertions, 12 deletions
diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm index 204e19d3d..1476e8c22 100644 --- a/lib/Slic3r/GUI/3DScene.pm +++ b/lib/Slic3r/GUI/3DScene.pm @@ -2248,20 +2248,14 @@ sub load_wipe_tower_toolpaths { #============================================================================================================================== } -sub load_gcode_preview { - my ($self, $print, $gcode_preview_data, $colors) = @_; - #============================================================================================================================== - my $useVBOs = Slic3r::GUI::_3DScene::use_VBOs(); - $self->SetCurrent($self->GetContext) if $useVBOs; - Slic3r::GUI::_3DScene::load_gcode_preview($print, $gcode_preview_data, $self->volumes, $colors, $useVBOs); - +#sub load_gcode_preview { +# my ($self, $print, $gcode_preview_data, $colors) = @_; +# # $self->SetCurrent($self->GetContext) if $self->UseVBOs; # Slic3r::GUI::_3DScene::load_gcode_preview($print, $gcode_preview_data, $self->volumes, $colors, $self->UseVBOs); -#============================================================================================================================== -} - -#============================================================================================================================== +#} +# #sub set_toolpaths_range { # my ($self, $min_z, $max_z) = @_; # $self->volumes->set_range($min_z, $max_z); diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index fafd5da7c..309c2e5ed 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -134,6 +134,7 @@ sub new { $self->{canvas3D}->set_on_enable_action_buttons($enable_action_buttons); #=================================================================================================================================== Slic3r::GUI::_3DScene::enable_shader($self->{canvas3D}, 1); + Slic3r::GUI::_3DScene::enable_force_zoom_to_bed($self->{canvas3D}, 1); # $self->{canvas3D}->use_plain_shader(1); #=================================================================================================================================== $self->{canvas3D}->set_on_wipe_tower_moved(sub { diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index 2b7f56cc1..9ea5069b4 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -391,7 +391,11 @@ sub load_print { #============================================================================================================================== } else { $self->{force_sliders_full_range} = (scalar(@{$self->canvas->volumes}) == 0); - $self->canvas->load_gcode_preview($self->print, $self->gcode_preview_data, \@colors); +#============================================================================================================================== + Slic3r::GUI::_3DScene::set_print($self->canvas, $self->print); + Slic3r::GUI::_3DScene::load_gcode_preview($self->canvas, $self->gcode_preview_data, \@colors); +# $self->canvas->load_gcode_preview($self->print, $self->gcode_preview_data, \@colors); +#============================================================================================================================== $self->show_hide_ui_elements('full'); # recalculates zs and update sliders accordingly diff --git a/lib/Slic3r/GUI/Plater/ObjectCutDialog.pm b/lib/Slic3r/GUI/Plater/ObjectCutDialog.pm index bb9ecd41c..84177dd0f 100644 --- a/lib/Slic3r/GUI/Plater/ObjectCutDialog.pm +++ b/lib/Slic3r/GUI/Plater/ObjectCutDialog.pm @@ -126,6 +126,7 @@ sub new { $canvas->SetMinSize($canvas->GetSize); #============================================================================================================================== Slic3r::GUI::_3DScene::set_config($canvas, $self->GetParent->{config}); + Slic3r::GUI::_3DScene::enable_force_zoom_to_bed($canvas, 1); #============================================================================================================================== } diff --git a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm index 6fff40769..ad9c4df94 100644 --- a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm +++ b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm @@ -183,6 +183,7 @@ sub new { #============================================================================================================================== Slic3r::GUI::_3DScene::set_config($canvas, $self->GetParent->GetParent->GetParent->{config}); Slic3r::GUI::_3DScene::update_volumes_colors_by_extruder($canvas); + Slic3r::GUI::_3DScene::enable_force_zoom_to_bed($canvas, 1); # $canvas->update_volumes_colors_by_extruder($self->GetParent->GetParent->GetParent->{config}); #============================================================================================================================== } |