diff --git a/resources/info/nozzle_info.json b/resources/info/nozzle_info.json index e5e6631c0..7673f0a62 100644 --- a/resources/info/nozzle_info.json +++ b/resources/info/nozzle_info.json @@ -1,8 +1,9 @@ { - "version": "1.0.0.1", + "version": "1.0.0.2", "nozzle_hrc": { "hardened_steel": 55, "stainless_steel": 20, + "tungsten_carbide", 85, "brass": 2, "undefine": 0 } diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 174759f3e..ccb311a5e 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -2451,6 +2451,7 @@ int Print::get_hrc_by_nozzle_type(const NozzleType&type) nozzle_type_to_hrc = { {"hardened_steel",55}, {"stainless_steel",20}, + {"tungsten_carbide", 85}, {"brass",2}, {"undefine",0} }; diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 4b48dc339..41718fd7b 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -364,7 +364,8 @@ CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(LayerSeq) static t_config_enum_values s_keys_map_NozzleType { { "undefine", int(NozzleType::ntUndefine) }, { "hardened_steel", int(NozzleType::ntHardenedSteel) }, - { "stainless_steel",int(NozzleType::ntStainlessSteel) }, + { "stainless_steel", int(NozzleType::ntStainlessSteel)}, + { "tungsten_carbide", int(NozzleType::ntTungstenCarbide)}, { "brass", int(NozzleType::ntBrass) } }; CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(NozzleType) @@ -2369,10 +2370,12 @@ void PrintConfigDef::init_fff_params() def->enum_values.push_back("undefine"); def->enum_values.push_back("hardened_steel"); def->enum_values.push_back("stainless_steel"); + def->enum_values.push_back("tungsten_carbide"); def->enum_values.push_back("brass"); def->enum_labels.push_back(L("Undefine")); def->enum_labels.push_back(L("Hardened steel")); def->enum_labels.push_back(L("Stainless steel")); + def->enum_labels.push_back(L("Tungsten carbide")); def->enum_labels.push_back(L("Brass")); def->mode = comDevelop; def->nullable = true; diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index a3065a28d..93791a2bd 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -264,6 +264,7 @@ enum NozzleType { ntUndefine = 0, ntHardenedSteel, ntStainlessSteel, + ntTungstenCarbide, ntBrass, ntCount }; @@ -272,6 +273,7 @@ static std::unordered_mapNozzleTypeEumnToStr = { {NozzleType::ntUndefine, "undefine"}, {NozzleType::ntHardenedSteel, "hardened_steel"}, {NozzleType::ntStainlessSteel, "stainless_steel"}, + {NozzleType::ntTungstenCarbide, "tungsten_carbide"}, {NozzleType::ntBrass, "brass"} }; @@ -279,6 +281,7 @@ static std::unordered_mapNozzleTypeStrToEumn = { {"undefine", NozzleType::ntUndefine}, {"hardened_steel", NozzleType::ntHardenedSteel}, {"stainless_steel", NozzleType::ntStainlessSteel}, + {"tungsten_carbide", NozzleType::ntTungstenCarbide}, {"brass", NozzleType::ntBrass} }; diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 79ee2b3e0..2c920d897 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -6321,6 +6321,8 @@ void MachineObject::parse_new_info(json print) nozzle_obj.nozzle_type = NozzleType::ntStainlessSteel; } else if (type.substr(2, 2) == std::string("01")) { nozzle_obj.nozzle_type = NozzleType::ntHardenedSteel; + } else if (type.substr(2, 2) == std::string("05")) { + nozzle_obj.nozzle_type = NozzleType::ntTungstenCarbide; } } else { nozzle_obj.tool_type = NozzleToolType::NONE_TOOLTYPE; @@ -6797,7 +6799,7 @@ bool DeviceManager::EnableMultiMachine = false; bool DeviceManager::key_field_only = false; std::vector nozzle_diameter_list{ 0.2f,0.4f,0.6f,0.8f }; -std::vector nozzle_type_list{ "hardened_steel", "stainless_steel" }; +std::vector nozzle_type_list {"hardened_steel", "stainless_steel", "tungsten_carbide"}; DeviceManager::DeviceManager(NetworkAgent* agent) { diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index 0fe64a549..0bf038b7b 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -188,7 +188,7 @@ struct Nozzle int id; NozzleToolType tool_type; // H nozzle or Cut NozzleFlowType nozzle_flow; // 0-common 1-high flow - NozzleType nozzle_type; // 0-stainless_steel 1-hardened_steel + NozzleType nozzle_type; // 0-stainless_steel 1-hardened_steel 5-tungsten_carbide float diameter = {0.4f}; // 0-0.2mm 1-0.4mm 2-0.6 mm3-0.8mm int max_temp = 0; int wear = 0; diff --git a/src/slic3r/GUI/PrintOptionsDialog.cpp b/src/slic3r/GUI/PrintOptionsDialog.cpp index 0a321b8b7..74bfede15 100644 --- a/src/slic3r/GUI/PrintOptionsDialog.cpp +++ b/src/slic3r/GUI/PrintOptionsDialog.cpp @@ -794,6 +794,7 @@ wxString PrinterPartsDialog::GetString(NozzleType nozzle_type) const { switch (nozzle_type) { case Slic3r::ntHardenedSteel: return _L("Hardened Steel"); case Slic3r::ntStainlessSteel: return _L("Stainless Steel"); + case Slic3r::ntTungstenCarbide: return _L("Tungsten Carbide"); default: break; } diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index f8cb52e9a..bd174e336 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -2313,6 +2313,9 @@ wxString SelectMachineDialog::format_steel_name(NozzleType type) else if (type == NozzleType::ntStainlessSteel) { return _L("Stainless Steel"); } + else if (type == NozzleType::ntTungstenCarbide) { + return _L("Tungsten Carbide"); + } return _L("Unknown"); } diff --git a/src/slic3r/GUI/SyncAmsInfoDialog.cpp b/src/slic3r/GUI/SyncAmsInfoDialog.cpp index d02d1730f..fa6bab302 100644 --- a/src/slic3r/GUI/SyncAmsInfoDialog.cpp +++ b/src/slic3r/GUI/SyncAmsInfoDialog.cpp @@ -2086,17 +2086,6 @@ void SyncAmsInfoDialog::show_errors(wxString &info) confirm_dlg.on_show(); } -wxString SyncAmsInfoDialog::format_steel_name(NozzleType type) -{ - if (type == NozzleType::ntHardenedSteel) { - return _L("Hardened Steel"); - } else if (type == NozzleType::ntStainlessSteel) { - return _L("Stainless Steel"); - } - - return wxEmptyString; -} - void SyncAmsInfoDialog::Enable_Auto_Refill(bool enable) { if (!m_ams_backup_tip) { return; } diff --git a/src/slic3r/GUI/SyncAmsInfoDialog.hpp b/src/slic3r/GUI/SyncAmsInfoDialog.hpp index 8498dce8b..228bc9a20 100644 --- a/src/slic3r/GUI/SyncAmsInfoDialog.hpp +++ b/src/slic3r/GUI/SyncAmsInfoDialog.hpp @@ -224,7 +224,6 @@ public: std::string get_print_status_info(PrintDialogStatus status); PrintFromType get_print_type() { return m_print_type; }; - wxString format_steel_name(NozzleType type); wxString format_text(wxString &m_msg); PrintDialogStatus get_status() { return m_print_status; } std::vector sort_string(std::vector strArray); diff --git a/src/slic3r/Utils/CalibUtils.cpp b/src/slic3r/Utils/CalibUtils.cpp index bb85f315f..65362b187 100644 --- a/src/slic3r/Utils/CalibUtils.cpp +++ b/src/slic3r/Utils/CalibUtils.cpp @@ -124,6 +124,8 @@ static wxString to_wstring_name(std::string name) return _L("Hardened Steel"); } else if (name == "stainless_steel") { return _L("Stainless Steel"); + } else if (name == "tungsten_carbide") { + return _L("Tungsten Carbide"); } return wxEmptyString;