Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Hejl <hejl.lukas@gmail.com>2022-08-18 11:46:40 +0300
committerLukáš Hejl <hejl.lukas@gmail.com>2022-08-18 12:22:45 +0300
commit6f5813a849e40b1bcae97270a317222dff92f5ec (patch)
tree428e5243a293f0e4cd43985e32800280ceda968e
parent2115b407288fdbe77d575f08bdc1262d1dbee4b2 (diff)
Fix of #8648 - Lightning infill wasn't connected to perimeters when it was combined with the option "Only infill where needed".
Now Lightning infill will ignore this setting and treat it as off. Because Lightning infill and "Only infill where needed" do a similar thing, and their combination doesn't make much sense.
-rw-r--r--src/libslic3r/LayerRegion.cpp4
-rw-r--r--src/libslic3r/PrintObject.cpp9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/libslic3r/LayerRegion.cpp b/src/libslic3r/LayerRegion.cpp
index dfae5f188..0abe27a80 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 6ec27ea95..5cebbb056 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)