mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-11 15:39:08 +08:00
ENH: add nozzle type ntTungstenCarbide
jira: [STUDIO-11597] Change-Id: Ibec41549042d253aeb85ba81e93e7c26a4a56ed2
This commit is contained in:
parent
9b585239f7
commit
1352cff314
@ -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
|
||||
}
|
||||
|
@ -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}
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -264,6 +264,7 @@ enum NozzleType {
|
||||
ntUndefine = 0,
|
||||
ntHardenedSteel,
|
||||
ntStainlessSteel,
|
||||
ntTungstenCarbide,
|
||||
ntBrass,
|
||||
ntCount
|
||||
};
|
||||
@ -272,6 +273,7 @@ static std::unordered_map<NozzleType, std::string>NozzleTypeEumnToStr = {
|
||||
{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_map<std::string, NozzleType>NozzleTypeStrToEumn = {
|
||||
{"undefine", NozzleType::ntUndefine},
|
||||
{"hardened_steel", NozzleType::ntHardenedSteel},
|
||||
{"stainless_steel", NozzleType::ntStainlessSteel},
|
||||
{"tungsten_carbide", NozzleType::ntTungstenCarbide},
|
||||
{"brass", NozzleType::ntBrass}
|
||||
};
|
||||
|
||||
|
@ -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<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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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; }
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user