mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 22:39:03 +08:00
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.
This commit is contained in:
parent
2115b40728
commit
6f5813a849
@ -386,10 +386,12 @@ void LayerRegion::prepare_fill_surfaces()
|
|||||||
bool spiral_vase = this->layer()->object()->print()->config().spiral_vase;
|
bool spiral_vase = this->layer()->object()->print()->config().spiral_vase;
|
||||||
|
|
||||||
// if no solid layers are requested, turn top/bottom surfaces to internal
|
// 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) {
|
if (! spiral_vase && this->region().config().top_solid_layers == 0) {
|
||||||
for (Surface &surface : this->fill_surfaces.surfaces)
|
for (Surface &surface : this->fill_surfaces.surfaces)
|
||||||
if (surface.is_top())
|
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) {
|
if (this->region().config().bottom_solid_layers == 0) {
|
||||||
for (Surface &surface : this->fill_surfaces.surfaces)
|
for (Surface &surface : this->fill_surfaces.surfaces)
|
||||||
|
@ -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.
|
// fill_surfaces but we only turn them into VOID surfaces, thus preserving the boundaries.
|
||||||
void PrintObject::clip_fill_surfaces()
|
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;
|
return;
|
||||||
bool has_infill = false;
|
bool has_infill = false;
|
||||||
for (size_t i = 0; i < this->num_printing_regions(); ++ i)
|
for (size_t i = 0; i < this->num_printing_regions(); ++ i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user