From c77a21e0b3f379df654ae0799ba63587db35a47b Mon Sep 17 00:00:00 2001 From: supermerill Date: Thu, 14 Feb 2019 17:51:24 +0100 Subject: [PATCH] add some options to filamentType --- src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 40 +++++++++++++++++++++--- src/libslic3r/GCode/WipeTowerPrusaMM.hpp | 12 ++++++- src/libslic3r/PrintConfig.cpp | 10 ++++++ src/libslic3r/PrintConfig.hpp | 11 +++++++ 4 files changed, 67 insertions(+), 6 deletions(-) diff --git a/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index 752362193..854001860 100644 --- a/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -466,9 +466,29 @@ WipeTowerPrusaMM::material_type WipeTowerPrusaMM::parse_material(const char *nam if (strcasecmp(name, "EDGE") == 0) return EDGE; if (strcasecmp(name, "NGEN") == 0) - return NGEN; - if (strcasecmp(name, "PVA") == 0) - return PVA; + return NGEN; + if (strcasecmp(name, "PVA") == 0) + return PVA; + if (strcasecmp(name, "other0") == 0) + return other0; + if (strcasecmp(name, "other1") == 0) + return other1; + if (strcasecmp(name, "other2") == 0) + return other2; + if (strcasecmp(name, "other3") == 0) + return other3; + if (strcasecmp(name, "other4") == 0) + return other4; + if (strcasecmp(name, "other5") == 0) + return other5; + if (strcasecmp(name, "other6") == 0) + return other6; + if (strcasecmp(name, "other7") == 0) + return other7; + if (strcasecmp(name, "other8") == 0) + return other8; + if (strcasecmp(name, "other9") == 0) + return other9; return INVALID; } @@ -482,8 +502,18 @@ std::string WipeTowerPrusaMM::to_string(material_type material) case FLEX: return "FLEX"; case SCAFF: return "SCAFF"; case EDGE: return "EDGE"; - case NGEN: return "NGEN"; - case PVA: return "PVA"; + case NGEN: return "NGEN"; + case PVA: return "PVA"; + case other0: return "other0"; + case other1: return "other1"; + case other2: return "other2"; + case other3: return "other3"; + case other4: return "other4"; + case other5: return "other5"; + case other6: return "other6"; + case other7: return "other7"; + case other8: return "other8"; + case other9: return "other9"; case INVALID: default: return "INVALID"; } diff --git a/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index 793518293..d9de2229b 100644 --- a/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -34,7 +34,17 @@ public: SCAFF = 5, // E:215C B:55C EDGE = 6, // E:240C B:80C NGEN = 7, // E:230C B:80C - PVA = 8 // E:210C B:80C + PVA = 8, // E:210C B:80C + other0 = 10, + other1 = 11, + other2 = 12, + other3 = 13, + other4 = 14, + other5 = 15, + other6 = 16, + other7 = 17, + other8 = 18, + other9 = 19, }; // Parse material name into material_type. diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 9806a08cb..05b99d1b2 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -871,6 +871,16 @@ void PrintConfigDef::init_fff_params() def->enum_values.push_back("EDGE"); def->enum_values.push_back("NGEN"); def->enum_values.push_back("PVA"); + def->enum_values.push_back("other0"); + def->enum_values.push_back("other1"); + def->enum_values.push_back("other2"); + def->enum_values.push_back("other3"); + def->enum_values.push_back("other4"); + def->enum_values.push_back("other5"); + def->enum_values.push_back("other6"); + def->enum_values.push_back("other7"); + def->enum_values.push_back("other8"); + def->enum_values.push_back("other9"); def->mode = comAdvanced; def->default_value = new ConfigOptionStrings { "PLA" }; diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 8ff0a64d8..26ce58387 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -64,6 +64,7 @@ enum SeamPosition { enum FilamentType { ftPLA, ftABS, ftPET, ftHIPS, ftFLEX, ftSCAFF, ftEDGE, ftNGEN, ftPVA + , ftOther0, ftOther1, ftOther2, ftOther3, ftOther4, ftOther5, ftOther6, ftOther7, ftOther8, ftOther9 }; enum DenseInfillAlgo { @@ -190,6 +191,16 @@ template<> inline const t_config_enum_values& ConfigOptionEnum::ge keys_map["EDGE"] = ftEDGE; keys_map["NGEN"] = ftNGEN; keys_map["PVA"] = ftPVA; + keys_map["other0"] = ftOther0; + keys_map["other1"] = ftOther1; + keys_map["other2"] = ftOther2; + keys_map["other3"] = ftOther3; + keys_map["other4"] = ftOther4; + keys_map["other5"] = ftOther5; + keys_map["other6"] = ftOther6; + keys_map["other7"] = ftOther7; + keys_map["other8"] = ftOther8; + keys_map["other9"] = ftOther9; } return keys_map; }