diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 02586fbcb2e..77a1d932182 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -1504,8 +1504,9 @@ void PerimeterGenerator::process_classic() for (size_t order_idx = 0; order_idx < surface_order.size(); order_idx++) { const Surface &surface = this->slices->surfaces[surface_order[order_idx]]; // detect how many perimeters must be generated for this island - int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops - if (this->config->alternate_extra_wall && this->layer_id % 2 == 1 && !m_spiral_vase) // add alternating extra wall + int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops + int sparse_infill_density = this->config->sparse_infill_density.value; + if (this->config->alternate_extra_wall && this->layer_id % 2 == 1 && !m_spiral_vase && sparse_infill_density > 0) // add alternating extra wall loop_number++; if (this->layer_id == 0 && this->config->only_one_wall_first_layer) loop_number = 0; @@ -1938,8 +1939,9 @@ void PerimeterGenerator::process_arachne() for (const Surface& surface : this->slices->surfaces) { coord_t bead_width_0 = ext_perimeter_spacing; // detect how many perimeters must be generated for this island - int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops - if (this->config->alternate_extra_wall && this->layer_id % 2 == 1 && !m_spiral_vase) // add alternating extra wall + int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops + int sparse_infill_density = this->config->sparse_infill_density.value; + if (this->config->alternate_extra_wall && this->layer_id % 2 == 1 && !m_spiral_vase && sparse_infill_density > 0) // add alternating extra wall loop_number++; // Set the bottommost layer to be one wall