diff --git a/bbl/i18n/zh_cn/BambuStudio_zh_CN.po b/bbl/i18n/zh_cn/BambuStudio_zh_CN.po index a17bc46bc..d0436349e 100644 --- a/bbl/i18n/zh_cn/BambuStudio_zh_CN.po +++ b/bbl/i18n/zh_cn/BambuStudio_zh_CN.po @@ -7864,6 +7864,12 @@ msgid "" "etc." msgstr "仅对关键区域生成支撑,包括尖尾、悬臂等。" +msgid "Remove small overhangs" +msgstr "移除小悬空" + +msgid "Remove small overhangs that possibly need no supports." +msgstr "移除可能并不需要支撑的小悬空。" + msgid "Top Z distance" msgstr "顶部Z距离" diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index a12c344d5..6eddf4ad2 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -728,7 +728,8 @@ static std::vector s_Preset_print_options { "independent_support_layer_height", "support_angle", "support_interface_top_layers", "support_interface_bottom_layers", "support_interface_pattern", "support_interface_spacing", "support_interface_loop_pattern", - "support_top_z_distance", "support_on_build_plate_only","support_critical_regions_only", "bridge_no_support", "thick_bridges", "max_bridge_length", "print_sequence", + "support_top_z_distance", "support_on_build_plate_only","support_critical_regions_only", "support_remove_small_overhang", + "bridge_no_support", "thick_bridges", "max_bridge_length", "print_sequence", "filename_format", "wall_filament", "support_bottom_z_distance", "sparse_infill_filament", "solid_infill_filament", "support_filament", "support_interface_filament", "ooze_prevention", "standby_temperature_delta", "interface_shells", "line_width", "initial_layer_line_width", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 44b742ec5..81ad3b7c8 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2566,6 +2566,13 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); + def = this->add("support_remove_small_overhang", coBool); + def->label = L("Remove small overhangs"); + def->category = L("Support"); + def->tooltip = L("Remove small overhangs that possibly need no supports."); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionBool(true)); + // BBS: change type to common float. // It may be rounded to mulitple layer height when independent_support_layer_height is false. def = this->add("support_top_z_distance", coFloat); @@ -4025,7 +4032,7 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va , "max_volumetric_extrusion_rate_slope_positive", "max_volumetric_extrusion_rate_slope_negative" #endif /* HAS_PRESSURE_EQUALIZER */ // BBS - , "support_sharp_tails","remove_small_overhangs", "support_with_sheath", + , "support_sharp_tails","support_remove_small_overhangs", "support_with_sheath", "tree_support_branch_diameter_angle", "tree_support_collision_resolution", "tree_support_with_infill", "small_perimeter_speed", "max_volumetric_speed", "max_print_speed", "support_closing_radius", diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index d0487552e..a024f3981 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -649,6 +649,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloat, support_angle)) ((ConfigOptionBool, support_on_build_plate_only)) ((ConfigOptionBool, support_critical_regions_only)) + ((ConfigOptionBool, support_remove_small_overhang)) ((ConfigOptionFloat, support_top_z_distance)) ((ConfigOptionFloat, support_bottom_z_distance)) ((ConfigOptionInt, enforce_support_layers)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index c6c38c658..88a4c1bb2 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -762,6 +762,7 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "support_angle" || opt_key == "support_on_build_plate_only" || opt_key == "support_critical_regions_only" + || opt_key == "support_remove_small_overhang" || opt_key == "enforce_support_layers" || opt_key == "support_filament" || opt_key == "support_line_width" diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp index 1abedc407..351d124ac 100644 --- a/src/libslic3r/SupportMaterial.cpp +++ b/src/libslic3r/SupportMaterial.cpp @@ -2351,7 +2351,8 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::top_contact_ return MyLayersPtr(); // BBS group overhang clusters - if (g_config_remove_small_overhangs) { + const bool config_remove_small_overhangs = m_object_config->support_remove_small_overhang.value; + if (config_remove_small_overhangs) { std::vector clusters; double fw_scaled = scale_(m_object_config->line_width); std::set removed_overhang; diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp index 5446f97c3..4dc457077 100644 --- a/src/libslic3r/TreeSupport.cpp +++ b/src/libslic3r/TreeSupport.cpp @@ -726,6 +726,7 @@ void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only) const coordf_t max_bridge_length = scale_(config.max_bridge_length.value); const bool bridge_no_support = max_bridge_length > 0; const bool support_critical_regions_only = config.support_critical_regions_only.value; + const bool config_remove_small_overhangs = config.support_remove_small_overhang.value; const int enforce_support_layers = config.enforce_support_layers.value; const double area_thresh_well_supported = SQ(scale_(6)); const double length_thresh_well_supported = scale_(6); @@ -1043,7 +1044,7 @@ void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only) auto blockers = m_object->slice_support_blockers(); m_object->project_and_append_custom_facets(false, EnforcerBlockerType::ENFORCER, enforcers); m_object->project_and_append_custom_facets(false, EnforcerBlockerType::BLOCKER, blockers); - if (is_auto(stype) && g_config_remove_small_overhangs) { + if (is_auto(stype) && config_remove_small_overhangs) { if (blockers.size() < m_object->layer_count()) blockers.resize(m_object->layer_count()); for (auto& cluster : overhangClusters) { diff --git a/src/libslic3r/libslic3r.h b/src/libslic3r/libslic3r.h index a92b8f644..c4891473b 100644 --- a/src/libslic3r/libslic3r.h +++ b/src/libslic3r/libslic3r.h @@ -90,7 +90,6 @@ static constexpr bool RELATIVE_E_AXIS = 1; //BBS: some global const config which user can not change, but developer can static constexpr bool g_config_support_sharp_tails = true; -static constexpr bool g_config_remove_small_overhangs = true; static constexpr float g_config_tree_support_collision_resolution = 0.2; // Write slices as SVG images into out directory during the 2D processing of the slices. diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 0782cbbef..0e1098c1d 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -597,6 +597,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co "bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance", //BBS: add more support params to dependent of enable_support "support_type", "support_on_build_plate_only", "support_critical_regions_only", + "support_remove_small_overhang", "support_object_xy_distance"/*, "independent_support_layer_height"*/}) toggle_field(el, have_support_material); toggle_field("support_threshold_angle", have_support_material && is_auto(support_type)); diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp index 5756ea208..98a814f25 100644 --- a/src/slic3r/GUI/GUI_Factories.cpp +++ b/src/slic3r/GUI/GUI_Factories.cpp @@ -57,6 +57,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_remove_small_overhang", "support_base_pattern_spacing", "support_expansion"}}, //BBS { L("Flush options") , { "flush_into_infill", "flush_into_objects", "flush_into_support"} } @@ -83,7 +84,7 @@ std::map> SettingsFactory::OBJECT_C {"tree_support_brim_width", "",26}, {"tree_support_branch_angle", "",10}, {"tree_support_wall_count", "",11},//tree support {"support_top_z_distance", "",13},{"support_bottom_z_distance", "",12},{"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}, - {"support_object_xy_distance", "",20}, {"bridge_no_support", "",21},{"max_bridge_length", "",22},{"support_critical_regions_only", "",23} + {"support_object_xy_distance", "",20}, {"bridge_no_support", "",21},{"max_bridge_length", "",22},{"support_critical_regions_only", "",23},{"support_remove_small_overhang","",27} }}, { L("Speed"), {{"support_speed", "",12}, {"support_interface_speed", "",13} }} @@ -140,7 +141,7 @@ std::vector SettingsFactory::get_visible_options(const std::s //Quality "layer_height", "initial_layer_print_height", "adaptive_layer_height", "seam_position", "xy_hole_compensation", "xy_contour_compensation", "elefant_foot_compensation", "support_line_width", //Support - "enable_support", "support_type", "support_threshold_angle", "support_on_build_plate_only", "support_critical_regions_only", "enforce_support_layers", + "enable_support", "support_type", "support_threshold_angle", "support_on_build_plate_only", "support_critical_regions_only", "enforce_support_layers","support_remove_small_overhang", //tree support "tree_support_wall_count", //support diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 0ec8226a7..3d480d42d 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1950,6 +1950,7 @@ void TabPrint::build() optgroup->append_single_option_line("support_threshold_angle", "support#threshold-angle"); optgroup->append_single_option_line("support_on_build_plate_only"); optgroup->append_single_option_line("support_critical_regions_only"); + optgroup->append_single_option_line("support_remove_small_overhang"); //optgroup->append_single_option_line("enforce_support_layers"); optgroup = page->new_optgroup(L("Raft"), L"param_raft");