mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
ENH: support styles to sets
Change-Id: I18d4add12907d4d4a10980c1f1244e287934c34c (cherry picked from commit 8ead53319222a2ab4bd76b434afcd657e5045fc7)
This commit is contained in:
parent
b3c4447191
commit
54e47bba33
3 changed files with 45 additions and 4 deletions
|
@ -429,6 +429,19 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||
m_support_material_overhangs_queried = false;
|
||||
}
|
||||
|
||||
if (config->opt_bool("enable_support")) {
|
||||
auto support_type = config->opt_enum<SupportType>("support_type");
|
||||
auto support_style = config->opt_enum<SupportMaterialStyle>("support_style");
|
||||
std::set<int> enum_set_normal = {0, 1, 2};
|
||||
std::set<int> enum_set_tree = {0, 3, 4, 5};
|
||||
auto & set = is_tree(support_type) ? enum_set_tree : enum_set_normal;
|
||||
if (set.find(support_style) == set.end()) {
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
new_conf.set_key_value("support_style", new ConfigOptionEnum<SupportMaterialStyle>(smsDefault));
|
||||
apply(config, &new_conf);
|
||||
}
|
||||
}
|
||||
|
||||
if (config->option<ConfigOptionPercent>("sparse_infill_density")->value == 100) {
|
||||
std::string sparse_infill_pattern = config->option<ConfigOptionEnum<InfillPattern>>("sparse_infill_pattern")->serialize();
|
||||
const auto &top_fill_pattern_values = config->def()->get("top_surface_pattern")->enum_values;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue