Add configurable short wall/perimeter cleaning for Arachne (#2790)

* add feature to add configurable value to clean/remove short un-closed walls/perimeters, to improve print times and reduce stringing (and generally lead to a cleaner print).

* fixes to short wall removal, which no longer affects bottom or top surfaces. allowed adjusting Top-surface threshold (renamed from One wall threshold for clarity) when short wall removal value is configured above default of 0.5.

* small fix for toggle_line for min_width_top_surface, to only be visible if min_length_factor > 0.5 and arachne is enabled.

* Use copy of input_params

* revert `One wall threshold"` string change

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Scott Mudge 2024-01-01 17:21:36 -05:00 committed by GitHub
parent 9701ab18e8
commit 209e9a2bb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 79 additions and 28 deletions

View file

@ -695,7 +695,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
bool have_arachne = config->opt_enum<PerimeterGeneratorType>("wall_generator") == PerimeterGeneratorType::Arachne;
for (auto el : { "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
"min_feature_size", "min_bead_width", "wall_distribution_count", "initial_layer_min_bead_width"})
"min_feature_size", "min_length_factor", "min_bead_width", "wall_distribution_count", "initial_layer_min_bead_width"})
toggle_line(el, have_arachne);
toggle_field("detect_thin_wall", !have_arachne);
@ -712,8 +712,8 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
toggle_line("make_overhang_printable_angle", have_make_overhang_printable);
toggle_line("make_overhang_printable_hole_size", have_make_overhang_printable);
toggle_line("min_width_top_surface",config->opt_bool("only_one_wall_top"));
toggle_line("min_width_top_surface", config->opt_bool("only_one_wall_top") || ((config->opt_float("min_length_factor") > 0.5f) && have_arachne)); // 0.5 is default value
for (auto el : { "hole_to_polyhole_threshold", "hole_to_polyhole_twisted" })
toggle_line(el, config->opt_bool("hole_to_polyhole"));