ENH: add nozzle type ntTungstenCarbide

jira: [STUDIO-11597]
Change-Id: Ibec41549042d253aeb85ba81e93e7c26a4a56ed2
(cherry picked from commit 1352cff31427eadd2c85ce4c9602ab3379a5ae9e)
This commit is contained in:
xin.zhang
2025-04-16 14:16:53 +08:00
committed by Noisyfox
parent 285c237095
commit 472a48acc6
11 changed files with 20 additions and 16 deletions

View File

@@ -6221,6 +6221,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;
@@ -6696,7 +6698,7 @@ bool DeviceManager::EnableMultiMachine = false;
bool DeviceManager::key_field_only = false;
std::vector<float> nozzle_diameter_list{ 0.2f,0.4f,0.6f,0.8f };
std::vector<std::string> nozzle_type_list{ "hardened_steel", "stainless_steel" };
std::vector<std::string> nozzle_type_list {"hardened_steel", "stainless_steel", "tungsten_carbide"};
DeviceManager::DeviceManager(NetworkAgent* agent)
{

View File

@@ -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;

View File

@@ -792,6 +792,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;
}

View File

@@ -2308,6 +2308,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");
}

View File

@@ -2088,17 +2088,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; }

View File

@@ -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<std::string> sort_string(std::vector<std::string> strArray);