Merge branch 'main' into feature/show-extruder-values-on-filament-overrides-tab

This commit is contained in:
SoftFever 2024-10-07 19:43:50 +08:00 committed by GitHub
commit 09672ea90c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
867 changed files with 49736 additions and 27090 deletions

View file

@ -61,7 +61,7 @@ namespace GUI {
#define DISABLE_UNDO_SYS
static const std::vector<std::string> plate_keys = { "curr_bed_type", "first_layer_print_sequence", "first_layer_sequence_choice", "other_layers_print_sequence", "other_layers_sequence_choice", "print_sequence", "spiral_mode"};
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*/)
{
@ -1439,7 +1439,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
auto timelapse_type = m_config->option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
bool timelapse_enabled = timelapse_type->value == TimelapseType::tlSmooth;
if (!boost::any_cast<bool>(value) && timelapse_enabled) {
MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required for smooth timeplase. There may be flaws on the model without prime tower. Are you sure you want to disable prime tower?"),
MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required for smooth timelapse. There may be flaws on the model without prime tower. Are you sure you want to disable prime tower?"),
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
if (dlg.ShowModal() == wxID_NO) {
DynamicPrintConfig new_conf = *m_config;
@ -2141,6 +2141,7 @@ void TabPrint::build()
optgroup->append_single_option_line("bridge_angle");
optgroup->append_single_option_line("minimum_sparse_infill_area");
optgroup->append_single_option_line("infill_combination");
optgroup->append_single_option_line("infill_combination_max_layer_height");
optgroup->append_single_option_line("detect_narrow_internal_solid_infill");
optgroup->append_single_option_line("ensure_vertical_shell_thickness");
@ -2163,7 +2164,8 @@ void TabPrint::build()
optgroup->append_single_option_line("support_interface_speed");
optgroup = page->new_optgroup(L("Overhang speed"), L"param_overhang_speed", 15);
optgroup->append_single_option_line("enable_overhang_speed", "slow-down-for-overhang");
optgroup->append_single_option_line("overhang_speed_classic", "slow-down-for-overhang");
// Orca: DEPRECATED
// optgroup->append_single_option_line("overhang_speed_classic", "slow-down-for-overhang");
optgroup->append_single_option_line("slowdown_for_curled_perimeters");
Line line = { L("Overhang speed"), L("This is the speed for various overhang degrees. Overhang degrees are expressed as a percentage of line width. 0 speed means no slowing down for the overhang degree range and wall speed is used") };
line.label_path = "slow-down-for-overhang";
@ -2311,9 +2313,11 @@ void TabPrint::build()
page = add_options_page(L("Others"), "custom-gcode_other"); // ORCA: icon only visible on placeholders
optgroup = page->new_optgroup(L("Skirt"), L"param_skirt");
optgroup->append_single_option_line("skirt_type");
optgroup->append_single_option_line("skirt_loops");
optgroup->append_single_option_line("min_skirt_length");
optgroup->append_single_option_line("skirt_distance");
optgroup->append_single_option_line("skirt_start_angle");
optgroup->append_single_option_line("skirt_height");
optgroup->append_single_option_line("skirt_speed");
optgroup->append_single_option_line("draft_shield");
@ -2782,6 +2786,7 @@ void TabPrintPlate::build()
auto page = add_options_page(L("Plate Settings"), "empty");
auto optgroup = page->new_optgroup("");
optgroup->append_single_option_line("curr_bed_type");
optgroup->append_single_option_line("skirt_start_angle");
optgroup->append_single_option_line("print_sequence");
optgroup->append_single_option_line("spiral_mode");
optgroup->append_single_option_line("first_layer_sequence_choice");
@ -2830,6 +2835,8 @@ void TabPrintPlate::on_value_change(const std::string& opt_key, const boost::any
auto plate = dynamic_cast<PartPlate*>(plate_item.first);
if (k == "curr_bed_type")
plate->reset_bed_type();
if (k == "skirt_start_angle")
plate->config()->erase("skirt_start_angle");
if (k == "print_sequence")
plate->set_print_seq(PrintSequence::ByDefault);
if (k == "first_layer_sequence_choice")
@ -2853,6 +2860,10 @@ void TabPrintPlate::on_value_change(const std::string& opt_key, const boost::any
bed_type = m_config->opt_enum<BedType>("curr_bed_type");
plate->set_bed_type(BedType(bed_type));
}
if (k == "skirt_start_angle") {
float angle = m_config->opt_float("skirt_start_angle");
plate->config()->set_key_value("skirt_start_angle", new ConfigOptionFloat(angle));
}
if (k == "print_sequence") {
print_seq = m_config->opt_enum<PrintSequence>("print_sequence");
plate->set_print_seq(print_seq);
@ -3263,6 +3274,7 @@ void TabFilament::build()
optgroup->append_single_option_line("filament_density");
optgroup->append_single_option_line("filament_shrink");
optgroup->append_single_option_line("filament_shrinkage_compensation_z");
optgroup->append_single_option_line("filament_cost");
//BBS
optgroup->append_single_option_line("temperature_vitrification");
@ -3321,6 +3333,11 @@ void TabFilament::build()
line.append_option(optgroup->get_option("cool_plate_temp"));
optgroup->append_line(line);
line = { L("Textured Cool plate"), L("Bed temperature when cool plate is installed. Value 0 means the filament does not support to print on the Textured Cool Plate") };
line.append_option(optgroup->get_option("textured_cool_plate_temp_initial_layer"));
line.append_option(optgroup->get_option("textured_cool_plate_temp"));
optgroup->append_line(line);
line = { L("Engineering plate"), L("Bed temperature when engineering plate is installed. Value 0 means the filament does not support to print on the Engineering Plate") };
line.append_option(optgroup->get_option("eng_plate_temp_initial_layer"));
line.append_option(optgroup->get_option("eng_plate_temp"));
@ -3584,6 +3601,7 @@ void TabFilament::toggle_options()
toggle_option("pressure_advance", pa);
auto support_multi_bed_types = is_BBL_printer || cfg.opt_bool("support_multi_bed_types");
toggle_line("cool_plate_temp_initial_layer", support_multi_bed_types );
toggle_line("textured_cool_plate_temp_initial_layer", support_multi_bed_types);
toggle_line("eng_plate_temp_initial_layer", support_multi_bed_types);
toggle_line("textured_plate_temp_initial_layer", support_multi_bed_types);
@ -4124,7 +4142,7 @@ if (is_marlin_flavor)
if (from_initial_build) {
// create a page, but pretend it's an extruder page, so we can add it to m_pages ourselves
auto page = add_options_page(L("Multimaterial"), "custom-gcode_multi_material", true); // ORCA: icon only visible on placeholders
auto optgroup = page->new_optgroup(L("Single extruder multimaterial setup"), "param_multi_material");
auto optgroup = page->new_optgroup(L("Single extruder multi-material setup"), "param_multi_material");
optgroup->append_single_option_line("single_extruder_multi_material", "semm");
ConfigOptionDef def;
def.type = coInt, def.set_default_value(new ConfigOptionInt((int) m_extruders_count));
@ -4213,7 +4231,7 @@ if (is_marlin_flavor)
optgroup->append_single_option_line("enable_filament_ramming", "semm");
optgroup = page->new_optgroup(L("Single extruder multimaterial parameters"), "param_settings");
optgroup = page->new_optgroup(L("Single extruder multi-material parameters"), "param_settings");
optgroup->append_single_option_line("cooling_tube_retraction", "semm");
optgroup->append_single_option_line("cooling_tube_length", "semm");
optgroup->append_single_option_line("parking_pos_retraction", "semm");
@ -4261,7 +4279,7 @@ if (is_marlin_flavor)
// if value was changed
if (fabs(nozzle_diameters[extruder_idx == 0 ? 1 : 0] - new_nd) > EPSILON)
{
const wxString msg_text = _(L("This is a single extruder multimaterial printer, diameters of all extruders "
const wxString msg_text = _(L("This is a single extruder multi-material printer, diameters of all extruders "
"will be set to the new value. Do you want to proceed?"));
//wxMessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO);
MessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO);
@ -4474,7 +4492,7 @@ void TabPrinter::toggle_options()
toggle_line(el, is_BBL_printer);
// SoftFever: hide non-BBL settings
for (auto el : {"use_firmware_retraction", "use_relative_e_distances", "support_multi_bed_types", "pellet_modded_printer"})
for (auto el : {"use_firmware_retraction", "use_relative_e_distances", "support_multi_bed_types", "pellet_modded_printer", "bed_mesh_max", "bed_mesh_min", "bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "thumbnails"})
toggle_line(el, !is_BBL_printer);
}