diff --git a/src/libslic3r/LayerRegion.cpp b/src/libslic3r/LayerRegion.cpp index dfae5f1882..0abe27a809 100644 --- a/src/libslic3r/LayerRegion.cpp +++ b/src/libslic3r/LayerRegion.cpp @@ -386,10 +386,12 @@ void LayerRegion::prepare_fill_surfaces() bool spiral_vase = this->layer()->object()->print()->config().spiral_vase; // if no solid layers are requested, turn top/bottom surfaces to internal + // For Lightning infill, infill_only_where_needed is ignored because both + // do a similar thing, and their combination doesn't make much sense. if (! spiral_vase && this->region().config().top_solid_layers == 0) { for (Surface &surface : this->fill_surfaces.surfaces) if (surface.is_top()) - surface.surface_type = this->layer()->object()->config().infill_only_where_needed ? stInternalVoid : stInternal; + surface.surface_type = this->layer()->object()->config().infill_only_where_needed && this->region().config().fill_pattern != ipLightning ? stInternalVoid : stInternal; } if (this->region().config().bottom_solid_layers == 0) { for (Surface &surface : this->fill_surfaces.surfaces) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 6ec27ea95b..5cebbb0566 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1733,7 +1733,14 @@ bool PrintObject::update_layer_height_profile(const ModelObject &model_object, c // fill_surfaces but we only turn them into VOID surfaces, thus preserving the boundaries. void PrintObject::clip_fill_surfaces() { - if (! m_config.infill_only_where_needed.value) + bool has_lightning_infill = false; + for (size_t region_id = 0; region_id < this->num_printing_regions(); ++region_id) + if (const PrintRegionConfig &config = this->printing_region(region_id).config(); config.fill_density > 0 && config.fill_pattern == ipLightning) + has_lightning_infill = true; + + // For Lightning infill, infill_only_where_needed is ignored because both + // do a similar thing, and their combination doesn't make much sense. + if (! m_config.infill_only_where_needed.value || has_lightning_infill) return; bool has_infill = false; for (size_t i = 0; i < this->num_printing_regions(); ++ i)