Skip to content

Commit 216a7e4

Browse files
committed
[FEATURE] Per object extrusion multiplier setting
1 parent 26ff8e0 commit 216a7e4

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

src/libslic3r/GCode.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3394,7 +3394,8 @@ std::string GCodeGenerator::_extrude(
33943394
}
33953395

33963396
// calculate extrusion length per distance unit
3397-
double e_per_mm = m_writer.extruder()->e_per_mm3() * path_attr.mm3_per_mm;
3397+
double e_per_mm = m_writer.extruder()->e_per_mm3() * path_attr.mm3_per_mm *
3398+
m_config.print_extrusion_multiplier.value;
33983399
if (m_writer.extrusion_axis().empty())
33993400
// gcfNoExtrusion
34003401
e_per_mm = 0;

src/libslic3r/Layer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ inline bool has_compatible_layer_regions(const PrintRegionConfig &config, const
661661
config.thin_walls == other_config.thin_walls &&
662662
config.external_perimeters_first == other_config.external_perimeters_first &&
663663
config.infill_overlap == other_config.infill_overlap &&
664+
config.print_extrusion_multiplier == other_config.print_extrusion_multiplier &&
664665
has_compatible_dynamic_overhang_speed(config, other_config);
665666
}
666667

src/libslic3r/Preset.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@ static std::vector<std::string> s_Preset_print_options {
570570

571571
"first_layer_flow_ratio",
572572
"top_layer_flow_ratio",
573+
574+
"print_extrusion_multiplier",
573575
};
574576

575577
static std::vector<std::string> s_Preset_filament_options {

src/libslic3r/PrintConfig.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,19 @@ void PrintConfigDef::init_fff_params()
766766
def->mode = comAdvanced;
767767
def->set_default_value(new ConfigOptionFloat(1));
768768

769+
def = this->add("print_extrusion_multiplier", coFloat);
770+
def->label = L("Extrusion multiplier");
771+
def->category = L("Advanced");
772+
def->tooltip = L("This factor changes the amount of flow proportionally. You may need to tweak "
773+
"this setting to get nice surface finish and correct single wall widths. "
774+
"Usual values are between 90% and 110%. This print setting is multiplied "
775+
"with the extrusion_multiplier from the filament tab. Its only purpose is to "
776+
"offer the same functionality but on a per-object basis.");
777+
def->mode = comAdvanced;
778+
def->min = 0.5;
779+
def->max = 1.5;
780+
def->set_default_value(new ConfigOptionFloat(1));
781+
769782
def = this->add("bridge_speed", coFloat);
770783
def->label = L("Bridges");
771784
def->category = L("Speed");

src/libslic3r/PrintConfig.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,10 +767,13 @@ PRINT_CONFIG_CLASS_DEFINE(
767767

768768
// SuperSlicer
769769
((ConfigOptionEnum<InfillPattern>, solid_fill_pattern))
770+
770771
// Reverse extrusion direction
771772
((ConfigOptionBool, overhangs_reverse))
772773
((ConfigOptionBool, infill_reverse))
773774
((ConfigOptionBool, internal_perimeters_reverse))
775+
776+
((ConfigOptionFloat, print_extrusion_multiplier))
774777
)
775778

776779
PRINT_CONFIG_CLASS_DEFINE(

0 commit comments

Comments
 (0)