From e44480d61f53d8b846f647cdacf2ef1c48735747 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 10 Jul 2018 13:02:43 +0200 Subject: [PATCH] Supports were printed twice if synchronized with object layers, added always-on settings in ObjectSettingDialog --- lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm | 17 +++++++++++++++-- xs/src/libslic3r/GCode.cpp | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm index 1ec0ce1cb..a20a241f7 100644 --- a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm +++ b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm @@ -322,7 +322,13 @@ sub selection_changed { } # get default values my $default_config = Slic3r::Config::new_from_defaults_keys(\@opt_keys); - + + # decide which settings will be shown by default + if ($itemData->{type} eq 'object') { + $config->set_ifndef('wipe_into_objects', 0); + $config->set_ifndef('wipe_into_infill', 0); + } + # append default extruder push @opt_keys, 'extruder'; $default_config->set('extruder', 0); @@ -330,7 +336,14 @@ sub selection_changed { $self->{settings_panel}->set_default_config($default_config); $self->{settings_panel}->set_config($config); $self->{settings_panel}->set_opt_keys(\@opt_keys); - $self->{settings_panel}->set_fixed_options([qw(extruder)]); + + # disable minus icon to remove the settings + if ($itemData->{type} eq 'object') { + $self->{settings_panel}->set_fixed_options([qw(extruder), qw(wipe_into_infill), qw(wipe_into_objects)]); + } else { + $self->{settings_panel}->set_fixed_options([qw(extruder)]); + } + $self->{settings_panel}->enable; } diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 10404c90c..f3813a56a 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1365,7 +1365,7 @@ void GCode::process_layer( m_avoid_crossing_perimeters.use_external_mp_once = true; m_last_obj_copy = this_object_copy; this->set_origin(unscale(copy.x), unscale(copy.y)); - if (object_by_extruder.support != nullptr) { + if (object_by_extruder.support != nullptr && !print_wipe_extrusions) { m_layer = layers[layer_id].support_layer; gcode += this->extrude_support( // support_extrusion_role is erSupportMaterial, erSupportMaterialInterface or erMixed for all extrusion paths.