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."
This commit is contained in:
Vojtech Bubnik 2021-05-04 18:27:53 +02:00
parent 00835c7367
commit fd3dd1611c

View file

@ -160,11 +160,9 @@ std::vector<SurfaceFill> 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)