ENH: PR: Alternate extra wall (#3196)

* ENH: PR: Alternate extra wall

* Updated tooltip

* Tooltip spelling correction

* Introduce dialog box to disable ensure vertical shell thickness

* Alternate Extra Wall - automatically disable for Vase mode and revert vase mode toggles

* Corrected invalid push

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Ioannis Giannakas 2023-12-22 00:54:03 +00:00 committed by GitHub
parent e187ada1e9
commit 90097a1926
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 51 additions and 4 deletions

View file

@ -1505,6 +1505,8 @@ void PerimeterGenerator::process_classic()
const Surface &surface = this->slices->surfaces[surface_order[order_idx]];
// detect how many perimeters must be generated for this island
int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops
if (this->config->alternate_extra_wall && this->layer_id % 2 == 1 && !m_spiral_vase) // add alternating extra wall
loop_number++;
if (this->layer_id == 0 && this->config->only_one_wall_first_layer)
loop_number = 0;
// Set the topmost layer to be one wall
@ -1937,6 +1939,8 @@ void PerimeterGenerator::process_arachne()
coord_t bead_width_0 = ext_perimeter_spacing;
// detect how many perimeters must be generated for this island
int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops
if (this->config->alternate_extra_wall && this->layer_id % 2 == 1 && !m_spiral_vase) // add alternating extra wall
loop_number++;
if (this->layer_id == 0 && this->config->only_one_wall_first_layer)
loop_number = 0;
// Orca: set the topmost layer to be one wall according to the config

View file

@ -766,7 +766,7 @@ bool Preset::has_cali_lines(PresetBundle* preset_bundle)
}
static std::vector<std::string> s_Preset_print_options {
"layer_height", "initial_layer_print_height", "wall_loops", "slice_closing_radius", "spiral_mode", "spiral_mode_smooth", "spiral_mode_max_xy_smoothing", "slicing_mode",
"layer_height", "initial_layer_print_height", "wall_loops", "alternate_extra_wall", "slice_closing_radius", "spiral_mode", "spiral_mode_smooth", "spiral_mode_max_xy_smoothing", "slicing_mode",
"top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness",
"extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold","overhang_reverse_internal_only",
"seam_position", "staggered_inner_seams", "wall_sequence", "is_infill_first", "sparse_infill_density", "sparse_infill_pattern", "top_surface_pattern", "bottom_surface_pattern",

View file

@ -3001,6 +3001,13 @@ def = this->add("filament_loading_speed", coFloats);
def->max = 1000;
def->set_default_value(new ConfigOptionInt(2));
def = this->add("alternate_extra_wall", coBool);
def->label = L("Alternate extra wall");
def->category = L("Strength");
def->tooltip = L("This setting adds an extra wall to every other layer. This way the infill gets wedged vertically between the walls, resulting in stronger prints. \n\nWhen this option is enabled, the ensure vertical shell thickness option needs to be disabled. \n\nUsing lightning infill together with this option is not recommended as there is limited infill to anchor the extra perimeters to.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("post_process", coStrings);
def->label = L("Post-processing Scripts");
def->tooltip = L("If you want to process the output G-code through custom scripts, "
@ -5494,6 +5501,7 @@ void DynamicPrintConfig::normalize_fdm(int used_filaments)
}
{
this->opt<ConfigOptionInt>("wall_loops", true)->value = 1;
this->opt<ConfigOptionBool>("alternate_extra_wall", true)->value = false;
this->opt<ConfigOptionInt>("top_shell_layers", true)->value = 0;
this->opt<ConfigOptionPercent>("sparse_infill_density", true)->value = 0;
}
@ -5566,6 +5574,7 @@ void DynamicPrintConfig::normalize_fdm_1()
}
{
this->opt<ConfigOptionInt>("wall_loops", true)->value = 1;
this->opt<ConfigOptionBool>("alternate_extra_wall", true)->value = false;
this->opt<ConfigOptionInt>("top_shell_layers", true)->value = 0;
this->opt<ConfigOptionPercent>("sparse_infill_density", true)->value = 0;
}

View file

@ -853,6 +853,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, inner_wall_speed))
// Total number of perimeters.
((ConfigOptionInt, wall_loops))
((ConfigOptionBool, alternate_extra_wall))
((ConfigOptionFloat, minimum_sparse_infill_area))
((ConfigOptionInt, solid_infill_filament))
((ConfigOptionFloatOrPercent, internal_solid_infill_line_width))

View file

@ -911,6 +911,7 @@ bool PrintObject::invalidate_state_by_config_options(
}
} else if (
opt_key == "wall_loops"
|| opt_key == "alternate_extra_wall"
|| opt_key == "top_one_wall_type"
|| opt_key == "min_width_top_surface"
|| opt_key == "only_one_wall_first_layer"