diff --git a/resources/ui_layout/print.ui b/resources/ui_layout/print.ui index 2761c5a52..8e1e148dc 100644 --- a/resources/ui_layout/print.ui +++ b/resources/ui_layout/print.ui @@ -232,6 +232,7 @@ group:Extrusion width setting:solid_infill_extrusion_width setting:top_infill_extrusion_width setting:support_material_extrusion_width + setting:skirt_extrusion_width group:Overlap line:Perimeter overlap setting:label$External:external_perimeter_overlap diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 3c13de3e6..fd1e18210 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1599,7 +1599,9 @@ Flow Print::brim_flow(size_t extruder_id) const Flow Print::skirt_flow(size_t extruder_id) const { - ConfigOptionFloatOrPercent width = m_config.first_layer_extrusion_width; + ConfigOptionFloatOrPercent width = m_config.skirt_extrusion_width; + if (width.value <= 0 && m_config.first_layer_extrusion_width.value > 0) + width = m_config.first_layer_extrusion_width; if (width.value <= 0) width = m_regions.front()->config().perimeter_extrusion_width; if (width.value <= 0) @@ -1610,6 +1612,7 @@ Flow Print::skirt_flow(size_t extruder_id) const extruders and take the one with, say, the smallest index; The same logic should be applied to the code that selects the extruder during G-code generation as well. */ + /* or select the used extruder with the highest nozzle diameter, to be on the safe side.*/ return Flow::new_from_config_width( frPerimeter, width, diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 2396ca1cb..b50617174 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2625,6 +2625,15 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionInt(1)); + def = this->add("skirt_extrusion_width", coFloatOrPercent); + def->label = L("Skirt"); + def->category = OptionCategory::width; + def->tooltip = L("Horizontal width of the skirt that will be printed around each object."); + def->sidetext = L("mm"); + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloatOrPercent(0, false)); + def = this->add("draft_shield", coBool); def->label = L("Draft shield"); def->tooltip = L("If enabled, the skirt will be as tall as a highest printed object. " diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 750c5cf03..72f0e5a85 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1096,6 +1096,7 @@ public: ConfigOptionBools retract_layer_change; ConfigOptionFloat skirt_distance; ConfigOptionInt skirt_height; + ConfigOptionFloatOrPercent skirt_extrusion_width; ConfigOptionBool draft_shield; ConfigOptionInt skirts; ConfigOptionInts slowdown_below_layer_time; @@ -1184,6 +1185,7 @@ protected: OPT_PTR(retract_before_travel); OPT_PTR(retract_layer_change); OPT_PTR(skirt_distance); + OPT_PTR(skirt_extrusion_width); OPT_PTR(skirt_height); OPT_PTR(draft_shield); OPT_PTR(skirts); diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 0cd85481b..71888f365 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -364,6 +364,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config) bool have_skirt = config->opt_int("skirts") > 0; toggle_field("skirt_height", have_skirt && !config->opt_bool("draft_shield")); + toggle_field("skirt_width", have_skirt); for (auto el : { "skirt_distance", "draft_shield", "min_skirt_length" }) toggle_field(el, have_skirt); diff --git a/src/slic3r/GUI/Preset.cpp b/src/slic3r/GUI/Preset.cpp index 20363f1dc..9d10cc16a 100644 --- a/src/slic3r/GUI/Preset.cpp +++ b/src/slic3r/GUI/Preset.cpp @@ -474,6 +474,7 @@ const std::vector& Preset::print_options() "bridge_acceleration", "first_layer_acceleration", "default_acceleration", "duplicate_distance", "skirts", "skirt_distance", "skirt_height", + "skirt_extrusion_width", "min_skirt_length", "draft_shield", "brim_inside_holes",