From 4162689a6574b1ec932052b3f7c3299e44245070 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 14 Feb 2023 10:18:06 +0100 Subject: [PATCH] Unify Tree/Organic terminology. + Implemented Enabling/Disabling for parameters of Organic support SPE-1478(https://dev.prusa3d.com/browse/SPE-1478) --- src/libslic3r/PrintConfig.cpp | 18 +++++++++--------- src/slic3r/GUI/ConfigManipulation.cpp | 7 +++++++ src/slic3r/GUI/Tab.cpp | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index f66bf7086..9ba8d7cc7 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2786,7 +2786,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionBool(true)); def = this->add("support_tree_angle", coFloat); - def->label = L("Tree Support Maximum Branch Angle"); + def->label = L("Maximum Branch Angle"); def->category = L("Support material"); def->tooltip = L("The maximum angle of the branches, when the branches have to avoid the model. " "Use a lower angle to make them more vertical and more stable. Use a higher angle to be able to have more reach."); @@ -2797,7 +2797,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloat(40)); def = this->add("support_tree_angle_slow", coFloat); - def->label = L("Tree Support Preferred Branch Angle"); + def->label = L("Preferred Branch Angle"); def->category = L("Support material"); def->tooltip = L("The preferred angle of the branches, when they do not have to avoid the model. " "Use a lower angle to make them more vertical and more stable. Use a higher angle for branches to merge faster."); @@ -2808,18 +2808,18 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloat(25)); def = this->add("support_tree_tip_diameter", coFloat); - def->label = L("Tree Support Tip Diameter"); + def->label = L("Tip Diameter"); def->category = L("Support material"); - def->tooltip = L("The diameter of the top of the tip of the branches of tree support."); + def->tooltip = L("The diameter of the top of the tip of the branches of organic support."); def->sidetext = L("mm"); def->min = 0; def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(0.8)); def = this->add("support_tree_branch_diameter", coFloat); - def->label = L("Tree Support Branch Diameter"); + def->label = L("Branch Diameter"); def->category = L("Support material"); - def->tooltip = L("The diameter of the thinnest branches of tree support. Thicker branches are more sturdy. " + def->tooltip = L("The diameter of the thinnest branches of organic support. Thicker branches are more sturdy. " "Branches towards the base will be thicker than this."); def->sidetext = L("mm"); def->min = 0; @@ -2827,11 +2827,11 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloat(2)); def = this->add("support_tree_branch_diameter_angle", coFloat); - def->label = L("Tree Support Branch Diameter Angle"); + def->label = L("Branch Diameter Angle"); def->category = L("Support material"); def->tooltip = L("The angle of the branches' diameter as they gradually become thicker towards the bottom. " "An angle of 0 will cause the branches to have uniform thickness over their length. " - "A bit of an angle can increase stability of the tree support."); + "A bit of an angle can increase stability of the organic support."); def->sidetext = L("°"); def->min = 0; def->max = 15; @@ -2839,7 +2839,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloat(5)); def = this->add("support_tree_top_rate", coPercent); - def->label = L("Tree Support Branch Density"); + def->label = L("Branch Density"); def->category = L("Support material"); def->tooltip = L("Adjusts the density of the support structure used to generate the tips of the branches. " "A higher value results in better overhangs, but the supports are harder to remove. " diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 50ce24981..0cf85e2f3 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -292,6 +292,13 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config) toggle_field("support_material_bottom_contact_distance", have_support_material && ! have_support_soluble); toggle_field("support_material_closing_radius", have_support_material && support_material_style == smsSnug); + const bool has_organic_supports = support_material_style == smsOrganic && + (config->opt_bool("support_material") || + config->opt_int("support_material_enforce_layers") > 0); + for (const std::string& key : { "support_tree_angle", "support_tree_angle_slow", "support_tree_branch_diameter", + "support_tree_branch_diameter_angle", "support_tree_tip_diameter", "support_tree_top_rate" }) + toggle_field(key, has_organic_supports); + for (auto el : { "support_material_bottom_interface_layers", "support_material_interface_spacing", "support_material_interface_extruder", "support_material_interface_speed", "support_material_interface_contact_loops" }) toggle_field(el, have_support_material && have_support_interface); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 32dbd2232..9cc7d9b13 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1526,7 +1526,7 @@ void TabPrint::build() optgroup->append_single_option_line("dont_support_bridges", category_path + "dont-support-bridges"); optgroup->append_single_option_line("support_material_synchronize_layers", category_path + "synchronize-with-object-layers"); - optgroup = page->new_optgroup(L("Tree supports")); + optgroup = page->new_optgroup(L("Organic supports")); optgroup->append_single_option_line("support_tree_angle", category_path + "tree_angle"); optgroup->append_single_option_line("support_tree_angle_slow", category_path + "tree_angle_slow"); optgroup->append_single_option_line("support_tree_branch_diameter", category_path + "tree_branch_diameter");