Fix of Add option to change support interface pattern #1197

New config field for switching the support interface pattern between
default (rectilinear for non-soluble interface, concentric for soluble interface),
explicit rectilinear and explicit concentric.

Also the config layer was reworked a bit to reduce some switch statements
on ConfigOptionEnum<> templates.
This commit is contained in:
Vojtech Bubnik 2021-02-24 15:59:09 +01:00
parent 88bd189047
commit 61a5b43ac3
13 changed files with 66 additions and 70 deletions

View file

@ -2341,6 +2341,22 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<SupportMaterialPattern>(smpRectilinear));
def = this->add("support_material_interface_pattern", coEnum);
def->label = L("Interface pattern");
def->category = L("Support material");
def->tooltip = L("Pattern used to generate support material interface. "
"Default pattern for non-soluble support interface is Rectilinear, "
"while default pattern for soluble support interface is Concentric.");
def->enum_keys_map = &ConfigOptionEnum<SupportMaterialInterfacePattern>::get_enum_values();
def->enum_values.push_back("auto");
def->enum_values.push_back("rectilinear");
def->enum_values.push_back("concentric");
def->enum_labels.push_back(L("Default"));
def->enum_labels.push_back(L("Rectilinear"));
def->enum_labels.push_back(L("Concentric"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<SupportMaterialPattern>(smpRectilinear));
def = this->add("support_material_spacing", coFloat);
def->label = L("Pattern spacing");
def->category = L("Support material");