From 32c05aa47a84076ce533c754d22ffdaa7ea0b801 Mon Sep 17 00:00:00 2001 From: PavelMikus Date: Thu, 6 Apr 2023 14:54:27 +0200 Subject: [PATCH] Fix bridging over infill - After wrong flow has been fixed, another problem appeared with small layer heights -the bridging layer was not generated --- src/libslic3r/PrintObject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 86355fac2b..9a47325efa 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1741,7 +1741,7 @@ void PrintObject::bridge_over_infill() // cluster layers by depth needed for thick bridges. Each cluster is to be processed by single thread sequentially, so that bridges cannot appear one on another std::vector> clustered_layers_for_threads; - float target_flow_height_factor = 0.75; + float target_flow_height_factor = 0.9; { std::vector layers_with_candidates; std::map layer_area_covered_by_candidates; @@ -1800,9 +1800,9 @@ void PrintObject::bridge_over_infill() ExPolygons not_sparse_infill{}; double bottom_z = po->get_layer(lidx)->print_z - target_flow_height * target_flow_height_factor - EPSILON; for (int i = int(lidx) - 1; i >= 0; --i) { - // Stop iterating if layer is lower than bottom_z. + // Stop iterating if layer is lower than bottom_z and at least one iteration was made const Layer *layer = po->get_layer(i); - if (layer->print_z < bottom_z) + if (layer->print_z < bottom_z && i < int(lidx) - 1) break; for (const LayerRegion *region : layer->regions()) {