Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libslic3r')
-rw-r--r--src/libslic3r/Config.hpp4
-rw-r--r--src/libslic3r/GCode.cpp218
-rw-r--r--src/libslic3r/Preset.cpp9
-rw-r--r--src/libslic3r/PrintConfig.cpp197
-rw-r--r--src/libslic3r/PrintConfig.hpp16
5 files changed, 277 insertions, 167 deletions
diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp
index 9c172a493..5ecd25ff2 100644
--- a/src/libslic3r/Config.hpp
+++ b/src/libslic3r/Config.hpp
@@ -1844,7 +1844,9 @@ public:
// By setting min=0, only nonnegative input is allowed.
double min = INT_MIN;
double max = INT_MAX;
- // To check if it's not a typo and a % is missing
+ // To check if it's not a typo and a % is missing. Ask for confirmation if the value is higher than that.
+ // if negative, if it's lower than the opposite.
+ // if percentage, multiply by the nozzle_diameter.
FloatOrPercent max_literal = FloatOrPercent{ 0., false };
// max precision after the dot, only for display
int precision = 6;
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp
index b092bb3b9..d8c6d6285 100644
--- a/src/libslic3r/GCode.cpp
+++ b/src/libslic3r/GCode.cpp
@@ -523,6 +523,8 @@ std::string WipeTowerIntegration::post_process_wipe_tower_moves(const WipeTower:
#define EXTRUDER_CONFIG_WITH_DEFAULT(OPT,DEF) (m_writer.tool_is_extruder()?m_config.OPT.get_at(m_writer.tool()->id()):DEF)
#define BOOL_EXTRUDER_CONFIG(OPT) m_writer.tool_is_extruder() && m_config.OPT.get_at(m_writer.tool()->id())
+constexpr float SMALL_PERIMETER_SPEED_RATIO_OFFSET = (-10);
+
// Collect pairs of object_layer + support_layer sorted by print_z.
// object_layer & support_layer are considered to be on the same print_z, if they are not further than EPSILON.
std::vector<GCode::LayerToPrint> GCode::collect_layers_to_print(const PrintObject& object)
@@ -768,34 +770,31 @@ namespace DoExport {
excluded.insert(erMixed);
excluded.insert(erNone);
excluded.insert(erWipeTower);
- if (config->option("perimeter_speed") != nullptr && config->option("perimeter_speed")->getFloat() != 0
- && config->option("small_perimeter_speed") != nullptr && config->option("small_perimeter_speed")->getFloat() != 0) {
+ if (config->option("perimeter_speed") != nullptr && config->get_computed_value("perimeter_speed") != 0) {
excluded.insert(erPerimeter);
excluded.insert(erSkirt);
}
- if (config->option("external_perimeter_speed") != nullptr && config->option("external_perimeter_speed")->getFloat() != 0
- && config->option("small_perimeter_speed") != nullptr && config->option("small_perimeter_speed")->getFloat() != 0)
+ if (config->option("external_perimeter_speed") != nullptr && config->get_computed_value("external_perimeter_speed") != 0)
excluded.insert(erExternalPerimeter);
- if (config->option("overhangs_speed") != nullptr && config->option("overhangs_speed")->getFloat() != 0
- && config->option("small_perimeter_speed") != nullptr && config->option("small_perimeter_speed")->getFloat() != 0)
+ if (config->option("overhangs_speed") != nullptr && config->get_computed_value("overhangs_speed") != 0)
excluded.insert(erOverhangPerimeter);
- if (config->option("gap_fill_speed") != nullptr && config->option("gap_fill_speed")->getFloat() != 0)
+ if (config->option("gap_fill_speed") != nullptr && config->get_computed_value("gap_fill_speed") != 0)
excluded.insert(erGapFill);
- if (config->option("thin_walls_speed") != nullptr && config->option("thin_walls_speed")->getFloat() != 0)
+ if (config->option("thin_walls_speed") != nullptr && config->get_computed_value("thin_walls_speed") != 0)
excluded.insert(erThinWall);
- if (config->option("infill_speed") != nullptr && config->option("infill_speed")->getFloat() != 0)
+ if (config->option("infill_speed") != nullptr && config->get_computed_value("infill_speed") != 0)
excluded.insert(erInternalInfill);
- if (config->option("solid_infill_speed") != nullptr && config->option("solid_infill_speed")->getFloat() != 0)
+ if (config->option("solid_infill_speed") != nullptr && config->get_computed_value("solid_infill_speed") != 0)
excluded.insert(erSolidInfill);
- if (config->option("top_solid_infill_speed") != nullptr && config->option("top_solid_infill_speed")->getFloat() != 0)
+ if (config->option("top_solid_infill_speed") != nullptr && config->get_computed_value("top_solid_infill_speed") != 0)
excluded.insert(erTopSolidInfill);
- if (config->option("bridge_speed") != nullptr && config->option("bridge_speed")->getFloat() != 0)
+ if (config->option("bridge_speed") != nullptr && config->get_computed_value("bridge_speed") != 0)
excluded.insert(erBridgeInfill);
- if (config->option("bridge_speed_internal") != nullptr && config->option("bridge_speed_internal")->getFloat() != 0)
+ if (config->option("bridge_speed_internal") != nullptr && config->get_computed_value("bridge_speed_internal") != 0)
excluded.insert(erInternalBridgeInfill);
- if (config->option("support_material_speed") != nullptr && config->option("support_material_speed")->getFloat() != 0)
+ if (config->option("support_material_speed") != nullptr && config->get_computed_value("support_material_speed") != 0)
excluded.insert(erSupportMaterial);
- if (config->option("support_material_interface_speed") != nullptr && config->option("support_material_interface_speed")->getFloat() != 0)
+ if (config->option("support_material_interface_speed") != nullptr && config->get_computed_value("support_material_interface_speed") != 0)
excluded.insert(erSupportMaterialInterface);
}
virtual void use(const ExtrusionPath& path) override {
@@ -2969,16 +2968,16 @@ std::string GCode::extrude_loop_vase(const ExtrusionLoop &original_loop, const s
if (paths.empty()) return "";
// apply the small/external? perimeter speed
- if (speed == -1 && is_perimeter(paths.front().role())){
+ if (speed == -1 && is_perimeter(paths.front().role()) && paths.front().role() != erThinWall){
coordf_t min_length = scale_d(this->m_config.small_perimeter_min_length.get_abs_value(EXTRUDER_CONFIG_WITH_DEFAULT(nozzle_diameter, 0)));
coordf_t max_length = scale_d(this->m_config.small_perimeter_max_length.get_abs_value(EXTRUDER_CONFIG_WITH_DEFAULT(nozzle_diameter, 0)));
max_length = std::max(min_length, max_length);
if (loop.length() < max_length) {
if (loop.length() <= min_length) {
- speed = m_config.small_perimeter_speed.get_abs_value(m_config.perimeter_speed);
+ speed = SMALL_PERIMETER_SPEED_RATIO_OFFSET;
} else if (max_length > min_length) {
//use a negative speed: it will be use as a ratio when computing the real speed
- speed = -(loop.length() - min_length) / (max_length - min_length);
+ speed = SMALL_PERIMETER_SPEED_RATIO_OFFSET - (loop.length() - min_length) / (max_length - min_length);
}
}
}
@@ -3303,15 +3302,16 @@ std::string GCode::extrude_loop(const ExtrusionLoop &original_loop, const std::s
if (paths.empty()) return "";
// apply the small perimeter speed
- if (speed == -1 && is_perimeter(paths.front().role()) && loop.length() <=
- scale_(this->m_config.small_perimeter_max_length.get_abs_value(EXTRUDER_CONFIG_WITH_DEFAULT(nozzle_diameter, 0)))) {
+ if (speed == -1 && is_perimeter(paths.front().role()) && paths.front().role() != erThinWall) {
double min_length = scale_d(this->m_config.small_perimeter_min_length.get_abs_value(EXTRUDER_CONFIG_WITH_DEFAULT(nozzle_diameter, 0)));
double max_length = scale_d(this->m_config.small_perimeter_max_length.get_abs_value(EXTRUDER_CONFIG_WITH_DEFAULT(nozzle_diameter, 0)));
- if (loop.length() <= min_length) {
- speed = m_config.small_perimeter_speed.get_abs_value(m_config.perimeter_speed);
- } else {
- //set speed between -1 and 0 you have to multiply the real peed by the opposite of that, and add the other part as small_perimeter_speed
- speed = (min_length - loop.length()) / (max_length - min_length);
+ if (loop.length() < max_length) {
+ if (loop.length() <= min_length) {
+ speed = SMALL_PERIMETER_SPEED_RATIO_OFFSET;
+ } else if (max_length > min_length) {
+ //use a negative speed: it will be use as a ratio when computing the real speed
+ speed = SMALL_PERIMETER_SPEED_RATIO_OFFSET - (loop.length() - min_length) / (max_length - min_length);
+ }
}
}
@@ -3869,8 +3869,10 @@ double_t GCode::_compute_speed_mm_per_sec(const ExtrusionPath& path, double spee
float factor = 1;
// set speed
if (speed < 0) {
- //if speed == -1, then it's means "choose yourself, but if it's -1 < speed <0 , then it's a scaling from small_perimeter.
- factor = float(-speed);
+ //if speed == -1, then it's means "choose yourself, but if it's < SMALL_PERIMETER_SPEED_RATIO_OFFSET, then it's a scaling from small_perimeter.
+ if (speed <= SMALL_PERIMETER_SPEED_RATIO_OFFSET) {
+ factor = float(-speed + SMALL_PERIMETER_SPEED_RATIO_OFFSET);
+ }
//it's a bit hacky, so if you want to rework it, help yourself.
if (path.role() == erPerimeter) {
speed = m_config.get_computed_value("perimeter_speed");
@@ -3905,30 +3907,43 @@ double_t GCode::_compute_speed_mm_per_sec(const ExtrusionPath& path, double spee
if (m_volumetric_speed != 0. && speed == 0) {
//if m_volumetric_speed, use the max size for thinwall & gapfill, to avoid variations
double vol_speed = m_volumetric_speed / path.mm3_per_mm;
- if (vol_speed > m_config.max_print_speed.value)
- vol_speed = m_config.max_print_speed.value;
+ double max_print_speed = m_config.get_computed_value("max_print_speed");
+ if (vol_speed > max_print_speed)
+ vol_speed = max_print_speed;
// if using a % of an auto speed, use the % over the volumetric speed.
- if (path.role() == erExternalPerimeter) {
+ if (path.role() == erPerimeter) {
+ speed = m_config.perimeter_speed.get_abs_value(vol_speed);
+ } else if (path.role() == erExternalPerimeter) {
speed = m_config.external_perimeter_speed.get_abs_value(vol_speed);
+ } else if (path.role() == erBridgeInfill) {
+ speed = m_config.bridge_speed.get_abs_value(vol_speed);
} else if (path.role() == erInternalBridgeInfill) {
speed = m_config.bridge_speed_internal.get_abs_value(vol_speed);
} else if (path.role() == erOverhangPerimeter) {
speed = m_config.overhangs_speed.get_abs_value(vol_speed);
+ } else if (path.role() == erInternalInfill) {
+ speed = m_config.infill_speed.get_abs_value(vol_speed);
} else if (path.role() == erSolidInfill) {
speed = m_config.solid_infill_speed.get_abs_value(vol_speed);
} else if (path.role() == erTopSolidInfill) {
speed = m_config.top_solid_infill_speed.get_abs_value(vol_speed);
+ } else if (path.role() == erThinWall) {
+ speed = m_config.thin_walls_speed.get_abs_value(vol_speed);
+ } else if (path.role() == erGapFill) {
+ speed = m_config.gap_fill_speed.get_abs_value(vol_speed);
+ } else if (path.role() == erIroning) {
+ speed = m_config.ironing_speed.get_abs_value(vol_speed);
}
if (speed == 0) {
speed = vol_speed;
}
}
- if (speed == 0) // this code shouldn't trigger as if it's 0, you have to get a m_volumetric_speed
+ if (speed == 0) // if you don't have a m_volumetric_speed
speed = m_config.max_print_speed.value;
// Apply small perimeter 'modifier
// don't modify bridge speed
if (factor < 1 && !(is_bridge(path.role()))) {
- float small_speed = (float)m_config.small_perimeter_speed.get_abs_value(m_config.perimeter_speed);
+ float small_speed = (float)m_config.small_perimeter_speed.get_abs_value(m_config.get_computed_value("perimeter_speed"));
//apply factor between feature speed and small speed
speed = (speed * factor) + double((1.f - factor) * small_speed);
}
@@ -3979,74 +3994,123 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string
switch (path.role()){
case erPerimeter:
perimeter:
- if (m_config.perimeter_acceleration.value > 0)
- acceleration = m_config.get_computed_value("perimeter_acceleration");
+ if (m_config.perimeter_acceleration.value > 0) {
+ double perimeter_acceleration = m_config.get_computed_value("perimeter_acceleration");
+ if (perimeter_acceleration > 0)
+ acceleration = perimeter_acceleration;
+ }
break;
case erExternalPerimeter:
externalPerimeter:
- if (m_config.external_perimeter_acceleration.value > 0)
- acceleration = m_config.get_computed_value("external_perimeter_acceleration");
- else goto perimeter;
- break;
- case erInternalInfill:
- internalInfill:
- if (m_config.infill_acceleration.value > 0)
- acceleration = m_config.get_computed_value("infill_acceleration");
- break;
+ if (m_config.external_perimeter_acceleration.value > 0) {
+ double external_perimeter_acceleration = m_config.get_computed_value("external_perimeter_acceleration");
+ if (external_perimeter_acceleration > 0) {
+ acceleration = external_perimeter_acceleration;
+ break;
+ }
+ }
+ goto perimeter;
case erSolidInfill:
solidInfill:
- if (m_config.solid_infill_acceleration.value > 0)
- acceleration = m_config.get_computed_value("solid_infill_acceleration");
- else goto internalInfill;
+ if (m_config.solid_infill_acceleration.value > 0) {
+ double solid_infill_acceleration = m_config.get_computed_value("solid_infill_acceleration");
+ if (solid_infill_acceleration > 0)
+ acceleration = solid_infill_acceleration;
+ }
break;
+ case erInternalInfill:
+ internalInfill:
+ if (m_config.infill_acceleration.value > 0) {
+ double infill_acceleration = m_config.get_computed_value("infill_acceleration");
+ if (infill_acceleration > 0) {
+ acceleration = infill_acceleration;
+ break;
+ }
+ }
+ goto solidInfill;
case erTopSolidInfill:
topSolidInfill:
- if (m_config.top_solid_infill_acceleration.value > 0)
- acceleration = m_config.get_computed_value("top_solid_infill_acceleration");
- else goto solidInfill;
- break;
+ if (m_config.top_solid_infill_acceleration.value > 0) {
+ double top_solid_infill_acceleration = m_config.get_computed_value("top_solid_infill_acceleration");
+ if (top_solid_infill_acceleration > 0) {
+ acceleration = top_solid_infill_acceleration;
+ break;
+ }
+ }
+ goto solidInfill;
case erIroning:
- if (m_config.ironing_acceleration.value > 0)
- acceleration = m_config.get_computed_value("ironing_acceleration");
- else goto topSolidInfill;
- break;
+ if (m_config.ironing_acceleration.value > 0) {
+ double ironing_acceleration = m_config.get_computed_value("ironing_acceleration");
+ if (ironing_acceleration > 0) {
+ acceleration = ironing_acceleration;
+ break;
+ }
+ }
+ goto topSolidInfill;
case erSupportMaterial:
case erSkirt:
case erWipeTower:
supportMaterial:
- if (m_config.support_material_acceleration.value > 0)
- acceleration = m_config.get_computed_value("support_material_acceleration");
+ if (m_config.support_material_acceleration.value > 0) {
+ double support_material_acceleration = m_config.get_computed_value("support_material_acceleration");
+ if (support_material_acceleration > 0)
+ acceleration = support_material_acceleration;
+ }
break;
case erSupportMaterialInterface:
- if (m_config.support_material_interface_acceleration.value > 0)
- acceleration = m_config.get_computed_value("support_material_interface_acceleration");
- else goto supportMaterial;
- break;
+ if (m_config.support_material_interface_acceleration.value > 0) {
+ double support_material_interface_acceleration = m_config.get_computed_value("support_material_interface_acceleration");
+ if (support_material_interface_acceleration > 0) {
+ acceleration = support_material_interface_acceleration;
+ break;
+ }
+ }
+ goto supportMaterial;
case erBridgeInfill:
bridgeInfill:
- if (m_config.bridge_acceleration.value > 0)
- acceleration = m_config.get_computed_value("bridge_acceleration");
+ if (m_config.bridge_acceleration.value > 0) {
+ double bridge_acceleration = m_config.get_computed_value("bridge_acceleration");
+ if (bridge_acceleration > 0)
+ acceleration = bridge_acceleration;
+ }
break;
case erInternalBridgeInfill:
- if (m_config.bridge_internal_acceleration.value > 0)
- acceleration = m_config.get_computed_value("bridge_internal_acceleration");
- else goto bridgeInfill;
- break;
+ if (m_config.bridge_internal_acceleration.value > 0) {
+ double bridge_internal_acceleration = m_config.get_computed_value("bridge_internal_acceleration");
+ if (bridge_internal_acceleration > 0) {
+ acceleration = bridge_internal_acceleration;
+ break;
+ }
+ }
+ goto bridgeInfill;
case erOverhangPerimeter:
- if (m_config.overhangs_acceleration.value > 0)
- acceleration = m_config.get_computed_value("overhangs_acceleration");
- else goto bridgeInfill;
- break;
+ if (m_config.overhangs_acceleration.value > 0) {
+ double overhangs_acceleration = m_config.get_computed_value("overhangs_acceleration");
+ if (overhangs_acceleration > 0) {
+ acceleration = overhangs_acceleration;
+ break;
+ }
+ }
+ goto bridgeInfill;
case erGapFill:
- if (m_config.gap_fill_acceleration.value > 0)
- acceleration = m_config.get_computed_value("gap_fill_acceleration");
- else goto internalInfill;
+ if (m_config.gap_fill_acceleration.value > 0) {
+ double gap_fill_acceleration = m_config.get_computed_value("gap_fill_acceleration");
+ if (gap_fill_acceleration > 0) {
+ acceleration = gap_fill_acceleration;
+ break;
+ }
+ }
+ goto perimeter;
break;
case erThinWall:
- if (m_config.thin_walls_acceleration.value > 0)
- acceleration = m_config.get_computed_value("thin_walls_acceleration");
- else goto externalPerimeter;
- break;
+ if (m_config.thin_walls_acceleration.value > 0) {
+ double thin_walls_acceleration = m_config.get_computed_value("thin_walls_acceleration");
+ if (thin_walls_acceleration > 0) {
+ acceleration = thin_walls_acceleration;
+ break;
+ }
+ }
+ goto externalPerimeter;
case erMilling:
case erCustom:
case erMixed:
diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp
index eac3cdffd..f230f9fe5 100644
--- a/src/libslic3r/Preset.cpp
+++ b/src/libslic3r/Preset.cpp
@@ -491,17 +491,16 @@ const std::vector<std::string>& Preset::print_options()
"fill_angle_increment",
"bridge_angle",
"solid_infill_below_area", "only_retract_when_crossing_perimeters", "infill_first",
- "max_print_speed",
- "max_volumetric_speed",
"avoid_crossing_perimeters_max_detour",
#ifdef HAS_PRESSURE_EQUALIZER
"max_volumetric_extrusion_rate_slope_positive", "max_volumetric_extrusion_rate_slope_negative",
#endif /* HAS_PRESSURE_EQUALIZER */
"min_width_top_surface",
+ // speeds
+ "default_speed",
"bridge_speed",
"bridge_speed_internal",
- // speeds
- "external_perimeter_speed",
+ "external_perimeter_speed",
"first_layer_speed",
"first_layer_min_speed",
"infill_speed",
@@ -515,6 +514,8 @@ const std::vector<std::string>& Preset::print_options()
"support_material_xy_spacing",
"top_solid_infill_speed",
"travel_speed", "travel_speed_z",
+ "max_print_speed",
+ "max_volumetric_speed",
// gapfill
"gap_fill",
"gap_fill_last",
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp
index ebfa8f8ce..7a0903bf0 100644
--- a/src/libslic3r/PrintConfig.cpp
+++ b/src/libslic3r/PrintConfig.cpp
@@ -442,16 +442,19 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert;
def->set_default_value(new ConfigOptionPercent(90));
- def = this->add("bridge_speed", coFloat);
+ def = this->add("bridge_speed", coFloatOrPercent);
def->label = L("Bridges");
def->full_label = L("Bridge speed");
def->category = OptionCategory::speed;
- def->tooltip = L("Speed for printing bridges.");
- def->sidetext = L("mm/s");
+ def->tooltip = L("Speed for printing bridges."
+ "\nThis can be expressed as a percentage (for example: 60%) over the Default speed."
+ "\nSet zero to use the autospeed for this feature");
+ def->sidetext = L("mm/s or %");
def->aliases = { "bridge_feed_rate" };
+ def->ratio_over = "default_speed";
def->min = 0;
def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(60));
+ def->set_default_value(new ConfigOptionFloatOrPercent(60, true));
def = this->add("bridge_speed_internal", coFloatOrPercent);
def->label = L("Internal bridges");
@@ -461,7 +464,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "bridge_speed";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comExpert;
def->set_default_value(new ConfigOptionFloatOrPercent(150,true));
def = this->add("brim_inside_holes", coBool);
@@ -685,15 +688,15 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::speed;
def->full_label = L("Default acceleration");
def->tooltip = L("This is the acceleration your printer will be reset to after "
- "the role-specific acceleration values are used (perimeter/infill). "
- "\nYou can set it as a % of the max of the X machine acceleration limit."
- "\nSet zero to prevent resetting acceleration at all.");
+ "the role-specific acceleration values are used (perimeter/infill). "
+ "\nThis can be expressed as a percentage (for example: 80%) over the machine Max Acceleration for X axis."
+ "\nSet zero to prevent resetting acceleration at all.");
def->sidetext = L("mm/s² or %");
def->ratio_over = "machine_max_acceleration_x";
def->min = 0;
def->max_literal = { -200, false };
def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
+ def->set_default_value(new ConfigOptionFloatOrPercent(0, false));
def = this->add("default_filament_profile", coStrings);
def->label = L("Default filament profile");
@@ -709,6 +712,19 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionString());
def->cli = ConfigOptionDef::nocli;
+ def = this->add("default_speed", coFloatOrPercent);
+ def->label = L("Default");
+ def->category = OptionCategory::speed;
+ def->full_label = L("Default speed");
+ def->tooltip = L("This is the reference speed that other 'main' speed can reference to by a %. This setting doesn't do anythign by itself"
+ "\nThis can be expressed as a percentage (for example: 80%) over the machine Max Feedrate for X axis."
+ "\nSet zero to use autospeed for speed fields using a % of this setting.");
+ def->sidetext = L("mm/s or %");
+ def->ratio_over = "machine_max_feedrate_x";
+ def->min = 0;
+ def->mode = comAdvanced;
+ def->set_default_value(new ConfigOptionFloatOrPercent(100, false));
+
def = this->add("disable_fan_first_layers", coInts);
def->label = L("Disable fan for the first");
def->category = OptionCategory::cooling;
@@ -1023,12 +1039,12 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("External perimeters speed");
def->category = OptionCategory::speed;
def->tooltip = L("This separate setting will affect the speed of external perimeters (the visible ones). "
- "If expressed as percentage (for example: 80%) it will be calculated "
- "on the perimeters speed setting above. Set to zero for auto.");
+ "\nIf expressed as percentage (for example: 80%) it will be calculated over the Internal Perimeters speed setting."
+ "\nSet zero to use autospeed for this feature.");
def->sidetext = L("mm/s or %");
def->ratio_over = "perimeter_speed";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comExpert;
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("external_perimeters_first", coBool);
@@ -2080,10 +2096,10 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Gap fill acceleration");
def->category = OptionCategory::speed;
def->tooltip = L("This is the acceleration your printer will use for gap fills. "
- "\nCan be a % of the infill acceleration"
- "\nSet zero to use infill acceleration for gap fills.");
+ "\nThis can be expressed as a percentage over the perimeter acceleration."
+ "\nSet zero to use perimeter acceleration for gap fills.");
def->sidetext = L("mm/s² or %");
- def->ratio_over = "infill_acceleration";
+ def->ratio_over = "perimeter_acceleration";
def->min = 0;
def->max_literal = { -200, false };
def->mode = comExpert;
@@ -2120,17 +2136,19 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert;
def->set_default_value(new ConfigOptionPercent(100));
- def = this->add("gap_fill_speed", coFloat);
+ def = this->add("gap_fill_speed", coFloatOrPercent);
def->label = L("Gap fill");
def->full_label = L("Gap fill speed");
def->category = OptionCategory::speed;
def->tooltip = L("Speed for filling small gaps using short zigzag moves. Keep this reasonably low "
"to avoid too much shaking and resonance issues."
- "\nGap fill extrusions are ignored from the automatic volumetric speed computation, unless you set it to 0.");
- def->sidetext = L("mm/s");
+ "\nGap fill extrusions are ignored from the automatic volumetric speed computation, unless you set it to 0."
+ "\nThis can be expressed as a percentage (for example: 80%) over the Internal Perimeter speed.");
+ def->sidetext = L("mm/s or %");
+ def->ratio_over = "perimeter_speed";
def->min = 0;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(20));
+ def->mode = comExpert;
+ def->set_default_value(new ConfigOptionFloatOrPercent(50,true));
def = this->add("gcode_comments", coBool);
def->label = L("Verbose G-code");
@@ -2232,11 +2250,11 @@ void PrintConfigDef::init_fff_params()
def->label = L("Sparse");
def->full_label = L("Infill acceleration");
def->category = OptionCategory::speed;
- def->tooltip = L("This is the acceleration your printer will use for infill."
- "\nCan be a % of the default acceleration"
- "\nSet zero to use default acceleration for infill.");
+ def->tooltip = L("This is the acceleration your printer will use for Sparse infill."
+ "\nCan be a % of the solid infill acceleration"
+ "\nSet zero to use solid infill acceleration for infill.");
def->sidetext = L("mm/s² or %");
- def->ratio_over = "default_acceleration";
+ def->ratio_over = "solid_infill_acceleration";
def->min = 0;
def->max_literal = { -200, false };
def->mode = comAdvanced;
@@ -2476,16 +2494,19 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert;
def->set_default_value(new ConfigOptionFloatOrPercent(25, true));
- def = this->add("infill_speed", coFloat);
+ def = this->add("infill_speed", coFloatOrPercent);
def->label = L("Sparse");
def->full_label = L("Sparse infill speed");
def->category = OptionCategory::speed;
- def->tooltip = L("Speed for printing the internal fill. Set to zero for auto.");
- def->sidetext = L("mm/s");
+ def->tooltip = L("Speed for printing the internal fill."
+ "\nThis can be expressed as a percentage (for example: 80%) over the Solid Infill speed."
+ "\nSet zero to use autospeed for this feature.");
+ def->sidetext = L("mm/s or %");
+ def->ratio_over = "solid_infill_speed";
def->aliases = { "print_feed_rate", "infill_feed_rate" };
def->min = 0;
def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(80));
+ def->set_default_value(new ConfigOptionFloatOrPercent(300, true));
def = this->add("inherits", coString);
def->label = L("Inherits profile");
@@ -2522,7 +2543,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Ironing acceleration");
def->category = OptionCategory::speed;
def->tooltip = L("This is the acceleration your printer will use for ironing. "
- "\nCan be a % of the top layer infill acceleration"
+ "\nCan be a % of the top solid infill acceleration"
"\nSet zero to use top solid infill acceleration for ironing.");
def->sidetext = L("mm/s² or %");
def->ratio_over = "top_solid_infill_acceleration";
@@ -2576,15 +2597,16 @@ void PrintConfigDef::init_fff_params()
def = this->add("ironing_speed", coFloatOrPercent);
def->label = L("Ironing");
+ def->full_label = L("Ironing speed");
def->category = OptionCategory::ironing;
def->tooltip = L("Ironing speed. Used for the ironing pass of the ironing infill pattern, and the post-process infill."
- " Can be defined as mm.s, or a % of the top solid infill speed."
+ "\nThis can be expressed as a percentage (for example: 80%) over the Top Solid Infill speed."
"\nIroning extrusions are ignored from the automatic volumetric speed computation.");
def->sidetext = L("mm/s");
def->ratio_over = "top_solid_infill_speed";
def->min = 0.1;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloatOrPercent(15, false));
+ def->mode = comExpert;
+ def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("layer_gcode", coString);
def->label = L("After layer change G-code");
@@ -2877,16 +2899,19 @@ void PrintConfigDef::init_fff_params()
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloatsOrPercents{ FloatOrPercent{ 75, true} });
- def = this->add("max_print_speed", coFloat);
+ def = this->add("max_print_speed", coFloatOrPercent);
def->label = L("Max print speed");
+ def->full_label = L("Max print speed for Autospeed");
def->category = OptionCategory::speed;
def->tooltip = L("When setting other speed settings to 0, Slic3r will autocalculate the optimal speed "
"in order to keep constant extruder pressure. This experimental setting is used "
- "to set the highest print speed you want to allow.");
- def->sidetext = L("mm/s");
+ "to set the highest print speed you want to allow."
+ "\nThis can be expressed as a percentage (for example: 100%) over the machine Max Feedrate for X axis.");
+ def->sidetext = L("mm/s or %");
+ def->ratio_over = "machine_max_acceleration_x";
def->min = 1;
def->mode = comExpert;
- def->set_default_value(new ConfigOptionFloat(80));
+ def->set_default_value(new ConfigOptionFloatOrPercent(80, false));
def = this->add("max_speed_reduction", coPercents);
def->label = L("Max speed reduction");
@@ -2900,10 +2925,12 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionPercents{ 90 });
def = this->add("max_volumetric_speed", coFloat);
- def->label = L("Max volumetric speed");
+ def->label = L("Volumetric speed");
+ def->full_label = L("Volumetric speed for Autospeed");
def->category = OptionCategory::extruders;
- def->tooltip = L("This experimental setting is used to set the maximum volumetric speed your "
- "extruder supports.");
+ def->tooltip = L("This setting allow you to set the desired flow rate for the autospeed algorithm. It tries to keep a constant feedrate for the entire object."
+ "\nThe autospeed is only enable on speed field that have a value of 0. If a speed field is a % of a 0 field, then it will be a % of the value it should have got from the autospeed."
+ "\nIf this field is set to 0, then there is no autospeed. If a speed value i still set to 0, it will get the max speed");
def->sidetext = L("mm³/s");
def->min = 0;
def->mode = comExpert;
@@ -3147,11 +3174,13 @@ void PrintConfigDef::init_fff_params()
def->label = L("Overhangs");
def->full_label = L("Overhangs speed");
def->category = OptionCategory::speed;
- def->tooltip = L("Speed for printing overhangs.\nCan be a % of the bridge speed.");
+ def->tooltip = L("Speed for printing overhangs."
+ "\nCan be a % of the bridge speed."
+ "\nSet zero to use autospeed for this feature.");
def->sidetext = L("mm/s");
def->ratio_over = "bridge_speed";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comExpert;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
def = this->add("overhangs_width_speed", coFloatOrPercent);
@@ -3309,16 +3338,19 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true, false));
- def = this->add("perimeter_speed", coFloat);
+ def = this->add("perimeter_speed", coFloatOrPercent);
def->label = L("Internal");
def->full_label = L("Internal perimeters speed");
def->category = OptionCategory::speed;
- def->tooltip = L("Speed for perimeters (contours, aka vertical shells). Set to zero for auto.");
- def->sidetext = L("mm/s");
+ def->tooltip = L("Speed for perimeters (contours, aka vertical shells)."
+ "\nThis can be expressed as a percentage (for example: 80%) over the Default speed."
+ "\nSet zero to use autospeed for this feature.");
+ def->sidetext = L("mm/s or %");
def->aliases = { "perimeter_feed_rate" };
+ def->ratio_over = "default_speed";
def->min = 0;
def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(60));
+ def->set_default_value(new ConfigOptionFloatOrPercent(60, true));
def = this->add("perimeters", coInt);
def->label = L("Perimeters");
@@ -3760,14 +3792,13 @@ void PrintConfigDef::init_fff_params()
def->label = L("Speed");
def->full_label = L("Small perimeters speed");
def->category = OptionCategory::speed;
- def->tooltip = L("This separate setting will affect the speed of perimeters having radius <= 6.5mm "
- "(usually holes). If expressed as percentage (for example: 80%) it will be calculated "
- "on the perimeters speed setting above. Set to zero for auto.");
+ def->tooltip = L("This separate setting will affect the speed of perimeters having radius <= 6.5mm (usually holes)."
+ "\nIf expressed as percentage (for example: 80%) it will be calculated on the Internal Perimeters speed setting above. Set zero for auto.");
def->sidetext = L("mm/s or %");
def->ratio_over = "perimeter_speed";
def->min = 0;
def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloatOrPercent(15, false));
+ def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("small_perimeter_min_length", coFloatOrPercent);
def->label = L("Min length");
@@ -3921,14 +3952,14 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Solid infill speed");
def->category = OptionCategory::speed;
def->tooltip = L("Speed for printing solid regions (top/bottom/internal horizontal shells). "
- "This can be expressed as a percentage (for example: 80%) over the default infill speed."
- " Set to zero for auto.");
+ "\nThis can be expressed as a percentage (for example: 80%) over the Default speed."
+ "\nSet zero to use autospeed for this feature.");
def->sidetext = L("mm/s or %");
- def->ratio_over = "infill_speed";
+ def->ratio_over = "default_speed";
def->aliases = { "solid_infill_feed_rate" };
def->min = 0;
def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloatOrPercent(20, false));
+ def->set_default_value(new ConfigOptionFloatOrPercent(30, true));
def = this->add("solid_layers", coInt);
def->label = L("Solid layers");
@@ -4078,13 +4109,13 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Solid acceleration");
def->category = OptionCategory::speed;
def->tooltip = L("This is the acceleration your printer will use for solid infills. "
- "\nCan be a % of the infill acceleration"
- "\nSet zero to use infill acceleration for solid infills.");
+ "\nCan be a % of the default acceleration"
+ "\nSet zero to use default acceleration for solid infills.");
def->sidetext = L("mm/s² or %");
- def->ratio_over = "infill_acceleration";
+ def->ratio_over = "default_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("solid_over_perimeters", coInt);
@@ -4301,13 +4332,14 @@ void PrintConfigDef::init_fff_params()
def->label = L("Interface");
def->full_label = L("Support interface speed");
def->category = OptionCategory::support;
- def->tooltip = L("Speed for printing support material interface layers. If expressed as percentage "
- "(for example 50%) it will be calculated over support material speed.");
+ def->tooltip = L("Speed for printing support material interface layers."
+ "\nIf expressed as percentage (for example 50%) it will be calculated over support material speed."
+ "\nSet zero to use autospeed for this feature.");
def->sidetext = L("mm/s or %");
def->ratio_over = "support_material_speed";
def->min = 0;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
+ def->mode = comExpert;
+ def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("support_material_pattern", coEnum);
def->label = L("Pattern");
@@ -4356,15 +4388,18 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(2.5));
- def = this->add("support_material_speed", coFloat);
+ def = this->add("support_material_speed", coFloatOrPercent);
def->label = L("Default");
def->full_label = L("Support speed");
def->category = OptionCategory::support;
- def->tooltip = L("Speed for printing support material.");
- def->sidetext = L("mm/s");
+ def->tooltip = L("Speed for printing support material."
+ "\nThis can be expressed as a percentage (for example: 80%) over the Default speed."
+ "\nSet zero to use autospeed for this feature.");
+ def->sidetext = L("mm/s or %");
+ def->ratio_over = "default_speed";
def->min = 0;
def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(60));
+ def->set_default_value(new ConfigOptionFloatOrPercent(60, true));
def = this->add("support_material_synchronize_layers", coBool);
def->label = L("Synchronize with object layers");
@@ -4497,15 +4532,18 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
- def = this->add("thin_walls_speed", coFloat);
+ def = this->add("thin_walls_speed", coFloatOrPercent);
def->label = L("Thin walls");
def->full_label = L("Thin walls speed");
def->category = OptionCategory::speed;
- def->tooltip = L("Speed for thin walls (external extrusions that are alone because the obect is too thin at these places).");
- def->sidetext = L("mm/s");
+ def->tooltip = L("Speed for thin walls (external extrusions that are alone because the obect is too thin at these places)."
+ "\nThis can be expressed as a percentage (for example: 80%) over the External Perimeter speed."
+ "\nSet zero to use autospeed for this feature.");
+ def->sidetext = L("mm/s or %");
+ def->ratio_over = "external_perimeter_speed";
def->min = 0;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(30));
+ def->mode = comExpert;
+ def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
def = this->add("threads", coInt);
def->label = L("Threads");
@@ -4594,7 +4632,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "solid_infill_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comAdvanced;
+ def->mode = comExpert;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("top_solid_infill_speed", coFloatOrPercent);
@@ -4603,14 +4641,14 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::speed;
def->tooltip = L("Speed for printing top solid layers (it only applies to the uppermost "
"external layers and not to their internal solid layers). You may want "
- "to slow down this to get a nicer surface finish. This can be expressed "
- "as a percentage (for example: 80%) over the solid infill speed above. "
- "Set to zero for auto.");
+ "to slow down this to get a nicer surface finish."
+ "\nThis can be expressed as a percentage (for example: 80%) over the Solid Infill speed."
+ "\nSet zero to use autospeed for this feature.");
def->sidetext = L("mm/s or %");
def->ratio_over = "solid_infill_speed";
def->min = 0;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloatOrPercent(15, false));
+ def->mode = comExpert;
+ def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("top_solid_layers", coInt);
//TRN To be shown in Print Settings "Top solid layers"
@@ -6120,6 +6158,7 @@ std::unordered_set<std::string> prusa_export_to_remove_keys = {
"curve_smoothing_angle_convex",
"curve_smoothing_cutoff_dist",
"curve_smoothing_precision",
+"default_speed",
"enforce_full_fill_volume",
"exact_last_layer_height",
"external_infill_margin",
@@ -6301,8 +6340,10 @@ void PrintConfigDef::to_prusa(t_config_option_key& opt_key, std::string& value,
}
} else if ("elephant_foot_min_width" == opt_key) {
opt_key = "elefant_foot_min_width";
- } else if("first_layer_acceleration" == opt_key || "infill_acceleration" == opt_key || "bridge_acceleration" == opt_key || "default_acceleration" == opt_key || "perimeter_acceleration" == opt_key
- || "overhangs_speed" == opt_key || "ironing_speed" == opt_key){
+ } else if ("first_layer_acceleration" == opt_key || "infill_acceleration" == opt_key || "bridge_acceleration" == opt_key || "default_acceleration" == opt_key || "perimeter_acceleration" == opt_key
+ || "overhangs_speed" == opt_key || "ironing_speed" == opt_key || "perimeter_speed" == opt_key || "infill_speed" == opt_key || "bridge_speed" == opt_key || "support_material_speed" == opt_key
+ || "max_print_speed" == opt_key
+ ) {
// remove '%'
if (value.find("%") != std::string::npos) {
value = std::to_string(all_conf.get_computed_value(opt_key));
diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp
index 692251610..c2416d66c 100644
--- a/src/libslic3r/PrintConfig.hpp
+++ b/src/libslic3r/PrintConfig.hpp
@@ -702,7 +702,7 @@ public:
ConfigOptionEnum<SupportMaterialPattern> support_material_pattern;
// Spacing between support material lines (the hatching distance).
ConfigOptionFloat support_material_spacing;
- ConfigOptionFloat support_material_speed;
+ ConfigOptionFloatOrPercent support_material_speed;
ConfigOptionBool support_material_solid_first_layer;
ConfigOptionBool support_material_synchronize_layers;
// Overhang angle threshold.
@@ -793,12 +793,13 @@ public:
ConfigOptionPercent bridge_overlap_min;
ConfigOptionEnum<InfillPattern> bottom_fill_pattern;
ConfigOptionFloatOrPercent bridged_infill_margin;
- ConfigOptionFloat bridge_speed;
+ ConfigOptionFloatOrPercent bridge_speed;
ConfigOptionFloatOrPercent bridge_speed_internal;
ConfigOptionFloat curve_smoothing_precision;
ConfigOptionFloat curve_smoothing_cutoff_dist;
ConfigOptionFloat curve_smoothing_angle_convex;
ConfigOptionFloat curve_smoothing_angle_concave;
+ ConfigOptionFloatOrPercent default_speed;
ConfigOptionBool ensure_vertical_shell_thickness;
ConfigOptionBool enforce_full_fill_volume;
ConfigOptionFloatOrPercent external_infill_margin;
@@ -826,7 +827,7 @@ public:
ConfigOptionBool gap_fill_last;
ConfigOptionFloatOrPercent gap_fill_min_area;
ConfigOptionPercent gap_fill_overlap;
- ConfigOptionFloat gap_fill_speed;
+ ConfigOptionFloatOrPercent gap_fill_speed;
ConfigOptionFloatOrPercent infill_anchor;
ConfigOptionFloatOrPercent infill_anchor_max;
ConfigOptionBool hole_to_polyhole;
@@ -836,7 +837,7 @@ public:
ConfigOptionFloatOrPercent infill_extrusion_width;
ConfigOptionInt infill_every_layers;
ConfigOptionFloatOrPercent infill_overlap;
- ConfigOptionFloat infill_speed;
+ ConfigOptionFloatOrPercent infill_speed;
ConfigOptionEnum<InfillConnection> infill_connection;
ConfigOptionEnum<InfillConnection> infill_connection_solid;
ConfigOptionEnum<InfillConnection> infill_connection_top;
@@ -870,7 +871,7 @@ public:
ConfigOptionBool perimeter_loop;
ConfigOptionEnum<SeamPosition> perimeter_loop_seam;
ConfigOptionPercent perimeter_overlap;
- ConfigOptionFloat perimeter_speed;
+ ConfigOptionFloatOrPercent perimeter_speed;
// Total number of perimeters.
ConfigOptionInt perimeters;
ConfigOptionPercent print_extrusion_multiplier;
@@ -892,7 +893,7 @@ public:
ConfigOptionBool thin_walls;
ConfigOptionFloatOrPercent thin_walls_min_width;
ConfigOptionFloatOrPercent thin_walls_overlap;
- ConfigOptionFloat thin_walls_speed;
+ ConfigOptionFloatOrPercent thin_walls_speed;
ConfigOptionEnum<InfillPattern> top_fill_pattern;
ConfigOptionFloatOrPercent top_infill_extrusion_width;
ConfigOptionInt top_solid_layers;
@@ -918,6 +919,7 @@ protected:
OPT_PTR(curve_smoothing_cutoff_dist);
OPT_PTR(curve_smoothing_angle_convex);
OPT_PTR(curve_smoothing_angle_concave);
+ OPT_PTR(default_speed);
OPT_PTR(ensure_vertical_shell_thickness);
OPT_PTR(enforce_full_fill_volume);
OPT_PTR(external_infill_margin);
@@ -1133,7 +1135,7 @@ public:
ConfigOptionString layer_gcode;
ConfigOptionString feature_gcode;
ConfigOptionFloat max_gcode_per_second;
- ConfigOptionFloat max_print_speed;
+ ConfigOptionFloatOrPercent max_print_speed;
ConfigOptionFloat max_volumetric_speed;
#ifdef HAS_PRESSURE_EQUALIZER
ConfigOptionFloat max_volumetric_extrusion_rate_slope_positive;