#360 skirt extrusion width

This commit is contained in:
supermerill 2020-08-04 20:10:31 +02:00
parent 75fd53684f
commit 882555895f
6 changed files with 18 additions and 1 deletions

View File

@ -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

View File

@ -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,

View File

@ -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. "

View File

@ -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);

View File

@ -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);

View File

@ -474,6 +474,7 @@ const std::vector<std::string>& 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",