Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: ERS - segment length - convert to float #7400

Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3345,16 +3345,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");
Expand Down
3 changes: 2 additions & 1 deletion src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,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))
Expand Down
6 changes: 3 additions & 3 deletions src/slic3r/GUI/ConfigManipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,13 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
auto gcflavor = preset_bundle->printers.get_edited_preset().config.option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;

bool have_volumetric_extrusion_rate_slope = config->option<ConfigOptionFloat>("max_volumetric_extrusion_rate_slope")->value > 0;
int have_volumetric_extrusion_rate_slope_segment_length = config->option<ConfigOptionInt>("max_volumetric_extrusion_rate_slope_segment_length")->value;
float have_volumetric_extrusion_rate_slope_segment_length = config->option<ConfigOptionFloat>("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);
}

Expand Down
Loading