ENH: add printer structure in code
Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I57c24a0ea977b510932970817d67570ab3fe7bc4 (cherry picked from commit 409f03de471f65b9edf5c733b691e280c18c19cc)
This commit is contained in:
parent
4ac098df4d
commit
9bf251c54c
|
@ -852,7 +852,7 @@ static std::vector<std::string> s_Preset_printer_options {
|
|||
"silent_mode",
|
||||
// BBS
|
||||
"scan_first_layer", "machine_load_filament_time", "machine_unload_filament_time", "machine_pause_gcode", "template_custom_gcode",
|
||||
"nozzle_type","auxiliary_fan", "nozzle_volume","upward_compatible_machine", "z_hop_types","support_chamber_temp_control","support_air_filtration",
|
||||
"nozzle_type","auxiliary_fan", "nozzle_volume","upward_compatible_machine", "z_hop_types","support_chamber_temp_control","support_air_filtration","printer_structure",
|
||||
//OrcaSlicer
|
||||
"host_type", "print_host", "printhost_apikey",
|
||||
"print_host_webui",
|
||||
|
|
|
@ -299,6 +299,15 @@ static t_config_enum_values s_keys_map_NozzleType {
|
|||
};
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(NozzleType)
|
||||
|
||||
static t_config_enum_values s_keys_map_PrinterStructure {
|
||||
{"undefine", int(PrinterStructure::psUndefine)},
|
||||
{"corexy", int(PrinterStructure::psCoreXY)},
|
||||
{"i3", int(PrinterStructure::psI3)},
|
||||
{"hbot", int(PrinterStructure::psHbot)},
|
||||
{"delta", int(PrinterStructure::psDelta)}
|
||||
};
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(PrinterStructure)
|
||||
|
||||
static t_config_enum_values s_keys_map_PerimeterGeneratorType{
|
||||
{ "classic", int(PerimeterGeneratorType::Classic) },
|
||||
{ "arachne", int(PerimeterGeneratorType::Arachne) }
|
||||
|
@ -1739,6 +1748,23 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionEnum<NozzleType>(ntUndefine));
|
||||
|
||||
def = this->add("printer_structure", coEnum);
|
||||
def->label = L("Printer structure");
|
||||
def->tooltip = L("The physical arrangement and components of a printing device");
|
||||
def->enum_keys_map = &ConfigOptionEnum<PrinterStructure>::get_enum_values();
|
||||
def->enum_values.push_back("undefine");
|
||||
def->enum_values.push_back("corexy");
|
||||
def->enum_values.push_back("i3");
|
||||
def->enum_values.push_back("hbot");
|
||||
def->enum_values.push_back("delta");
|
||||
def->enum_labels.push_back(L("Undefine"));
|
||||
def->enum_labels.push_back(L("CoreXY"));
|
||||
def->enum_labels.push_back(L("I3"));
|
||||
def->enum_labels.push_back(L("Hbot"));
|
||||
def->enum_labels.push_back(L("Delta"));
|
||||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionEnum<PrinterStructure>(psUndefine));
|
||||
|
||||
def = this->add("auxiliary_fan", coBool);
|
||||
def->label = L("Auxiliary part cooling fan");
|
||||
def->tooltip = L("Enable this option if machine has auxiliary part cooling fan");
|
||||
|
|
|
@ -210,6 +210,15 @@ enum NozzleType {
|
|||
ntCount
|
||||
};
|
||||
|
||||
// BBS
|
||||
enum PrinterStructure {
|
||||
psUndefine=0,
|
||||
psCoreXY,
|
||||
psI3,
|
||||
psHbot,
|
||||
psDelta
|
||||
};
|
||||
|
||||
// BBS
|
||||
enum ZHopType {
|
||||
zhtAuto = 0,
|
||||
|
@ -878,6 +887,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionString, template_custom_gcode))
|
||||
//BBS
|
||||
((ConfigOptionEnum<NozzleType>, nozzle_type))
|
||||
((ConfigOptionEnum<PrinterStructure>,printer_structure))
|
||||
((ConfigOptionBool, auxiliary_fan))
|
||||
((ConfigOptionBool, support_chamber_temp_control))
|
||||
((ConfigOptionBool, support_air_filtration))
|
||||
|
|
|
@ -3091,6 +3091,7 @@ void TabPrinter::build_fff()
|
|||
#endif
|
||||
|
||||
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
|
||||
optgroup->append_single_option_line("printer_structure");
|
||||
optgroup->append_single_option_line("gcode_flavor");
|
||||
optgroup->append_single_option_line("scan_first_layer");
|
||||
optgroup->append_single_option_line("use_relative_e_distances");
|
||||
|
@ -3672,6 +3673,7 @@ void TabPrinter::toggle_options()
|
|||
toggle_option("single_extruder_multi_material", have_multiple_extruders);
|
||||
//BBS: gcode_flavore of BBL printer can't be edited and changed
|
||||
toggle_option("gcode_flavor", !is_BBL_printer);
|
||||
toggle_option("printer_structure", !is_BBL_printer);
|
||||
toggle_option("use_relative_e_distances", !is_BBL_printer);
|
||||
|
||||
toggle_option("support_chamber_temp_control",!is_BBL_printer);
|
||||
|
|
Loading…
Reference in New Issue