diff --git a/resources/profiles/BBL/process/fdm_process_bbl_common.json b/resources/profiles/BBL/process/fdm_process_bbl_common.json index 3090f15ed..49a62e365 100644 --- a/resources/profiles/BBL/process/fdm_process_bbl_common.json +++ b/resources/profiles/BBL/process/fdm_process_bbl_common.json @@ -82,6 +82,7 @@ "support_interface_top_layers": "2", "support_interface_bottom_layers": "2", "support_interface_spacing": "0.5", + "support_expansion": "0", "support_interface_speed": "80", "support_base_pattern": "rectilinear", "support_base_pattern_spacing": "2.5", diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 47ce65a4c..b19b92a01 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -708,7 +708,7 @@ static std::vector s_Preset_print_options { "outer_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "skirt_loops", "skirt_distance", "skirt_height", "draft_shield", "brim_width", "brim_object_gap", "brim_type", "enable_support", "support_type", "support_threshold_angle", "enforce_support_layers", "raft_layers", "raft_first_layer_density", "raft_first_layer_expansion", "raft_contact_distance", "raft_expansion", - "support_base_pattern", "support_base_pattern_spacing", "support_style", + "support_base_pattern", "support_base_pattern_spacing", "support_expansion", "support_style", // BBS //"independent_support_layer_height", "support_angle", "support_interface_top_layers", "support_interface_bottom_layers", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 3e1d2092d..51d677dad 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2593,6 +2593,14 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(2.5)); + def = this->add("support_expansion", coFloat); + def->label = L("Support xy expansion distance"); + def->category = L("Support"); + def->tooltip = L("Expanding (+) or shrinking (-) support volume"); + def->sidetext = L("mm"); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloat(0)); + def = this->add("support_speed", coFloat); def->label = L("Support"); def->category = L("Speed"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 6dceaedfc..446da331c 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -634,6 +634,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionEnum, support_interface_pattern)) // Spacing between support material lines (the hatching distance). ((ConfigOptionFloat, support_base_pattern_spacing)) + ((ConfigOptionFloat, support_expansion)) ((ConfigOptionFloat, support_speed)) ((ConfigOptionEnum, support_style)) // BBS diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index befa80233..29d585951 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -739,6 +739,7 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "support_style" || opt_key == "support_object_xy_distance" || opt_key == "support_base_pattern_spacing" + || opt_key == "support_expansion" //|| opt_key == "independent_support_layer_height" // BBS || opt_key == "support_threshold_angle" || opt_key == "raft_expansion" diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp index fbbecdb45..f7c4f2869 100644 --- a/src/libslic3r/SupportMaterial.cpp +++ b/src/libslic3r/SupportMaterial.cpp @@ -1512,6 +1512,7 @@ static inline Polygons detect_overhangs( 0.; const coordf_t max_bridge_length = scale_(object_config.max_bridge_length.value); const bool bridge_no_support = object_config.bridge_no_support.value; + const coordf_t xy_expansion = scale_(object_config.support_expansion.value); if (layer_id == 0) { @@ -1567,9 +1568,9 @@ static inline Polygons detect_overhangs( // Offset the support regions back to a full overhang, restrict them to the full overhang. // This is done to increase size of the supporting columns below, as they are calculated by // propagating these contact surfaces downwards. - diff_polygons = diff( - intersection(expand(diff_polygons, lower_layer_offset, SUPPORT_SURFACES_OFFSET_PARAMETERS), layerm_polygons), - lower_layer_polygons); + diff_polygons = + expand(diff(intersection(expand(diff_polygons, lower_layer_offset, SUPPORT_SURFACES_OFFSET_PARAMETERS), layerm_polygons), lower_layer_polygons), + xy_expansion, SUPPORT_SURFACES_OFFSET_PARAMETERS); } //FIXME add user defined filtering here based on minimal area or minimum radius or whatever. diff --git a/src/libslic3r/SupportMaterial.hpp b/src/libslic3r/SupportMaterial.hpp index fd378d93b..861126fcb 100644 --- a/src/libslic3r/SupportMaterial.hpp +++ b/src/libslic3r/SupportMaterial.hpp @@ -136,6 +136,7 @@ public: float base_angle; float interface_angle; coordf_t interface_spacing; + coordf_t support_expansion; coordf_t interface_density; coordf_t support_spacing; coordf_t support_density; diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index a5b3e49ed..2de347489 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -528,7 +528,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co bool have_support_soluble = have_support_material && config->opt_float("support_top_z_distance") == 0; auto support_style = config->opt_enum("support_style"); for (auto el : { "support_style", "support_base_pattern", - "support_base_pattern_spacing", "support_angle", + "support_base_pattern_spacing", "support_expansion", "support_angle", "support_interface_pattern", "support_interface_top_layers", "support_interface_bottom_layers", "bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance", //BBS: add more support params to dependent of enable_support diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp index 24213a04b..8cf3d5491 100644 --- a/src/slic3r/GUI/GUI_Factories.cpp +++ b/src/slic3r/GUI/GUI_Factories.cpp @@ -56,7 +56,7 @@ static SettingsFactory::Bundle FREQ_SETTINGS_BUNDLE_FFF = // BBS { L("Support") , { "enable_support", "support_type", "support_threshold_angle", "support_base_pattern", "support_on_build_plate_only","support_critical_regions_only", - "support_base_pattern_spacing" } }, + "support_base_pattern_spacing", "support_expansion"}}, //BBS { L("Flush options") , { "flush_into_infill", "flush_into_objects", "flush_into_support"} } }; @@ -78,7 +78,7 @@ std::map> SettingsFactory::OBJECT_C }}, { L("Support"), {{"brim_type", "",1},{"brim_width", "",2},{"brim_object_gap", "",3}, {"enable_support", "",4},{"support_type", "",5},{"support_threshold_angle", "",6},{"support_on_build_plate_only", "",7}, - {"support_filament", "",8},{"support_interface_filament", "",9}, + {"support_filament", "",8},{"support_interface_filament", "",9},{"support_expansion", "",25}, {"tree_support_branch_angle", "",10}, {"tree_support_wall_count", "",11},{"tree_support_with_infill", "",12},//tree support {"support_top_z_distance", "",13},{"support_bottom_z_distance", "",24},{"support_base_pattern", "",14},{"support_base_pattern_spacing", "",15}, {"support_interface_top_layers", "",16},{"support_interface_bottom_layers", "",17},{"support_interface_spacing", "",18},{"support_bottom_interface_spacing", "",19}, diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 7d4066650..e2e2b00bb 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1899,6 +1899,7 @@ void TabPrint::build() optgroup->append_single_option_line("support_interface_pattern", "support#base-pattern"); optgroup->append_single_option_line("support_interface_spacing", "support#base-pattern"); optgroup->append_single_option_line("support_bottom_interface_spacing"); + optgroup->append_single_option_line("support_expansion", "support#base-pattern"); //optgroup->append_single_option_line("support_interface_loop_pattern"); optgroup->append_single_option_line("support_object_xy_distance", "support#supportobject-xy-distance");