From bde25143453a09de7e46d435c6982c551870b227 Mon Sep 17 00:00:00 2001 From: igiannakas Date: Wed, 6 Nov 2024 19:32:25 +0000 Subject: [PATCH] Enhancement: ERS segment length - convert to float To allow splitting of line segments down to 0.5mm for improved external surface finish. --- src/libslic3r/PrintConfig.cpp | 10 ++++++---- src/libslic3r/PrintConfig.hpp | 3 ++- src/slic3r/GUI/ConfigManipulation.cpp | 6 +++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index b93e7920d31..74056aa8679 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -3322,16 +3322,18 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(0)); - def = this->add("max_volumetric_extrusion_rate_slope_segment_length", coInt); + def = this->add("max_volumetric_extrusion_rate_slope_segment_length", coFloat); def->label = L("Smoothing segment length"); def->tooltip = L("A lower value results in smoother extrusion rate transitions. However, this results in a significantly larger gcode file " "and more instructions for the printer to process. \n\n" "Default value of 3 works well for most cases. If your printer is stuttering, increase this value to reduce the number of adjustments made\n\n" - "Allowed values: 1-5"); - def->min = 1; + "Allowed values: 0.5-5"); + def->min = 0.5; def->max = 5; + def->sidetext = L("mm"); def->mode = comAdvanced; - def->set_default_value(new ConfigOptionInt(3)); + def->set_default_value(new ConfigOptionFloat(3.0)); + def = this->add("fan_min_speed", coFloats); def->label = L("Fan speed"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index e5255d35374..aa11a152fe5 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1081,7 +1081,8 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionString, time_lapse_gcode)) ((ConfigOptionFloat, max_volumetric_extrusion_rate_slope)) - ((ConfigOptionInt, max_volumetric_extrusion_rate_slope_segment_length)) + ((ConfigOptionFloat, max_volumetric_extrusion_rate_slope_segment_length)) + ((ConfigOptionPercents, retract_before_wipe)) ((ConfigOptionFloats, retraction_length)) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 704fdf0dac1..86a6da95fda 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -494,13 +494,13 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co auto gcflavor = preset_bundle->printers.get_edited_preset().config.option>("gcode_flavor")->value; bool have_volumetric_extrusion_rate_slope = config->option("max_volumetric_extrusion_rate_slope")->value > 0; - int have_volumetric_extrusion_rate_slope_segment_length = config->option("max_volumetric_extrusion_rate_slope_segment_length")->value; + float have_volumetric_extrusion_rate_slope_segment_length = config->option("max_volumetric_extrusion_rate_slope_segment_length")->value; toggle_field("enable_arc_fitting", !have_volumetric_extrusion_rate_slope); toggle_line("max_volumetric_extrusion_rate_slope_segment_length", have_volumetric_extrusion_rate_slope); if(have_volumetric_extrusion_rate_slope) config->set_key_value("enable_arc_fitting", new ConfigOptionBool(false)); - if(have_volumetric_extrusion_rate_slope_segment_length==0) { + if(have_volumetric_extrusion_rate_slope_segment_length < 0.5) { DynamicPrintConfig new_conf = *config; - new_conf.set_key_value("max_volumetric_extrusion_rate_slope_segment_length", new ConfigOptionInt(1)); + new_conf.set_key_value("max_volumetric_extrusion_rate_slope_segment_length", new ConfigOptionFloat(1)); apply(config, &new_conf); }