ENH: add back infill anchor for special case

These two settings is necessary for some
specific user case.

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I9d70679932ac90c34296393d0e8bb8aebd8ebe48
This commit is contained in:
salt.wei 2023-05-29 10:15:57 +08:00 committed by Lane.Wei
parent 030275a5a1
commit 3ea602091e
10 changed files with 79 additions and 15 deletions

View file

@ -539,9 +539,12 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
bool have_infill = config->option<ConfigOptionPercent>("sparse_infill_density")->value > 0;
// sparse_infill_filament uses the same logic as in Print::extruders()
for (auto el : { "sparse_infill_pattern", "infill_combination",
for (auto el : { "sparse_infill_pattern", "sparse_infill_anchor_max", "infill_combination",
"minimum_sparse_infill_area", "sparse_infill_filament"})
toggle_line(el, have_infill);
// Only allow configuration of open anchors if the anchoring is enabled.
bool has_infill_anchors = have_infill && config->option<ConfigOptionFloatOrPercent>("sparse_infill_anchor_max")->value > 0;
toggle_line("sparse_infill_anchor", has_infill_anchors);
bool has_spiral_vase = config->opt_bool("spiral_mode");
bool has_top_solid_infill = config->opt_int("top_shell_layers") > 0;