Extend the "filament type" list with PC or allow free form text into the filament type field. #1704
This commit is contained in:
bubnikv 2019-05-17 11:46:46 +02:00
parent de8db7ccc4
commit c7f6e5436c
4 changed files with 21 additions and 3 deletions

View File

@ -474,6 +474,8 @@ WipeTowerPrusaMM::material_type WipeTowerPrusaMM::parse_material(const char *nam
return NGEN;
if (strcasecmp(name, "PVA") == 0)
return PVA;
if (strcasecmp(name, "PC") == 0)
return PC;
return INVALID;
}
@ -489,6 +491,7 @@ std::string WipeTowerPrusaMM::to_string(material_type material)
case EDGE: return "EDGE";
case NGEN: return "NGEN";
case PVA: return "PVA";
case PC: return "PC";
case INVALID:
default: return "INVALID";
}

View File

@ -34,7 +34,8 @@ 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
PC = 9
};
// Parse material name into material_type.

View File

@ -699,12 +699,22 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("PLA");
def->enum_values.push_back("ABS");
def->enum_values.push_back("PET");
def->enum_values.push_back("HIPS");
def->enum_values.push_back("FLEX");
def->enum_values.push_back("SCAFF");
def->enum_values.push_back("HIPS");
def->enum_values.push_back("EDGE");
def->enum_values.push_back("NGEN");
def->enum_values.push_back("NYLON");
def->enum_values.push_back("PVA");
def->enum_values.push_back("PC");
def->enum_values.push_back("PP");
def->enum_values.push_back("PEI");
def->enum_values.push_back("PEEK");
def->enum_values.push_back("PEKK");
def->enum_values.push_back("POM");
def->enum_values.push_back("PSU");
def->enum_values.push_back("PVDF");
def->enum_values.push_back("SCAFF");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionStrings { "PLA" });

View File

@ -46,9 +46,11 @@ enum SeamPosition {
spRandom, spNearest, spAligned, spRear
};
/*
enum FilamentType {
ftPLA, ftABS, ftPET, ftHIPS, ftFLEX, ftSCAFF, ftEDGE, ftNGEN, ftPVA
};
*/
enum SLADisplayOrientation {
sladoLandscape,
@ -137,6 +139,7 @@ template<> inline const t_config_enum_values& ConfigOptionEnum<SeamPosition>::ge
return keys_map;
}
/*
template<> inline const t_config_enum_values& ConfigOptionEnum<FilamentType>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
@ -152,6 +155,7 @@ template<> inline const t_config_enum_values& ConfigOptionEnum<FilamentType>::ge
}
return keys_map;
}
*/
template<> inline const t_config_enum_values& ConfigOptionEnum<SLADisplayOrientation>::get_enum_values() {
static const t_config_enum_values keys_map = {