mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 09:11:08 +00:00
Consolidate U1 nozzle variants while preserving filament tuning
Support variant-specific cooling, pressure advance, purge, ramming and temperature ranges. Keep shared U1 values as singletons and verify element-zero fallback for missing variant entries. Preserve preset migration aliases and validate high-flow selections using their declared nozzle volumes. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
+25
-24
@@ -4396,16 +4396,16 @@ void TabFilament::build()
|
||||
optgroup->append_single_option_line("temperature_vitrification", "material_basic_information#softening-temperature");
|
||||
optgroup->append_single_option_line("idle_temperature", "material_basic_information#idle-temperature");
|
||||
Line line = { L("Recommended nozzle temperature"), L("Recommended nozzle temperature range of this filament. 0 means not set") };
|
||||
line.append_option(optgroup->get_option("nozzle_temperature_range_low"));
|
||||
line.append_option(optgroup->get_option("nozzle_temperature_range_high"));
|
||||
line.append_option(optgroup->get_option("nozzle_temperature_range_low", 0));
|
||||
line.append_option(optgroup->get_option("nozzle_temperature_range_high", 0));
|
||||
optgroup->append_line(line);
|
||||
|
||||
optgroup->m_on_change = [this, optgroup](t_config_option_key opt_key, boost::any value) {
|
||||
DynamicPrintConfig &filament_config = m_preset_bundle->filaments.get_edited_preset().config;
|
||||
|
||||
update_dirty();
|
||||
if (!m_postpone_update_ui && (opt_key == "nozzle_temperature_range_low" || opt_key == "nozzle_temperature_range_high")) {
|
||||
m_config_manipulation.check_nozzle_recommended_temperature_range(&filament_config);
|
||||
if (!m_postpone_update_ui && (opt_key.substr(0, opt_key.find('#')) == "nozzle_temperature_range_low" || opt_key.substr(0, opt_key.find('#')) == "nozzle_temperature_range_high")) {
|
||||
m_config_manipulation.check_nozzle_recommended_temperature_range(&filament_config, m_variant_combo ? std::max(0, m_variant_combo->GetSelection()) : 0);
|
||||
}
|
||||
on_value_change(opt_key, value);
|
||||
};
|
||||
@@ -4415,8 +4415,8 @@ void TabFilament::build()
|
||||
optgroup->append_single_option_line("pellet_flow_coefficient", "printer_basic_information_advanced#pellet-modded-printer");
|
||||
optgroup->append_single_option_line("filament_flow_ratio", "material_flow_ratio_and_pressure_advance#flow-ratio", 0);
|
||||
|
||||
optgroup->append_single_option_line("enable_pressure_advance", "material_flow_ratio_and_pressure_advance#pressure-advance");
|
||||
optgroup->append_single_option_line("pressure_advance", "material_flow_ratio_and_pressure_advance#pressure-advance");
|
||||
optgroup->append_single_option_line("enable_pressure_advance", "material_flow_ratio_and_pressure_advance#pressure-advance", 0);
|
||||
optgroup->append_single_option_line("pressure_advance", "material_flow_ratio_and_pressure_advance#pressure-advance", 0);
|
||||
|
||||
// Orca: adaptive pressure advance and calibration model
|
||||
optgroup->append_single_option_line("adaptive_pressure_advance", "material_flow_ratio_and_pressure_advance#enable-adaptive-pressure-advance-beta");
|
||||
@@ -4532,11 +4532,11 @@ void TabFilament::build()
|
||||
else if (opt_key == "textured_plate_temp" || opt_key == "textured_plate_temp_initial_layer") {
|
||||
m_config_manipulation.check_bed_temperature_difference(BedType::btPTE, &filament_config);
|
||||
}
|
||||
else */if (opt_key == "nozzle_temperature") {
|
||||
m_config_manipulation.check_nozzle_temperature_range(&filament_config);
|
||||
else */if (opt_key.substr(0, opt_key.find('#')) == "nozzle_temperature") {
|
||||
m_config_manipulation.check_nozzle_temperature_range(&filament_config, m_variant_combo ? std::max(0, m_variant_combo->GetSelection()) : 0);
|
||||
}
|
||||
else if (opt_key == "nozzle_temperature_initial_layer") {
|
||||
m_config_manipulation.check_nozzle_temperature_initial_layer_range(&filament_config);
|
||||
else if (opt_key.substr(0, opt_key.find('#')) == "nozzle_temperature_initial_layer") {
|
||||
m_config_manipulation.check_nozzle_temperature_initial_layer_range(&filament_config, m_variant_combo ? std::max(0, m_variant_combo->GetSelection()) : 0);
|
||||
}
|
||||
|
||||
on_value_change(opt_key, value);
|
||||
@@ -4571,12 +4571,12 @@ void TabFilament::build()
|
||||
optgroup = page->new_optgroup(L("Part cooling fan"), L"param_cooling_part_fan");
|
||||
line = { L("Min fan speed threshold"), L("The part cooling fan will run at the minimum fan speed when the estimated layer time is longer than the threshold value. When the layer time is shorter than the threshold, the fan speed will be interpolated between the minimum and maximum fan speed according to layer printing time.") };
|
||||
line.label_path = "material_cooling#material-part-cooling-fan";
|
||||
line.append_option(optgroup->get_option("fan_min_speed"));
|
||||
line.append_option(optgroup->get_option("fan_min_speed", 0));
|
||||
line.append_option(optgroup->get_option("fan_cooling_layer_time"));
|
||||
optgroup->append_line(line);
|
||||
line = { L("Max fan speed threshold"), L("The part cooling fan will run at maximum speed when the estimated layer time is shorter than the threshold value.") };
|
||||
line.label_path = "material_cooling#material-part-cooling-fan";
|
||||
line.append_option(optgroup->get_option("fan_max_speed"));
|
||||
line.append_option(optgroup->get_option("fan_max_speed", 0));
|
||||
line.append_option(optgroup->get_option("slow_down_layer_time"));
|
||||
optgroup->append_line(line);
|
||||
optgroup->append_single_option_line("reduce_fan_stop_start_freq", "material_cooling#keep-fan-always-on");
|
||||
@@ -4592,7 +4592,7 @@ void TabFilament::build()
|
||||
optgroup->append_single_option_line("ironing_fan_speed", "material_cooling#ironing-fan-speed"); // ORCA: Add support for ironing fan speed control
|
||||
|
||||
optgroup = page->new_optgroup(L("Auxiliary part cooling fan"), L"param_cooling_aux_fan");
|
||||
optgroup->append_single_option_line("additional_cooling_fan_speed", "material_cooling#auxiliary-part-cooling-fan");
|
||||
optgroup->append_single_option_line("additional_cooling_fan_speed", "material_cooling#auxiliary-part-cooling-fan", 0);
|
||||
|
||||
optgroup = page->new_optgroup(L("Exhaust fan"),L"param_cooling_exhaust");
|
||||
|
||||
@@ -4656,7 +4656,7 @@ void TabFilament::build()
|
||||
|
||||
page = add_options_page(L("Multimaterial"), "custom-gcode_multi_material"); // ORCA: icon only visible on placeholders
|
||||
optgroup = page->new_optgroup(L("Wipe tower parameters"), "param_tower");
|
||||
optgroup->append_single_option_line("filament_minimal_purge_on_wipe_tower", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
optgroup->append_single_option_line("filament_minimal_purge_on_wipe_tower", "material_multimaterial#multimaterial-wipe-tower-parameters", 0);
|
||||
optgroup->append_single_option_line("filament_tower_interface_pre_extrusion_dist", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
optgroup->append_single_option_line("filament_tower_interface_pre_extrusion_length", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
optgroup->append_single_option_line("filament_tower_ironing_area", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
@@ -4700,9 +4700,9 @@ void TabFilament::build()
|
||||
});
|
||||
|
||||
optgroup = page->new_optgroup(L("Tool change parameters with multi extruder MM printers"), "param_toolchange_multi_extruder");
|
||||
optgroup->append_single_option_line("filament_multitool_ramming", "material_multimaterial#tool-change-parameters-with-multi-extruder");
|
||||
optgroup->append_single_option_line("filament_multitool_ramming_volume", "material_multimaterial#multi-tool-ramming-volume");
|
||||
optgroup->append_single_option_line("filament_multitool_ramming_flow", "material_multimaterial#multi-tool-ramming-flow");
|
||||
optgroup->append_single_option_line("filament_multitool_ramming", "material_multimaterial#tool-change-parameters-with-multi-extruder", 0);
|
||||
optgroup->append_single_option_line("filament_multitool_ramming_volume", "material_multimaterial#multi-tool-ramming-volume", 0);
|
||||
optgroup->append_single_option_line("filament_multitool_ramming_flow", "material_multimaterial#multi-tool-ramming-flow", 0);
|
||||
|
||||
page = add_options_page(L("Dependencies"), "advanced");
|
||||
optgroup = page->new_optgroup(L("Compatible printers"), "param_dependencies_printers");
|
||||
@@ -4772,6 +4772,7 @@ void TabFilament::update_description_lines()
|
||||
|
||||
void TabFilament::toggle_options()
|
||||
{
|
||||
const int variant_index = m_variant_combo ? std::max(0, m_variant_combo->GetSelection()) : 0;
|
||||
if (!m_active_page)
|
||||
return;
|
||||
bool is_BBL_printer = false;
|
||||
@@ -4813,7 +4814,7 @@ void TabFilament::toggle_options()
|
||||
}
|
||||
}
|
||||
|
||||
toggle_line("additional_cooling_fan_speed", printer_cfg.opt_bool("auxiliary_fan"));
|
||||
toggle_line("additional_cooling_fan_speed", printer_cfg.opt_bool("auxiliary_fan"), 256 + variant_index);
|
||||
|
||||
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"})
|
||||
@@ -4829,8 +4830,8 @@ void TabFilament::toggle_options()
|
||||
}
|
||||
if (m_active_page->title() == L("Filament"))
|
||||
{
|
||||
bool pa = m_config->opt_bool("enable_pressure_advance", 0);
|
||||
toggle_option("pressure_advance", pa);
|
||||
bool pa = m_config->opt_bool("enable_pressure_advance", variant_index);
|
||||
toggle_option("pressure_advance", pa, 256 + variant_index);
|
||||
|
||||
//Orca: Enable the plates that should be visible when multi bed support is enabled or a BBL printer is selected; otherwise, enable only the plate visible for the selected bed type.
|
||||
DynamicConfig& proj_cfg = m_preset_bundle->project_config;
|
||||
@@ -4886,11 +4887,11 @@ void TabFilament::toggle_options()
|
||||
for (auto el : {"filament_minimal_purge_on_wipe_tower", "filament_loading_speed_start", "filament_loading_speed",
|
||||
"filament_unloading_speed_start", "filament_unloading_speed", "filament_toolchange_delay", "filament_cooling_moves",
|
||||
"filament_cooling_initial_speed", "filament_cooling_final_speed"})
|
||||
toggle_option(el, !is_BBL_printer);
|
||||
toggle_option(el, !is_BBL_printer, filament_options_with_variant.count(el) ? 256 + variant_index : -1);
|
||||
|
||||
bool multitool_ramming = m_config->opt_bool("filament_multitool_ramming", 0);
|
||||
toggle_option("filament_multitool_ramming_volume", multitool_ramming);
|
||||
toggle_option("filament_multitool_ramming_flow", multitool_ramming);
|
||||
bool multitool_ramming = m_config->opt_bool("filament_multitool_ramming", variant_index);
|
||||
toggle_option("filament_multitool_ramming_volume", multitool_ramming, 256 + variant_index);
|
||||
toggle_option("filament_multitool_ramming_flow", multitool_ramming, 256 + variant_index);
|
||||
|
||||
bool is_BBL_multi_extruder = is_BBL_printer && printer_cfg.option<ConfigOptionFloats>("nozzle_diameter")->size() > 1;
|
||||
const int selection = m_variant_combo ? m_variant_combo->GetSelection() : 0;
|
||||
|
||||
Reference in New Issue
Block a user