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

@ -277,7 +277,6 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
sparse_infill_density == 0 &&
! config->opt_bool("enable_support") &&
config->opt_int("enforce_support_layers") == 0 &&
config->opt_bool("ensure_vertical_shell_thickness") &&
! config->opt_bool("detect_thin_wall") &&
! config->opt_bool("overhang_reverse") &&
config->opt_enum<TimelapseType>("timelapse_type") == TimelapseType::tlTraditional))
@ -305,7 +304,6 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
new_conf.set_key_value("sparse_infill_density", new ConfigOptionPercent(0));
new_conf.set_key_value("enable_support", new ConfigOptionBool(false));
new_conf.set_key_value("enforce_support_layers", new ConfigOptionInt(0));
new_conf.set_key_value("ensure_vertical_shell_thickness", new ConfigOptionBool(true));
new_conf.set_key_value("detect_thin_wall", new ConfigOptionBool(false));
new_conf.set_key_value("overhang_reverse", new ConfigOptionBool(false));
new_conf.set_key_value("timelapse_type", new ConfigOptionEnum<TimelapseType>(tlTraditional));
@ -326,6 +324,30 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
}
is_msg_dlg_already_exist = false;
}
if (config->opt_bool("alternate_extra_wall") && config->opt_bool("ensure_vertical_shell_thickness"))
{
wxString msg_text = _(L("Alternate extra wall only works with ensure vertical shell thickness disabled. "));
if (is_global_config)
msg_text += "\n\n" + _(L("Change these settings automatically? \n"
"Yes - Disable ensure vertical shell thickness and enable alternate extra wall\n"
"No - Dont use alternate extra wall"));
MessageDialog dialog(m_msg_dlg_parent, msg_text, "",
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
DynamicPrintConfig new_conf = *config;
auto answer = dialog.ShowModal();
if (!is_global_config || answer == wxID_YES) {
new_conf.set_key_value("ensure_vertical_shell_thickness", new ConfigOptionBool(false));
new_conf.set_key_value("alternate_extra_wall", new ConfigOptionBool(true));
}
else {
new_conf.set_key_value("ensure_vertical_shell_thickness", new ConfigOptionBool(true));
new_conf.set_key_value("alternate_extra_wall", new ConfigOptionBool(false));
}
apply(config, &new_conf);
}
// BBS
int filament_cnt = wxGetApp().preset_bundle->filament_presets.size();

View file

@ -8968,6 +8968,7 @@ void Plater::_calib_pa_tower(const Calib_Params& params) {
const double nozzle_diameter = printer_config->option<ConfigOptionFloats>("nozzle_diameter")->get_at(0);
filament_config->set_key_value("slow_down_layer_time", new ConfigOptionFloats{ 1.0f });
print_config->set_key_value("alternate_extra_wall", new ConfigOptionBool(false));
print_config->set_key_value("default_jerk", new ConfigOptionFloat(1.0f));
print_config->set_key_value("outer_wall_jerk", new ConfigOptionFloat(1.0f));
print_config->set_key_value("inner_wall_jerk", new ConfigOptionFloat(1.0f));
@ -9096,6 +9097,7 @@ void Plater::calib_flowrate(int pass) {
}
print_config->set_key_value("layer_height", new ConfigOptionFloat(layer_height));
print_config->set_key_value("alternate_extra_wall", new ConfigOptionBool(false));
print_config->set_key_value("initial_layer_print_height", new ConfigOptionFloat(first_layer_height));
print_config->set_key_value("reduce_crossing_wall", new ConfigOptionBool(true));
//filament_config->set_key_value("filament_max_volumetric_speed", new ConfigOptionFloats{ 9. });
@ -9123,6 +9125,7 @@ void Plater::calib_temp(const Calib_Params& params) {
model().objects[0]->config.set_key_value("brim_type", new ConfigOptionEnum<BrimType>(btOuterOnly));
model().objects[0]->config.set_key_value("brim_width", new ConfigOptionFloat(5.0));
model().objects[0]->config.set_key_value("brim_object_gap", new ConfigOptionFloat(0.0));
model().objects[0]->config.set_key_value("alternate_extra_wall", new ConfigOptionBool(false));
changed_objects({ 0 });
wxGetApp().get_tab(Preset::TYPE_PRINT)->update_dirty();
@ -9191,6 +9194,7 @@ void Plater::calib_max_vol_speed(const Calib_Params& params)
print_config->set_key_value("enable_overhang_speed", new ConfigOptionBool { false });
print_config->set_key_value("timelapse_type", new ConfigOptionEnum<TimelapseType>(tlTraditional));
print_config->set_key_value("wall_loops", new ConfigOptionInt(1));
print_config->set_key_value("alternate_extra_wall", new ConfigOptionBool(false));
print_config->set_key_value("top_shell_layers", new ConfigOptionInt(0));
print_config->set_key_value("bottom_shell_layers", new ConfigOptionInt(0));
print_config->set_key_value("sparse_infill_density", new ConfigOptionPercent(0));
@ -9256,6 +9260,7 @@ void Plater::calib_retraction(const Calib_Params& params)
obj->config.set_key_value("sparse_infill_density", new ConfigOptionPercent(0));
obj->config.set_key_value("initial_layer_print_height", new ConfigOptionFloat(layer_height));
obj->config.set_key_value("layer_height", new ConfigOptionFloat(layer_height));
obj->config.set_key_value("alternate_extra_wall", new ConfigOptionBool(false));
changed_objects({ 0 });
@ -9285,6 +9290,7 @@ void Plater::calib_VFA(const Calib_Params& params)
print_config->set_key_value("enable_overhang_speed", new ConfigOptionBool { false });
print_config->set_key_value("timelapse_type", new ConfigOptionEnum<TimelapseType>(tlTraditional));
print_config->set_key_value("wall_loops", new ConfigOptionInt(1));
print_config->set_key_value("alternate_extra_wall", new ConfigOptionBool(false));
print_config->set_key_value("top_shell_layers", new ConfigOptionInt(0));
print_config->set_key_value("bottom_shell_layers", new ConfigOptionInt(1));
print_config->set_key_value("sparse_infill_density", new ConfigOptionPercent(0));

View file

@ -1973,6 +1973,7 @@ void TabPrint::build()
page = add_options_page(L("Strength"), "empty");
optgroup = page->new_optgroup(L("Walls"), L"param_wall");
optgroup->append_single_option_line("wall_loops");
optgroup->append_single_option_line("alternate_extra_wall");
optgroup->append_single_option_line("detect_thin_wall");
optgroup = page->new_optgroup(L("Top/bottom shells"), L"param_shell");