Fix air filtration/exhaust and chamber heater UI control (#12525)

This commit is contained in:
Kiss Lorand
2026-04-23 15:58:49 +03:00
committed by GitHub
parent 709ec51712
commit b2ce9f649f

View File

@@ -3883,8 +3883,8 @@ void TabFilament::build()
//
optgroup = page->new_optgroup(L("Print chamber temperature"), L"param_chamber_temp");
optgroup->append_single_option_line("chamber_temperature", "material_temperatures#print-chamber-temperature");
optgroup->append_single_option_line("activate_chamber_temp_control", "material_temperatures#print-chamber-temperature");
optgroup->append_single_option_line("chamber_temperature", "material_temperatures#print-chamber-temperature");
optgroup = page->new_optgroup(L("Print temperature"), L"param_extruder_temp");
line = { L("Nozzle"), L("Nozzle temperature when printing") };
@@ -4018,18 +4018,18 @@ void TabFilament::build()
optgroup = page->new_optgroup(L("Exhaust fan"),L"param_cooling_exhaust");
optgroup->append_single_option_line("activate_air_filtration", "material_cooling#activate-air-filtration", 0);
optgroup->append_single_option_line("activate_air_filtration", "material_cooling#activate-air-filtration");
line = {L("During print"), ""};
line.append_option(optgroup->get_option("activate_air_filtration_during_print", 0));
line.append_option(optgroup->get_option("during_print_exhaust_fan_speed", 0));
line.append_option(optgroup->get_option("activate_air_filtration_during_print"));
line.append_option(optgroup->get_option("during_print_exhaust_fan_speed"));
line.label_path = "material_cooling#during-print";
optgroup->append_line(line);
line = {L("Complete print"), ""};
line.append_option(optgroup->get_option("activate_air_filtration_on_completion", 0));
line.append_option(optgroup->get_option("complete_print_exhaust_fan_speed", 0));
line.append_option(optgroup->get_option("activate_air_filtration_on_completion"));
line.append_option(optgroup->get_option("complete_print_exhaust_fan_speed"));
line.label_path = "material_cooling#complete-print";
optgroup->append_line(line);
//BBS
@@ -4184,28 +4184,33 @@ void TabFilament::toggle_options()
return;
bool is_BBL_printer = false;
if (m_preset_bundle) {
is_BBL_printer =
wxGetApp().preset_bundle->is_bbl_vendor();
is_BBL_printer = wxGetApp().preset_bundle->is_bbl_vendor();
}
bool is_multi_extruder = m_preset_bundle->printers.get_edited_preset().config.option<ConfigOptionFloats>("nozzle_diameter")->size() > 1;
auto cfg = m_preset_bundle->printers.get_edited_preset().config;
auto printer_cfg = m_preset_bundle->printers.get_edited_preset().config;
if (m_active_page->title() == L("Cooling")) {
bool has_enable_overhang_bridge_fan = m_config->opt_bool("enable_overhang_bridge_fan", 0);
for (auto el : {"overhang_fan_speed", "overhang_fan_threshold", "internal_bridge_fan_speed"}) // ORCA: Add support for separate internal bridge fan speed control
bool has_enable_overhang_bridge_fan = m_config->opt_bool("enable_overhang_bridge_fan", 0);
for (auto el : {"overhang_fan_speed", "overhang_fan_threshold", "internal_bridge_fan_speed"}) // ORCA: Add support for separate internal bridge fan speed control
toggle_option(el, has_enable_overhang_bridge_fan);
toggle_option("additional_cooling_fan_speed", cfg.opt_bool("auxiliary_fan"));
// Orca: toggle dont slow down for external perimeters if
bool has_slow_down_for_layer_cooling = m_config->opt_bool("slow_down_for_layer_cooling", 0);
toggle_option("dont_slow_down_outer_wall", has_slow_down_for_layer_cooling);
bool activate_air_filtration = m_config->opt_bool("activate_air_filtration", 0);
toggle_option("activate_air_filtration_during_print", activate_air_filtration, 0);
toggle_option("activate_air_filtration_on_completion", activate_air_filtration, 0);
toggle_option("during_print_exhaust_fan_speed", activate_air_filtration && m_config->opt_bool("activate_air_filtration_during_print", 0), 0);
toggle_option("complete_print_exhaust_fan_speed", activate_air_filtration && m_config->opt_bool("activate_air_filtration_on_completion", 0), 0);
toggle_line("additional_cooling_fan_speed", printer_cfg.opt_bool("auxiliary_fan"));
// Orca: toggle dont slow down for external perimeters if
bool has_slow_down_for_layer_cooling = m_config->opt_bool("slow_down_for_layer_cooling", 0);
toggle_option("dont_slow_down_outer_wall", has_slow_down_for_layer_cooling);
bool support_air_filtration = printer_cfg.opt_bool("support_air_filtration");
for (auto el : {"activate_air_filtration", "during_print_exhaust_fan_speed", "complete_print_exhaust_fan_speed"})
toggle_line(el, support_air_filtration);
if (support_air_filtration) {
bool activate_air_filtration = m_config->opt_bool("activate_air_filtration", 0);
toggle_option("activate_air_filtration_during_print", activate_air_filtration);
toggle_option("during_print_exhaust_fan_speed", activate_air_filtration && m_config->opt_bool("activate_air_filtration_during_print", 0));
toggle_option("activate_air_filtration_on_completion", activate_air_filtration);
toggle_option("complete_print_exhaust_fan_speed", activate_air_filtration && m_config->opt_bool("activate_air_filtration_on_completion", 0));
}
}
if (m_active_page->title() == L("Filament"))
{
@@ -4226,7 +4231,7 @@ void TabFilament::toggle_options()
bool support_multi_bed_types = std::find(bed_temp_keys.begin(), bed_temp_keys.end(), bed_temp_1st_layer_key) ==
bed_temp_keys.end() ||
is_BBL_printer || cfg.opt_bool("support_multi_bed_types");
is_BBL_printer || printer_cfg.opt_bool("support_multi_bed_types");
for (const auto& key : bed_temp_keys)
{
@@ -4245,20 +4250,26 @@ void TabFilament::toggle_options()
toggle_line("adaptive_pressure_advance_model", has_adaptive_pa && pa);
toggle_line("adaptive_pressure_advance_bridges", has_adaptive_pa && pa);
bool is_pellet_printer = cfg.opt_bool("pellet_modded_printer");
bool is_pellet_printer = printer_cfg.opt_bool("pellet_modded_printer");
toggle_line("pellet_flow_coefficient", is_pellet_printer);
toggle_line("filament_diameter", !is_pellet_printer);
bool support_chamber_temp_control = this->m_preset_bundle->printers.get_edited_preset().config.opt_bool("support_chamber_temp_control");
bool support_chamber_temp_control = printer_cfg.opt_bool("support_chamber_temp_control");
toggle_line("activate_chamber_temp_control", support_chamber_temp_control);
toggle_line("chamber_temperature", support_chamber_temp_control);
if (support_chamber_temp_control) {
bool activate_chamber_temp_control = m_config->opt_bool("activate_chamber_temp_control", 0);
toggle_option("chamber_temperature", activate_chamber_temp_control);
}
std::string volumetric_speed_cos = m_config->opt_string("volumetric_speed_coefficients", 0u);
bool enable_fit = volumetric_speed_cos != "0 0 0 0 0 0";
toggle_option("filament_adaptive_volumetric_speed", enable_fit, 256 + 0u);
}
if (m_active_page->title() == L("Setting Overrides"))
update_filament_overrides_page(&cfg);
update_filament_overrides_page(&printer_cfg);
if (m_active_page->title() == L("Multimaterial")) {
// Orca: hide specific settings for BBL printers
@@ -4271,9 +4282,10 @@ void TabFilament::toggle_options()
toggle_option("filament_multitool_ramming_volume", multitool_ramming);
toggle_option("filament_multitool_ramming_flow", multitool_ramming);
bool is_BBL_multi_extruder = is_BBL_printer && printer_cfg.option<ConfigOptionFloats>("nozzle_diameter")->size() > 1;
const int extruder_idx = 0; // m_variant_combo->GetSelection(); // TODO: Orca hack
toggle_line("long_retractions_when_ec", is_multi_extruder && is_BBL_printer, 256 + extruder_idx);
toggle_line("retraction_distances_when_ec", is_multi_extruder && is_BBL_printer && m_config->opt_bool("long_retractions_when_ec", extruder_idx), 256 + extruder_idx);
toggle_line("long_retractions_when_ec", is_BBL_multi_extruder, 256 + extruder_idx);
toggle_line("retraction_distances_when_ec", is_BBL_multi_extruder && m_config->opt_bool("long_retractions_when_ec", extruder_idx), 256 + extruder_idx);
}
}