diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index f83a83468b3..680ad714d68 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -248,6 +248,13 @@ static t_config_enum_values s_keys_map_SeamPosition { }; CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(SeamPosition) +static t_config_enum_values s_keys_map_InternalBridgeFilter { + { "disabled", ibfDisabled }, + { "limited", ibfLimited }, + { "nofilter", ibfNofilter }, +}; +CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(InternalBridgeFilter) + static const t_config_enum_values s_keys_map_SLADisplayOrientation = { { "landscape", sladoLandscape}, { "portrait", sladoPortrait} @@ -1219,19 +1226,32 @@ void PrintConfigDef::init_fff_params() "consider turning it off if you are using large nozzles."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(true)); - - def = this->add("dont_filter_internal_bridges", coBool); + + def = this->add("dont_filter_internal_bridges", coEnum); def->label = L("Don't filter out small internal bridges (experimental)"); def->category = L("Quality"); - def->tooltip = L("This option can help reducing pillowing on top surfaces in heavily slanted or curved models.\n\n" + def->tooltip = L("This option can help reducing pillowing on top surfaces in heavily slanted or curved models.\n\n" "By default, small internal bridges are filtered out and the internal solid infill is printed directly" " over the sparse infill. This works well in most cases, speeding up printing without too much compromise" - " on top surface quality. \n\nHowever, in heavily slanted or curved models especially where too low sparse infill" - " density is used, this may result in curling of the unsupported solid infill, causing pillowing.\n\n " - "Enabling this option will always print an internal bridge layer over even slightly unsupported internal" - " solid infill even in areas where it may be unecessary, increasing print time."); + " on top surface quality. \n\nHowever, in heavily slanted or curved models especially where too low sparse" + " infill density is used, this may result in curling of the unsupported solid infill, causing pillowing.\n\n" + "Enabling this option will print internal bridge layer over slightly unsupported internal" + " solid infill. The options below control the amount of filtering, i.e. the amount of internal bridges " + "created.\n" + "Disabled - Disables this option. This is the default behaviour and works well in most cases.\n" + "Limited filtering - Creates internal bridges on heavily slanted surfaces, while avoiding creating " + "uncessesary interal bridges. This works well for most difficult models.\n" + "No filtering - Creates internal bridges on every potential internal overhang. This option is useful " + "for heavily slanted top surface models. However, in most cases it creates too many unecessary bridges."); + def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); + def->enum_values.push_back("disabled"); + def->enum_values.push_back("limited"); + def->enum_values.push_back("nofilter"); + def->enum_labels.push_back(L("Disabled")); + def->enum_labels.push_back(L("Limited filtering")); + def->enum_labels.push_back(L("No filtering")); def->mode = comAdvanced; - def->set_default_value(new ConfigOptionBool(false)); + def->set_default_value(new ConfigOptionEnum(ibfDisabled)); def = this->add("max_bridge_length", coFloat); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 78330ae81bf..94a5efccc85 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -152,6 +152,10 @@ enum SeamPosition { spNearest, spAligned, spRear, spRandom }; +enum InternalBridgeFilter { + ibfDisabled, ibfLimited, ibfNofilter +}; + enum LiftType { NormalLift, SpiralLift, @@ -744,7 +748,7 @@ PRINT_CONFIG_CLASS_DEFINE( // Orca internal thick bridge ((ConfigOptionBool, thick_bridges)) ((ConfigOptionBool, thick_internal_bridges)) - ((ConfigOptionBool, dont_filter_internal_bridges)) + ((ConfigOptionEnum, dont_filter_internal_bridges)) // Overhang angle threshold. ((ConfigOptionInt, support_threshold_angle)) ((ConfigOptionFloat, support_object_xy_distance)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 02445c4ebf0..da0aff79633 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -2030,7 +2030,7 @@ void PrintObject::bridge_over_infill() // Orca: // Lightning infill benefits from always having a bridge layer so don't filter out small unsupported areas. Also, don't filter small internal unsupported areas if the user has requested so. double expansion_multiplier = 3; - if(has_lightning_infill || po->config().dont_filter_internal_bridges){ + if(has_lightning_infill || po->config().dont_filter_internal_bridges.value !=ibfDisabled){ expansion_multiplier = 1; } // By expanding the lower layer solids, we avoid making bridges from the tiny internal overhangs that are (very likely) supported by previous layer solids @@ -2048,7 +2048,7 @@ void PrintObject::bridge_over_infill() // Orca: If the user has selected to always support internal overhanging regions, no matter how small // skip the filtering - if (po->config().dont_filter_internal_bridges){ + if (po->config().dont_filter_internal_bridges.value == ibfNofilter){ // expand the unsupported area by 4x spacing to trigger internal bridging unsupported = expand(unsupported, 4 * spacing); candidate_surfaces.push_back(CandidateSurface(s, lidx, unsupported, region, 0));