Skip to content

Commit

Permalink
[FEATURE] Per object extrusion multiplier setting
Browse files Browse the repository at this point in the history
  • Loading branch information
mjonuschat committed Dec 30, 2024
1 parent 084f258 commit 78d8e22
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3394,7 +3394,8 @@ std::string GCodeGenerator::_extrude(
}

// calculate extrusion length per distance unit
double e_per_mm = m_writer.extruder()->e_per_mm3() * path_attr.mm3_per_mm;
double e_per_mm = m_writer.extruder()->e_per_mm3() * path_attr.mm3_per_mm *
m_config.print_extrusion_multiplier.value;
if (m_writer.extrusion_axis().empty())
// gcfNoExtrusion
e_per_mm = 0;
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ inline bool has_compatible_layer_regions(const PrintRegionConfig &config, const
config.thin_walls == other_config.thin_walls &&
config.external_perimeters_first == other_config.external_perimeters_first &&
config.infill_overlap == other_config.infill_overlap &&
config.print_extrusion_multiplier == other_config.print_extrusion_multiplier &&
has_compatible_dynamic_overhang_speed(config, other_config);
}

Expand Down
2 changes: 2 additions & 0 deletions src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ static std::vector<std::string> s_Preset_print_options {

"first_layer_flow_ratio",
"top_layer_flow_ratio",

"print_extrusion_multiplier",
};

static std::vector<std::string> s_Preset_filament_options {
Expand Down
13 changes: 13 additions & 0 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,19 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(1));

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

def = this->add("bridge_speed", coFloat);
def->label = L("Bridges");
def->category = L("Speed");
Expand Down
3 changes: 3 additions & 0 deletions src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,10 +767,13 @@ PRINT_CONFIG_CLASS_DEFINE(

// SuperSlicer
((ConfigOptionEnum<InfillPattern>, solid_fill_pattern))

// Reverse extrusion direction
((ConfigOptionBool, overhangs_reverse))
((ConfigOptionBool, infill_reverse))
((ConfigOptionBool, internal_perimeters_reverse))

((ConfigOptionFloat, print_extrusion_multiplier))
)

PRINT_CONFIG_CLASS_DEFINE(
Expand Down

0 comments on commit 78d8e22

Please sign in to comment.