mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Enhancement: ERS - segment length - convert to float (#7400)
Enhancement: ERS segment length - convert to float To allow splitting of line segments down to 0.5mm for improved external surface finish. Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
bb009eaa99
commit
e62d6a3b68
3 changed files with 11 additions and 8 deletions
|
@ -494,14 +494,14 @@ 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);
|
||||
toggle_line("extrusion_rate_smoothing_external_perimeter_only", 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue