From fd3dd1611ca26300c69ff1e743c209235d934bf3 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Tue, 4 May 2021 18:27:53 +0200 Subject: [PATCH] Fixed alignment of sparse infill over multiple layers of the same region, which was broken with 68666de521b1cb15e41ac6728c0e8d3b4b0d4ed0 "Reworked the "new" bridging to respect the bridge_flow_ratio by maintaining extrusion spacing, but modifying the extrusion width and / or height." --- src/libslic3r/Fill/Fill.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/Fill/Fill.cpp b/src/libslic3r/Fill/Fill.cpp index 579259a5f..7d225dbd4 100644 --- a/src/libslic3r/Fill/Fill.cpp +++ b/src/libslic3r/Fill/Fill.cpp @@ -160,11 +160,9 @@ std::vector group_fills(const Layer &layer) params.anchor_length = 1000.f; params.anchor_length_max = 1000.f; } else { - // it's internal infill, so we can calculate a generic flow spacing - // for all layers, for avoiding the ugly effect of - // misaligned infill on first layer because of different extrusion width and - // layer height - params.spacing = layerm.flow(frInfill, layer.object()->config().layer_height).spacing(); + // Internal infill. Calculating infill line spacing independent of the current layer height and 1st layer status, + // so that internall infill will be aligned over all layers of the current region. + params.spacing = layerm.region()->flow(*layer.object(), frInfill, layer.object()->config().layer_height, false).spacing(); // Anchor a sparse infill to inner perimeters with the following anchor length: params.anchor_length = float(region_config.infill_anchor); if (region_config.infill_anchor.percent)