diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index b87dfa852..a744b4c47 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -533,7 +533,7 @@ sub build { support_material support_material_threshold support_material_enforce_layers raft_layers support_material_pattern support_material_with_sheath support_material_spacing support_material_synchronize_layers support_material_angle - support_material_interface_layers support_material_interface_spacing + support_material_interface_layers support_material_interface_spacing support_material_interface_contact_loops support_material_contact_distance support_material_buildplate_only dont_support_bridges notes complete_objects extruder_clearance_radius extruder_clearance_height @@ -646,6 +646,7 @@ sub build { $optgroup->append_single_option_line('support_material_angle'); $optgroup->append_single_option_line('support_material_interface_layers'); $optgroup->append_single_option_line('support_material_interface_spacing'); + $optgroup->append_single_option_line('support_material_interface_contact_loops'); $optgroup->append_single_option_line('support_material_buildplate_only'); $optgroup->append_single_option_line('dont_support_bridges'); $optgroup->append_single_option_line('support_material_synchronize_layers'); @@ -916,7 +917,7 @@ sub _update { support_material_extrusion_width support_material_contact_distance); $self->get_field($_)->toggle($have_support_material && $have_support_interface) for qw(support_material_interface_spacing support_material_interface_extruder - support_material_interface_speed); + support_material_interface_speed support_material_interface_contact_loops); $self->get_field('perimeter_extrusion_width')->toggle($have_perimeters || $have_skirt || $have_brim); $self->get_field('support_material_extruder')->toggle($have_support_material || $have_skirt); diff --git a/lib/Slic3r/Print/SupportMaterial.pm b/lib/Slic3r/Print/SupportMaterial.pm index 5aad19cad..522b4fd54 100644 --- a/lib/Slic3r/Print/SupportMaterial.pm +++ b/lib/Slic3r/Print/SupportMaterial.pm @@ -640,7 +640,7 @@ sub generate_toolpaths { my $interface_flow = $self->interface_flow; # shape of contact area - my $contact_loops = 1; + my $contact_loops = $self->object_config->support_material_interface_contact_loops ? 1 : 0; my $circle_radius = 1.5 * $interface_flow->scaled_width; my $circle_distance = 3 * $circle_radius; my $circle = Slic3r::Polygon->new(map [ $circle_radius * cos $_, $circle_radius * sin $_ ], @@ -704,7 +704,10 @@ sub generate_toolpaths { # if no interface layers were requested we treat the contact layer # exactly as a generic base layer push @$base, @$contact; - } elsif (@$contact && $contact_loops > 0) { + } elsif ($contact_loops == 0) { + # No contact loops, but some interface layers. Print the contact layer as a normal interface layer. + push @$interface, @$contact; + } elsif (@$contact) { # generate the outermost loop # find centerline of the external loop (or any other kind of extrusions should the loop be skipped) diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index a56bdcdce..a2a9973de 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1177,6 +1177,13 @@ PrintConfigDef::PrintConfigDef() def->cli = "support-material-extrusion-width=s"; def->default_value = new ConfigOptionFloatOrPercent(0, false); + def = this->add("support_material_interface_contact_loops", coBool); + def->label = "Interface circles"; + def->category = "Support material"; + def->tooltip = "Cover the top most interface layer with contact loops"; + def->cli = "support-material-interface-contact-loops!"; + def->default_value = new ConfigOptionBool(true); + def = this->add("support_material_interface_extruder", coInt); def->label = "Support material/raft interface extruder"; def->category = "Extruders"; @@ -1252,7 +1259,7 @@ PrintConfigDef::PrintConfigDef() def->category = "Support material"; def->tooltip = "Synchronize support layers with the object print layers. This is useful with multi-material printers, where the extruder switch is expensive."; def->cli = "support-material-synchronize-layers!"; - def->default_value = new ConfigOptionBool(true); + def->default_value = new ConfigOptionBool(false); def = this->add("support_material_threshold", coInt); def->label = "Overhang threshold"; diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index f908812fc..8e66d1482 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -153,6 +153,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig ConfigOptionInt support_material_enforce_layers; ConfigOptionInt support_material_extruder; ConfigOptionFloatOrPercent support_material_extrusion_width; + ConfigOptionBool support_material_interface_contact_loops; ConfigOptionInt support_material_interface_extruder; ConfigOptionInt support_material_interface_layers; ConfigOptionFloat support_material_interface_spacing; @@ -186,6 +187,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig OPT_PTR(support_material_buildplate_only); OPT_PTR(support_material_contact_distance); OPT_PTR(support_material_enforce_layers); + OPT_PTR(support_material_interface_contact_loops); OPT_PTR(support_material_extruder); OPT_PTR(support_material_extrusion_width); OPT_PTR(support_material_interface_extruder); diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index 9dcd73d39..e0a287f75 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -197,6 +197,7 @@ PrintObject::invalidate_state_by_config_options(const std::vector