diff --git a/src/libslic3r/Fill/Fill.cpp b/src/libslic3r/Fill/Fill.cpp index 962f74693..98167e139 100644 --- a/src/libslic3r/Fill/Fill.cpp +++ b/src/libslic3r/Fill/Fill.cpp @@ -332,6 +332,11 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out) } params.flow = &flow; + //apply bridge_overlap if needed + if (is_bridge && density > 99 && layerm.region()->config().bridge_overlap.get_abs_value(1) != 1) { + params.density *= layerm.region()->config().bridge_overlap.get_abs_value(1); + } + f->fill_surface_extrusion(&surface, params, out.entities); } diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index e9d4228c6..acd261ad1 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -258,6 +258,15 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloatOrPercent(100, true)); + def = this->add("bridge_overlap", coFloatOrPercent); + def->label = L("Bridge overlap"); + def->full_label = L("Bridge overlap"); + def->category = OptionCategory::width; + def->tooltip = L("Amount of overlap between lines of the bridge. If your bridge flow ratio is low, it may be useful to increaase this setting to let lines touch each other. Default to 100%. A value of 200% will create two times more lines."); + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloatOrPercent(105, true)); + def = this->add("bridge_speed", coFloat); def->label = L("Bridges"); def->full_label = L("Bridge speed"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 5cbfb969b..90460af6e 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -603,9 +603,10 @@ public: ConfigOptionInt bottom_solid_layers; ConfigOptionFloatOrPercent bridge_flow_ratio; ConfigOptionFloatOrPercent over_bridge_flow_ratio; + ConfigOptionFloatOrPercent bridge_overlap; ConfigOptionEnum bottom_fill_pattern; ConfigOptionFloatOrPercent bridged_infill_margin; - ConfigOptionFloat bridge_speed; + ConfigOptionFloat bridge_speed; ConfigOptionFloat curve_smoothing_precision; ConfigOptionFloat curve_smoothing_cutoff_dist; ConfigOptionFloat curve_smoothing_angle_convex; @@ -674,6 +675,7 @@ protected: OPT_PTR(bottom_solid_layers); OPT_PTR(bridge_flow_ratio); OPT_PTR(over_bridge_flow_ratio); + OPT_PTR(bridge_overlap); OPT_PTR(bottom_fill_pattern); OPT_PTR(bridged_infill_margin); OPT_PTR(bridge_speed); diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 194300cc0..5bbe3dd67 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1753,6 +1753,20 @@ void PrintObject::bridge_over_infill() printf("Bridging " PRINTF_ZU " internal areas at layer " PRINTF_ZU "\n", to_bridge.size(), layer->id()); #endif + //add a bit of overlap for the internal bridge, note that this can only be useful in inverted slopes and with extra_perimeters_odd_layers + coord_t overlap_width = 0; + // if extra_perimeters_odd_layers, fill the void if possible + if (region.config().extra_perimeters_odd_layers.value) { + overlap_width = layerm->flow(frPerimeter).scaled_width(); + } + else + { + //half a perimeter should be enough for most of the cases. + overlap_width = layerm->flow(frPerimeter).scaled_width() /2; + } + if (overlap_width > 0) + to_bridge = offset_ex(to_bridge, overlap_width); + // compute the remaning internal solid surfaces as difference ExPolygons not_to_bridge = diff_ex(internal_solid, to_polygons(to_bridge), true); to_bridge = intersection_ex(to_polygons(to_bridge), internal_solid, true); diff --git a/src/slic3r/GUI/Preset.cpp b/src/slic3r/GUI/Preset.cpp index 113d4d013..2ebb9d930 100644 --- a/src/slic3r/GUI/Preset.cpp +++ b/src/slic3r/GUI/Preset.cpp @@ -451,7 +451,9 @@ const std::vector& Preset::print_options() "perimeter_extrusion_width", "external_perimeter_extrusion_width", "infill_extrusion_width", "solid_infill_extrusion_width", "top_infill_extrusion_width", "support_material_extrusion_width", "infill_overlap", "bridge_flow_ratio", "clip_multipart_objects", - "over_bridge_flow_ratio", "clip_multipart_objects", "enforce_full_fill_volume", "external_infill_margin", "bridged_infill_margin", + "over_bridge_flow_ratio", + "bridge_overlap", + "clip_multipart_objects", "enforce_full_fill_volume", "external_infill_margin", "bridged_infill_margin", "elefant_foot_compensation", "xy_size_compensation", "hole_size_compensation", "hole_to_polyhole", "threads", "resolution", diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index c9e788a2a..dd55b6411 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1272,6 +1272,7 @@ void TabPrint::build() optgroup = page->new_optgroup(_(L("Flow"))); line = { _(L("Flow ratio")), "" }; line.append_option(optgroup->get_option("bridge_flow_ratio")); + line.append_option(optgroup->get_option("bridge_overlap")); line.append_option(optgroup->get_option("over_bridge_flow_ratio")); line.append_option(optgroup->get_option("fill_top_flow_ratio")); optgroup->append_line(line);