mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-22 14:50:59 +00:00
Merge remote-tracking branch 'upstream/main' into feedback
This commit is contained in:
commit
357fcb374d
140 files changed
+2283
-1850
No files matched your search
+65
-17
@@ -69,6 +69,9 @@ namespace GUI {
|
||||
|
||||
#define DISABLE_UNDO_SYS
|
||||
|
||||
// Forward declaration for early use; definitions live later in this translation unit.
|
||||
static void validate_custom_gcode_cb(Tab* tab, const wxString& title, const t_config_option_key& opt_key, const boost::any& value);
|
||||
|
||||
static const std::vector<std::string> plate_keys = { "curr_bed_type", "skirt_start_angle", "first_layer_print_sequence", "first_layer_sequence_choice", "other_layers_print_sequence", "other_layers_sequence_choice", "print_sequence", "spiral_mode"};
|
||||
|
||||
void Tab::Highlighter::set_timer_owner(wxEvtHandler* owner, int timerid/* = wxID_ANY*/)
|
||||
@@ -2505,6 +2508,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("sparse_infill_acceleration", "speed_settings_acceleration#sparse-infill");
|
||||
optgroup->append_single_option_line("internal_solid_infill_acceleration", "speed_settings_acceleration#internal-solid-infill");
|
||||
optgroup->append_single_option_line("initial_layer_acceleration", "speed_settings_acceleration#initial-layer");
|
||||
optgroup->append_single_option_line("initial_layer_travel_acceleration", "speed_settings_acceleration#initial-layer-travel");
|
||||
optgroup->append_single_option_line("top_surface_acceleration", "speed_settings_acceleration#top-surface");
|
||||
optgroup->append_single_option_line("travel_acceleration", "speed_settings_acceleration#travel");
|
||||
optgroup->append_single_option_line("accel_to_decel_enable", "speed_settings_acceleration");
|
||||
@@ -2518,6 +2522,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("infill_jerk", "speed_settings_jerk_xy#infill");
|
||||
optgroup->append_single_option_line("top_surface_jerk", "speed_settings_jerk_xy#top-surface");
|
||||
optgroup->append_single_option_line("initial_layer_jerk", "speed_settings_jerk_xy#initial-layer");
|
||||
optgroup->append_single_option_line("initial_layer_travel_jerk", "speed_settings_jerk_xy#initial-layer-travel");
|
||||
optgroup->append_single_option_line("travel_jerk", "speed_settings_jerk_xy#travel");
|
||||
|
||||
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced", 15);
|
||||
@@ -2659,6 +2664,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("brim_type", "others_settings_brim#type");
|
||||
optgroup->append_single_option_line("brim_width", "others_settings_brim#width");
|
||||
optgroup->append_single_option_line("brim_object_gap", "others_settings_brim#brim-object-gap");
|
||||
optgroup->append_single_option_line("brim_flow_ratio", "others_settings_brim#brim-flow-ratio");
|
||||
optgroup->append_single_option_line("brim_use_efc_outline", "others_settings_brim#brim-use-efc-outline");
|
||||
optgroup->append_single_option_line("combine_brims", "others_settings_brim#combine-brims");
|
||||
optgroup->append_single_option_line("brim_ears_max_angle", "others_settings_brim#ear-max-angle");
|
||||
@@ -2701,6 +2707,17 @@ void TabPrint::build()
|
||||
// option.opt.height = 5;
|
||||
optgroup->append_single_option_line(option, "others_settings_g_code_output#filename-format");
|
||||
|
||||
optgroup = page->new_optgroup(L("Change extrusion role G-code"), L"param_gcode", 0);
|
||||
optgroup->m_on_change = [this, &optgroup_title = optgroup->title](const t_config_option_key& opt_key, const boost::any& value) {
|
||||
validate_custom_gcode_cb(this, optgroup_title, opt_key, value);
|
||||
};
|
||||
optgroup->edit_custom_gcode = [this](const t_config_option_key& opt_key) { edit_custom_gcode(opt_key); };
|
||||
option = optgroup->get_option("process_change_extrusion_role_gcode");
|
||||
option.opt.full_width = true;
|
||||
option.opt.is_code = true;
|
||||
option.opt.height = 15;
|
||||
optgroup->append_single_option_line(option);
|
||||
|
||||
optgroup = page->new_optgroup(L("Post-processing Scripts"), L"param_gcode", 0);
|
||||
option = optgroup->get_option("post_process");
|
||||
option.opt.full_width = true;
|
||||
@@ -3883,8 +3900,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") };
|
||||
@@ -4021,12 +4038,14 @@ void TabFilament::build()
|
||||
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"));
|
||||
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"));
|
||||
line.append_option(optgroup->get_option("complete_print_exhaust_fan_speed"));
|
||||
line.label_path = "material_cooling#complete-print";
|
||||
optgroup->append_line(line);
|
||||
@@ -4049,6 +4068,17 @@ void TabFilament::build()
|
||||
option.opt.height = gcode_field_height;// 150;
|
||||
optgroup->append_single_option_line(option);
|
||||
|
||||
optgroup = page->new_optgroup(L("Change extrusion role G-code"), L"param_gcode", 0);
|
||||
optgroup->m_on_change = [this, &optgroup_title = optgroup->title](const t_config_option_key& opt_key, const boost::any& value) {
|
||||
validate_custom_gcode_cb(this, optgroup_title, opt_key, value);
|
||||
};
|
||||
optgroup->edit_custom_gcode = edit_custom_gcode_fn;
|
||||
option = optgroup->get_option("filament_change_extrusion_role_gcode");
|
||||
option.opt.full_width = true;
|
||||
option.opt.is_code = true;
|
||||
option.opt.height = gcode_field_height;// 150;
|
||||
optgroup->append_single_option_line(option);
|
||||
|
||||
optgroup = page->new_optgroup(L("Filament end G-code"), L"param_gcode", 0);
|
||||
optgroup->m_on_change = [this, &optgroup_title = optgroup->title](const t_config_option_key& opt_key, const boost::any& value) {
|
||||
validate_custom_gcode_cb(this, optgroup_title, opt_key, value);
|
||||
@@ -4182,22 +4212,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);
|
||||
|
||||
// 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);
|
||||
toggle_line("additional_cooling_fan_speed", printer_cfg.opt_bool("auxiliary_fan"));
|
||||
|
||||
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"))
|
||||
{
|
||||
@@ -4218,7 +4259,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)
|
||||
{
|
||||
@@ -4237,20 +4278,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
|
||||
@@ -4263,9 +4310,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user