mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-18 08:22:06 +00:00
Merge branch 'main' into pr/Noisyfox/13712
This commit is contained in:
@@ -1843,7 +1843,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
bool timelapse_enabled = timelapse_type->value == TimelapseType::tlSmooth;
|
||||
if (!boost::any_cast<bool>(value) && timelapse_enabled) {
|
||||
bool set_enable_prime_tower = false;
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("A 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?"),
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("A prime tower is required for smooth timelapse mode. There may be flaws on the model without a prime tower. Are you sure you want to disable the prime tower\?"),
|
||||
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
||||
if (dlg.ShowModal() == wxID_NO) {
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
@@ -1923,7 +1923,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
if (opt_key == "timelapse_type") {
|
||||
bool wipe_tower_enabled = m_config->option<ConfigOptionBool>("enable_prime_tower")->value;
|
||||
if (!wipe_tower_enabled && boost::any_cast<int>(value) == (int)TimelapseType::tlSmooth) {
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("A prime tower is required for smooth timelapse. There may be flaws on the model without prime tower. Do you want to enable prime tower?"),
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("A prime tower is required for smooth timelapse mode. There may be flaws on the model without prime tower. Do you want to enable the prime tower\?"),
|
||||
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
||||
if (dlg.ShowModal() == wxID_YES) {
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
@@ -1990,16 +1990,12 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
if (!is_soluble_filament(interface_filament_id)) {
|
||||
msg_text = _L("When using support material for the support interface, we recommend the following settings:\n"
|
||||
"0 top Z distance, 0 interface spacing, interlaced rectilinear pattern and disable independent support layer height.");
|
||||
msg_text += "\n\n" + _L("Change these settings automatically?\n"
|
||||
"Yes - Change these settings automatically\n"
|
||||
"No - Do not change these settings for me");
|
||||
msg_text += "\n\n" + _L("Change these settings automatically\?\nYes - Change these settings automatically.\nNo - Do not change these settings for me.");
|
||||
} else {
|
||||
msg_text = _L("When using soluble material for the support interface, we recommend the following settings:\n"
|
||||
"0 top Z distance, 0 interface spacing, interlaced rectilinear pattern, disable independent support layer height\n"
|
||||
"and use soluble materials for both support interface and support base.");
|
||||
msg_text += "\n\n" + _L("Change these settings automatically?\n"
|
||||
"Yes - Change these settings automatically\n"
|
||||
"No - Do not change these settings for me");
|
||||
msg_text += "\n\n" + _L("Change these settings automatically\?\nYes - Change these settings automatically.\nNo - Do not change these settings for me.");
|
||||
}
|
||||
MessageDialog dialog(wxGetApp().plater(), msg_text, _L("Suggestion"), wxICON_WARNING | wxYES | wxNO);
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
@@ -2205,6 +2201,26 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_key == "parallel_printheads_count" || opt_key == "parallel_printheads_bed_exclude_areas") {
|
||||
if (m_config->opt_bool("support_parallel_printheads")) {
|
||||
const int count = opt_key == "parallel_printheads_count" ? boost::any_cast<int>(value) : m_config->opt_int("parallel_printheads_count");
|
||||
if (auto *field = this->get_field("bed_exclude_area")) {
|
||||
wxString exclude_area;
|
||||
if (count > 0) {
|
||||
if (const auto *areas = m_config->option<ConfigOptionStrings>("parallel_printheads_bed_exclude_areas");
|
||||
areas != nullptr) {
|
||||
const size_t index = static_cast<size_t>(count - 1);
|
||||
if (index < areas->values.size())
|
||||
exclude_area = wxString::FromUTF8(areas->values[index]);
|
||||
}
|
||||
}
|
||||
|
||||
field->set_value(exclude_area, true);
|
||||
field->propagate_value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_postpone_update_ui) {
|
||||
// It means that not all values are rolled to the system/last saved values jet.
|
||||
// And call of the update() can causes a redundant check of the config values,
|
||||
@@ -2571,13 +2587,14 @@ void TabPrint::build()
|
||||
|
||||
optgroup = page->new_optgroup(L("Line width"), L"param_line_width");
|
||||
optgroup->append_single_option_line("line_width","quality_settings_line_width");
|
||||
optgroup->append_single_option_line("initial_layer_line_width","quality_settings_line_width");
|
||||
optgroup->append_single_option_line("outer_wall_line_width","quality_settings_line_width");
|
||||
optgroup->append_single_option_line("inner_wall_line_width","quality_settings_line_width");
|
||||
optgroup->append_single_option_line("top_surface_line_width","quality_settings_line_width");
|
||||
optgroup->append_single_option_line("sparse_infill_line_width","quality_settings_line_width");
|
||||
optgroup->append_single_option_line("internal_solid_infill_line_width","quality_settings_line_width");
|
||||
optgroup->append_single_option_line("support_line_width","quality_settings_line_width");
|
||||
optgroup->append_single_option_line("initial_layer_line_width","quality_settings_line_width#first-layer");
|
||||
optgroup->append_single_option_line("outer_wall_line_width","quality_settings_line_width#outer-wall");
|
||||
optgroup->append_single_option_line("inner_wall_line_width","quality_settings_line_width#inner-wall");
|
||||
optgroup->append_single_option_line("top_surface_line_width","quality_settings_line_width#top-surface");
|
||||
optgroup->append_single_option_line("sparse_infill_line_width","quality_settings_line_width#sparse-infill");
|
||||
optgroup->append_single_option_line("internal_solid_infill_line_width","quality_settings_line_width#internal-solid-infill");
|
||||
optgroup->append_single_option_line("support_line_width","quality_settings_line_width#support");
|
||||
optgroup->append_single_option_line("bridge_line_width","quality_settings_line_width#bridge");
|
||||
|
||||
optgroup = page->new_optgroup(L("Seam"), L"param_seam");
|
||||
optgroup->append_single_option_line("seam_position", "quality_settings_seam#seam-position");
|
||||
@@ -2624,7 +2641,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("ironing_angle", "quality_settings_ironing#angle-offset");
|
||||
optgroup->append_single_option_line("ironing_angle_fixed", "quality_settings_ironing#fixed-angle");
|
||||
|
||||
optgroup = page->new_optgroup("Z Contouring", L"param_advanced");
|
||||
optgroup = page->new_optgroup(L("Z contouring"), L"param_advanced");
|
||||
optgroup->append_single_option_line("zaa_enabled", "quality_settings_z_contouring");
|
||||
optgroup->append_single_option_line("zaa_minimize_perimeter_height", "quality_settings_z_contouring#minimize-wall-height-angle");
|
||||
optgroup->append_single_option_line("zaa_min_z", "quality_settings_z_contouring#minimum-z-height");
|
||||
@@ -2677,7 +2694,7 @@ void TabPrint::build()
|
||||
|
||||
optgroup = page->new_optgroup(L("Bridging"), L"param_bridge");
|
||||
optgroup->append_single_option_line("bridge_flow", "quality_settings_bridging#flow-ratio");
|
||||
optgroup->append_single_option_line("internal_bridge_flow", "quality_settings_bridging#flow-ratio");
|
||||
optgroup->append_single_option_line("internal_bridge_flow", "quality_settings_bridging#flow-ratio");
|
||||
optgroup->append_single_option_line("bridge_density", "quality_settings_bridging#bridge-density");
|
||||
optgroup->append_single_option_line("internal_bridge_density", "quality_settings_bridging#bridge-density");
|
||||
optgroup->append_single_option_line("thick_bridges", "quality_settings_bridging#thick-bridges");
|
||||
@@ -2718,7 +2735,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("sparse_infill_density", "strength_settings_infill#sparse-infill-density");
|
||||
optgroup->append_single_option_line("fill_multiline", "strength_settings_infill#fill-multiline");
|
||||
optgroup->append_single_option_line("sparse_infill_pattern", "strength_settings_infill#sparse-infill-pattern");
|
||||
optgroup->append_single_option_line("gyroid_optimized", "strength_settings_patterns#gyroid_optimized");
|
||||
optgroup->append_single_option_line("gyroid_optimized", "strength_settings_patterns#gyroid-optimized");
|
||||
optgroup->append_single_option_line("infill_direction", "strength_settings_infill#direction");
|
||||
optgroup->append_single_option_line("sparse_infill_rotate_template", "strength_settings_infill_rotation_template_metalanguage");
|
||||
optgroup->append_single_option_line("skin_infill_density", "strength_settings_patterns#locked-zag");
|
||||
@@ -2732,6 +2749,9 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("lateral_lattice_angle_1", "strength_settings_patterns#lateral-lattice");
|
||||
optgroup->append_single_option_line("lateral_lattice_angle_2", "strength_settings_patterns#lateral-lattice");
|
||||
optgroup->append_single_option_line("infill_overhang_angle", "strength_settings_patterns#lateral-honeycomb");
|
||||
optgroup->append_single_option_line("lightning_overhang_angle", "strength_settings_patterns#lightning");
|
||||
optgroup->append_single_option_line("lightning_prune_angle", "strength_settings_patterns#lightning");
|
||||
optgroup->append_single_option_line("lightning_straightening_angle", "strength_settings_patterns#lightning");
|
||||
optgroup->append_single_option_line("infill_anchor_max", "strength_settings_infill#anchor");
|
||||
optgroup->append_single_option_line("infill_anchor", "strength_settings_infill#anchor");
|
||||
optgroup->append_single_option_line("internal_solid_infill_pattern", "strength_settings_infill#internal-solid-infill");
|
||||
@@ -2746,6 +2766,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("extra_solid_infills", "strength_settings_infill#extra-solid-infill");
|
||||
optgroup->append_single_option_line("bridge_angle", "strength_settings_advanced#bridge-infill-direction");
|
||||
optgroup->append_single_option_line("internal_bridge_angle", "strength_settings_advanced#bridge-infill-direction"); // ORCA: Internal bridge angle override
|
||||
optgroup->append_single_option_line("relative_bridge_angle", "strength_settings_advanced#relative-bridge-angle");
|
||||
optgroup->append_single_option_line("minimum_sparse_infill_area", "strength_settings_advanced#minimum-sparse-infill-threshold");
|
||||
optgroup->append_single_option_line("infill_combination", "strength_settings_advanced#infill-combination");
|
||||
optgroup->append_single_option_line("infill_combination_max_layer_height", "strength_settings_advanced#max-layer-height");
|
||||
@@ -2804,8 +2825,10 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("accel_to_decel_enable", "speed_settings_acceleration");
|
||||
optgroup->append_single_option_line("accel_to_decel_factor", "speed_settings_acceleration");
|
||||
|
||||
optgroup = page->new_optgroup(L("Jerk(XY)"), L"param_jerk", 15);
|
||||
optgroup = page->new_optgroup(L("Junction Deviation"), L"param_junction_deviation", 15);
|
||||
optgroup->append_single_option_line("default_junction_deviation", "speed_settings_jerk_xy#junction-deviation", 0);
|
||||
|
||||
optgroup = page->new_optgroup(L("Jerk(XY)"), L"param_jerk", 15);
|
||||
optgroup->append_single_option_line("default_jerk", "speed_settings_jerk_xy#default", 0);
|
||||
optgroup->append_single_option_line("outer_wall_jerk", "speed_settings_jerk_xy#outer-wall", 0);
|
||||
optgroup->append_single_option_line("inner_wall_jerk", "speed_settings_jerk_xy#inner-wall", 0);
|
||||
@@ -2838,7 +2861,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("raft_layers", "support_settings_raft");
|
||||
optgroup->append_single_option_line("raft_contact_distance", "support_settings_raft");
|
||||
|
||||
optgroup = page->new_optgroup(L("Support filament"), L"param_support_filament");
|
||||
optgroup = page->new_optgroup(L("Filament for Supports"), L"param_support_filament");
|
||||
optgroup->append_single_option_line("support_filament", "support_settings_filament#base");
|
||||
optgroup->append_single_option_line("support_interface_filament", "support_settings_filament#interface");
|
||||
optgroup->append_single_option_line("support_interface_not_for_body", "support_settings_filament#avoid-interface-filament-for-base");
|
||||
@@ -2912,9 +2935,12 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("single_extruder_multi_material_priming", "multimaterial_settings_prime_tower");
|
||||
|
||||
optgroup = page->new_optgroup(L("Filament for Features"), L"param_filament_for_features");
|
||||
optgroup->append_single_option_line("wall_filament", "multimaterial_settings_filament_for_features#walls");
|
||||
optgroup->append_single_option_line("sparse_infill_filament", "multimaterial_settings_filament_for_features#infill");
|
||||
optgroup->append_single_option_line("solid_infill_filament", "multimaterial_settings_filament_for_features#solid-infill");
|
||||
optgroup->append_single_option_line("outer_wall_filament_id", "multimaterial_settings_filament_for_features#outer-walls");
|
||||
optgroup->append_single_option_line("inner_wall_filament_id", "multimaterial_settings_filament_for_features#inner-walls");
|
||||
optgroup->append_single_option_line("sparse_infill_filament_id", "multimaterial_settings_filament_for_features#sparse-infill");
|
||||
optgroup->append_single_option_line("internal_solid_filament_id", "multimaterial_settings_filament_for_features#internal-solid-infill");
|
||||
optgroup->append_single_option_line("top_surface_filament_id", "multimaterial_settings_filament_for_features#top-surface");
|
||||
optgroup->append_single_option_line("bottom_surface_filament_id", "multimaterial_settings_filament_for_features#bottom-surface");
|
||||
optgroup->append_single_option_line("wipe_tower_filament", "multimaterial_settings_filament_for_features#wipe-tower");
|
||||
|
||||
optgroup = page->new_optgroup(L("Ooze prevention"), L"param_ooze_prevention");
|
||||
@@ -2973,7 +2999,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("timelapse_type", "others_settings_special_mode#timelapse");
|
||||
optgroup->append_single_option_line("enable_wrapping_detection");
|
||||
|
||||
optgroup = page->new_optgroup(L("Fuzzy Skin"), L"fuzzy_skin");
|
||||
optgroup = page->new_optgroup(L("Fuzzy skin"), L"fuzzy_skin");
|
||||
optgroup->append_single_option_line("fuzzy_skin", "others_settings_fuzzy_skin");
|
||||
optgroup->append_single_option_line("fuzzy_skin_mode", "others_settings_fuzzy_skin#fuzzy-skin-mode");
|
||||
optgroup->append_single_option_line("fuzzy_skin_noise_type", "others_settings_fuzzy_skin#noise-type");
|
||||
@@ -3797,8 +3823,8 @@ bool Tab::validate_custom_gcode(const wxString& title, const std::string& gcode)
|
||||
for (const std::string& keyword : tags)
|
||||
lines += ";" + keyword + "\n";
|
||||
wxString reports = format_wxstr(
|
||||
_L_PLURAL("Following line %s contains reserved keywords.\nPlease remove it, or will beat G-code visualization and printing time estimation.",
|
||||
"Following lines %s contain reserved keywords.\nPlease remove them, or will beat G-code visualization and printing time estimation.",
|
||||
_L_PLURAL("Following line %s contains reserved keywords.\nPlease remove it, or G-code visualization and print time estimation will be broken.",
|
||||
"Following lines %s contain reserved keywords.\nPlease remove them, or G-code visualization and print time estimation will be broken.",
|
||||
tags.size()),
|
||||
lines);
|
||||
//wxMessageDialog dialog(wxGetApp().mainframe, reports, _L("Found reserved keywords in") + " " + _(title), wxICON_WARNING | wxOK);
|
||||
@@ -4157,7 +4183,7 @@ void TabFilament::build()
|
||||
//BBS
|
||||
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 no set") };
|
||||
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"));
|
||||
optgroup->append_line(line);
|
||||
@@ -4190,6 +4216,15 @@ void TabFilament::build()
|
||||
option.opt.is_code = true;
|
||||
option.opt.height = 15;
|
||||
optgroup->append_single_option_line(option);
|
||||
optgroup->m_on_change = [this](const t_config_option_key& opt_key, const boost::any& value) {
|
||||
DynamicPrintConfig& filament_config = m_preset_bundle->filaments.get_edited_preset().config;
|
||||
|
||||
update_dirty();
|
||||
if (opt_key == "adaptive_pressure_advance_model")
|
||||
m_config_manipulation.check_adaptive_pressure_advance_model(&filament_config);
|
||||
|
||||
on_value_change(opt_key, value);
|
||||
};
|
||||
//
|
||||
|
||||
optgroup = page->new_optgroup(L("Print chamber temperature"), L"param_chamber_temp");
|
||||
@@ -4212,35 +4247,35 @@ void TabFilament::build()
|
||||
optgroup->append_line(line);
|
||||
|
||||
line = { L("Cool Plate"),
|
||||
L("Bed temperature when the Cool Plate is installed. A value of 0 means the filament does not support printing on the Cool Plate.") };
|
||||
L("This is the bed temperature when the Cool Plate is installed. A value of 0 means the filament does not support printing on the Cool Plate.") };
|
||||
line.label_path = "material_temperatures#bed";
|
||||
line.append_option(optgroup->get_option("cool_plate_temp_initial_layer"));
|
||||
line.append_option(optgroup->get_option("cool_plate_temp"));
|
||||
optgroup->append_line(line);
|
||||
|
||||
line = { L("Textured Cool Plate"),
|
||||
L("Bed temperature when the Textured Cool Plate is installed. A value of 0 means the filament does not support printing on the Textured Cool Plate.") };
|
||||
L("This is the bed temperature when the Textured Cool Plate is installed. A value of 0 means the filament does not support printing on the Textured Cool Plate.") };
|
||||
line.label_path = "material_temperatures#bed";
|
||||
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 the Engineering Plate is installed. A value of 0 means the filament does not support printing on the Engineering Plate.") };
|
||||
L("This is the bed temperature when the engineering plate is installed. A value of 0 means the filament does not support printing on the Engineering Plate.") };
|
||||
line.label_path = "material_temperatures#bed";
|
||||
line.append_option(optgroup->get_option("eng_plate_temp_initial_layer"));
|
||||
line.append_option(optgroup->get_option("eng_plate_temp"));
|
||||
optgroup->append_line(line);
|
||||
|
||||
line = { L("Smooth PEI Plate / High Temp Plate"),
|
||||
L("Bed temperature when the Smooth PEI Plate/High Temperature Plate is installed. A value of 0 means the filament does not support printing on the Smooth PEI Plate/High Temp Plate.") };
|
||||
L("This is the bed temperature when the Smooth PEI Plate/High Temperature Plate is installed. A value of 0 means the filament does not support printing on the Smooth PEI Plate/High Temp Plate.") };
|
||||
line.label_path = "material_temperatures#bed";
|
||||
line.append_option(optgroup->get_option("hot_plate_temp_initial_layer"));
|
||||
line.append_option(optgroup->get_option("hot_plate_temp"));
|
||||
optgroup->append_line(line);
|
||||
|
||||
line = { L("Textured PEI Plate"),
|
||||
L("Bed temperature when the Textured PEI Plate is installed. A value of 0 means the filament does not support printing on the Textured PEI Plate.") };
|
||||
L("This is the bed temperature when the Textured PEI Plate is installed. A value of 0 means the filament does not support printing on the Textured PEI Plate.") };
|
||||
line.label_path = "material_temperatures#bed";
|
||||
line.append_option(optgroup->get_option("textured_plate_temp_initial_layer"));
|
||||
line.append_option(optgroup->get_option("textured_plate_temp"));
|
||||
@@ -4301,12 +4336,12 @@ void TabFilament::build()
|
||||
optgroup->append_single_option_line("full_fan_speed_layer", "material_cooling#full-fan-speed-at-layer");
|
||||
|
||||
optgroup = page->new_optgroup(L("Part cooling fan"), L"param_cooling_part_fan");
|
||||
line = { L("Min fan speed threshold"), L("Part cooling fan speed will start to run at min speed when the estimated layer time is no longer than the layer time in setting. When layer time is shorter than threshold, fan speed is interpolated between the minimum and maximum fan speed according to layer printing time") };
|
||||
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_cooling_layer_time"));
|
||||
optgroup->append_line(line);
|
||||
line = { L("Max fan speed threshold"), L("Part cooling fan speed will be max when the estimated layer time is shorter than the setting value") };
|
||||
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("slow_down_layer_time"));
|
||||
@@ -4733,6 +4768,7 @@ void TabPrinter::build_fff()
|
||||
create_line_with_widget(optgroup.get(), "printable_area", "custom-svg-and-png-bed-textures_124612", [this](wxWindow* parent) {
|
||||
return create_bed_shape_widget(parent);
|
||||
});
|
||||
optgroup->append_single_option_line("parallel_printheads_count");
|
||||
Option option = optgroup->get_option("bed_exclude_area");
|
||||
option.opt.full_width = true;
|
||||
optgroup->append_single_option_line(option, "printer_basic_information_printable_space#excluded-bed-area");
|
||||
@@ -4750,6 +4786,7 @@ void TabPrinter::build_fff()
|
||||
optgroup->append_single_option_line("gcode_flavor", "printer_basic_information_advanced#g-code-flavor");
|
||||
optgroup->append_single_option_line("pellet_modded_printer", "printer_basic_information_advanced#pellet-modded-printer");
|
||||
optgroup->append_single_option_line("bbl_use_printhost", "printer_basic_information_advanced#use-3rd-party-print-host");
|
||||
optgroup->append_single_option_line("use_3mf");
|
||||
optgroup->append_single_option_line("scan_first_layer" , "printer_basic_information_advanced#scan-first-layer");
|
||||
optgroup->append_single_option_line("enable_power_loss_recovery", "printer_basic_information_advanced#power-loss-recovery");
|
||||
//option = optgroup->get_option("wrapping_exclude_area");
|
||||
@@ -5714,6 +5751,7 @@ void TabPrinter::toggle_options()
|
||||
// toggle_option("change_filament_gcode", have_multiple_extruders);
|
||||
//}
|
||||
if (m_active_page->title() == L("Basic information")) {
|
||||
const auto &printer_cfg = m_preset_bundle->printers.get_edited_preset().config;
|
||||
|
||||
// SoftFever: hide BBL specific settings
|
||||
for (auto el : {"scan_first_layer", "bbl_calib_mark_logo", "bbl_use_printhost"})
|
||||
@@ -5723,8 +5761,11 @@ void TabPrinter::toggle_options()
|
||||
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);
|
||||
|
||||
auto gcf = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
|
||||
toggle_line("enable_power_loss_recovery", is_BBL_printer || gcf == gcfMarlinFirmware);
|
||||
bool gcf_is_marlin_firmware = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value == GCodeFlavor::gcfMarlinFirmware;
|
||||
toggle_line("enable_power_loss_recovery", is_BBL_printer || gcf_is_marlin_firmware);
|
||||
|
||||
const bool support_parallel_printheads = printer_cfg.opt_bool("support_parallel_printheads");
|
||||
toggle_line("parallel_printheads_count", support_parallel_printheads);
|
||||
}
|
||||
|
||||
|
||||
@@ -5803,7 +5844,7 @@ void TabPrinter::toggle_options()
|
||||
// some options only apply when not using firmware retraction
|
||||
vec.resize(0);
|
||||
vec = {"retraction_speed", "deretraction_speed", "retract_before_wipe",
|
||||
"retract_length", "retract_restart_extra", "wipe",
|
||||
"retract_length", "retract_restart_extra",
|
||||
"wipe_distance"};
|
||||
for (auto el : vec)
|
||||
//BBS
|
||||
@@ -5811,20 +5852,25 @@ void TabPrinter::toggle_options()
|
||||
|
||||
bool wipe = retraction && m_config->opt_bool("wipe", variant_index);
|
||||
toggle_option("retract_before_wipe", wipe, i);
|
||||
float retract_before_wipe = static_cast<ConfigOptionPercents*>(m_config->option("retract_before_wipe"))->values[variant_index];
|
||||
|
||||
if (use_firmware_retraction && wipe) {
|
||||
if (use_firmware_retraction && wipe && retract_before_wipe < 100.0) {
|
||||
//wxMessageDialog dialog(parent(),
|
||||
MessageDialog dialog(parent(),
|
||||
_(L("The Wipe option is not available when using the Firmware Retraction mode.\n"
|
||||
"\nShall I disable it in order to enable Firmware Retraction?")),
|
||||
_(L("The Retract before wipe option could be only 100% when using the Firmware Retraction mode.\n"
|
||||
"\nShall I set it to 100% in order to enable Firmware Retraction?")),
|
||||
_(L("Firmware Retraction")), wxICON_WARNING | wxYES | wxNO);
|
||||
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
if (dialog.ShowModal() == wxID_YES) {
|
||||
auto wipe = static_cast<ConfigOptionBools*>(m_config->option("wipe")->clone());
|
||||
for (size_t w = 0; w < wipe->values.size(); w++)
|
||||
auto retract_before_wipe = static_cast<ConfigOptionPercents*>(m_config->option("retract_before_wipe")->clone());
|
||||
for (size_t w = 0; w < wipe->values.size(); w++) {
|
||||
wipe->values[w] = false;
|
||||
retract_before_wipe->values[w] = 100.0;
|
||||
}
|
||||
new_conf.set_key_value("wipe", wipe);
|
||||
new_conf.set_key_value("retract_before_wipe", retract_before_wipe);
|
||||
}
|
||||
else {
|
||||
new_conf.set_key_value("use_firmware_retraction", new ConfigOptionBool(false));
|
||||
@@ -5848,18 +5894,25 @@ void TabPrinter::toggle_options()
|
||||
if (m_active_page->title() == L("Motion ability")) {
|
||||
auto gcf = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
|
||||
update_input_shaper_menu(gcf);
|
||||
|
||||
// Orca: use booleans to avoid repeated comparisons with enum values
|
||||
const bool gcf_is_marlin_legacy = gcf == GCodeFlavor::gcfMarlinLegacy;
|
||||
const bool gcf_is_marlin_firmware = gcf == GCodeFlavor::gcfMarlinFirmware;
|
||||
const bool gcf_is_klipper = gcf == GCodeFlavor::gcfKlipper;
|
||||
const bool gcf_is_reprap_firmware = gcf == GCodeFlavor::gcfRepRapFirmware;
|
||||
|
||||
bool silent_mode = m_config->opt_bool("silent_mode");
|
||||
int max_field = silent_mode ? 2 : 1;
|
||||
for (int i = 0; i < max_field; ++i)
|
||||
toggle_option("machine_max_acceleration_travel", gcf != gcfMarlinLegacy && gcf != gcfKlipper, i);
|
||||
toggle_line("machine_max_acceleration_travel", gcf != gcfMarlinLegacy && gcf != gcfKlipper);
|
||||
toggle_option("machine_max_acceleration_travel", !gcf_is_marlin_legacy && !gcf_is_klipper, i);
|
||||
toggle_line("machine_max_acceleration_travel", !gcf_is_marlin_legacy && !gcf_is_klipper);
|
||||
for (int i = 0; i < max_field; ++i)
|
||||
toggle_option("machine_max_junction_deviation", gcf == gcfMarlinFirmware, i);
|
||||
toggle_line("machine_max_junction_deviation", gcf == gcfMarlinFirmware);
|
||||
toggle_option("machine_max_junction_deviation", gcf_is_marlin_firmware, i);
|
||||
toggle_line("machine_max_junction_deviation", gcf_is_marlin_firmware);
|
||||
|
||||
// Check if junction deviation value is non-zero and firmware is Marlin
|
||||
bool enable_jerk = gcf != gcfMarlinFirmware;
|
||||
if (gcf == gcfMarlinFirmware) {
|
||||
bool enable_jerk = !gcf_is_marlin_firmware;
|
||||
if (gcf_is_marlin_firmware) {
|
||||
const auto *junction_deviation = m_config->option<ConfigOptionFloats>("machine_max_junction_deviation");
|
||||
if (junction_deviation != nullptr) {
|
||||
const auto &values = junction_deviation->values;
|
||||
@@ -5875,14 +5928,14 @@ void TabPrinter::toggle_options()
|
||||
toggle_option("machine_max_jerk_e", enable_jerk, i);
|
||||
}
|
||||
|
||||
bool emittable_limits = m_config->opt_enum<GCodeFlavor>("gcode_flavor") == GCodeFlavor::gcfMarlinLegacy || m_config->opt_enum<GCodeFlavor>("gcode_flavor") == GCodeFlavor::gcfMarlinFirmware || m_config->opt_enum<GCodeFlavor>("gcode_flavor") == GCodeFlavor::gcfRepRapFirmware;
|
||||
bool emittable_limits = gcf_is_marlin_legacy || gcf_is_marlin_firmware || gcf_is_reprap_firmware;
|
||||
toggle_option("emit_machine_limits_to_gcode", emittable_limits);
|
||||
|
||||
bool resonance_avoidance = m_config->opt_bool("resonance_avoidance");
|
||||
toggle_option("min_resonance_avoidance_speed", resonance_avoidance);
|
||||
toggle_option("max_resonance_avoidance_speed", resonance_avoidance);
|
||||
|
||||
bool input_shaping_compatible = m_config->opt_enum<GCodeFlavor>("gcode_flavor") == GCodeFlavor::gcfMarlinFirmware || m_config->opt_enum<GCodeFlavor>("gcode_flavor") == GCodeFlavor::gcfRepRapFirmware;
|
||||
bool input_shaping_compatible = gcf_is_marlin_firmware || gcf_is_reprap_firmware;
|
||||
|
||||
for (auto is : {"input_shaping_emit", "input_shaping_type", "input_shaping_freq_x", "input_shaping_freq_y",
|
||||
"input_shaping_damp_x", "input_shaping_damp_y"})
|
||||
@@ -5892,12 +5945,11 @@ void TabPrinter::toggle_options()
|
||||
bool emit_machine_limits_to_gcode = m_config->opt_bool("emit_machine_limits_to_gcode");
|
||||
toggle_option("input_shaping_emit", emit_machine_limits_to_gcode);
|
||||
bool input_shaping_emit = emit_machine_limits_to_gcode && m_config->opt_bool("input_shaping_emit");
|
||||
bool reprap = m_config->opt_enum<GCodeFlavor>("gcode_flavor") == GCodeFlavor::gcfRepRapFirmware;
|
||||
toggle_option("input_shaping_type", input_shaping_emit);
|
||||
toggle_option("input_shaping_freq_x", input_shaping_emit);
|
||||
toggle_option("input_shaping_freq_y", input_shaping_emit && !reprap);
|
||||
toggle_option("input_shaping_freq_y", input_shaping_emit && !gcf_is_reprap_firmware);
|
||||
toggle_option("input_shaping_damp_x", input_shaping_emit);
|
||||
toggle_option("input_shaping_damp_y", input_shaping_emit && !reprap);
|
||||
toggle_option("input_shaping_damp_y", input_shaping_emit && !gcf_is_reprap_firmware);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7121,7 +7173,7 @@ void Tab::delete_preset()
|
||||
// "Note, that these printers will be deleted after deleting the selected preset.", ph_printers_only.size()) + "\n\n";
|
||||
//}
|
||||
if (!ph_printers.empty() || !ph_printers_only.empty()) {
|
||||
msg += _L_PLURAL("Following preset will be deleted too.", "Following presets will be deleted too.", ph_printers.size() + ph_printers_only.size());
|
||||
msg += _L_PLURAL("The following preset will be deleted too:", "The following presets will be deleted too:", ph_printers.size() + ph_printers_only.size());
|
||||
for (const std::string &printer : ph_printers) msg += "\n \"" + from_u8(printer) + "\",";
|
||||
for (const std::string &printer : ph_printers_only) msg += "\n \"" + from_u8(printer) + "\",";
|
||||
msg.RemoveLast();
|
||||
@@ -7133,7 +7185,7 @@ void Tab::delete_preset()
|
||||
if (is_base_preset && (current_preset.type == Preset::Type::TYPE_FILAMENT) && action == _utf8(L("Delete"))) {
|
||||
msg += from_u8(_u8L("Are you sure to delete the selected preset?\nIf the preset corresponds to a filament currently in use on your printer, please reset the filament information for that slot."));
|
||||
} else {
|
||||
msg += from_u8((boost::format(_u8L("Are you sure to %1% the selected preset?")) % action).str());
|
||||
msg += from_u8((boost::format(_u8L("Are you sure you want to %1% the selected preset\?")) % action).str());
|
||||
}
|
||||
|
||||
//BBS: add project embedded preset logic and refine is_external
|
||||
@@ -7838,7 +7890,7 @@ void Tab::switch_excluder(int extruder_id, bool reload)
|
||||
if (extruder_id2 > 0)
|
||||
index = get_index_for_extruder(extruder_id2);
|
||||
is_extruder = true;
|
||||
} else if (page->title().StartsWith("Speed limitation")) {
|
||||
} else if (page->title().StartsWith("Motion ability")) {
|
||||
index = get_index_for_extruder(extruder_id == -1 ? 0 : extruder_id, 2);
|
||||
}
|
||||
}
|
||||
@@ -7984,7 +8036,7 @@ void Tab::set_tooltips_text()
|
||||
//m_tt_non_system = &m_ttg_white_bullet_ns;
|
||||
// Text to be shown on the "Undo user changes" button next to each input field.
|
||||
//m_tt_white_bullet = _(L("WHITE BULLET icon indicates that the value is the same as in the last saved preset."));
|
||||
m_tt_value_revert = _(L("Click to drop current modify and reset to saved value."));
|
||||
m_tt_value_revert = _(L("Click to drop current modifications and reset to saved value."));
|
||||
}
|
||||
|
||||
//BBS: GUI refactor
|
||||
|
||||
Reference in New Issue
Block a user