Elefant foot compensation for solid layers (#11526)

* Elefant foot compensation for solid layers

Elefant foot compensation for solid layers above bottommost by infill density manipulation.

* Update Fill.cpp

* change the option to expert cat

* use is_approx for float

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
π²
2026-04-26 12:03:35 +03:00
committed by GitHub
parent b3cadbd368
commit f0d8014ef1
7 changed files with 25 additions and 3 deletions

View File

@@ -1320,7 +1320,14 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
params.density = f->print_object_config->internal_bridge_density.get_abs_value(1.0);
params.dont_adjust = true;
}
// BBS: make fill
// Orca: Elefant foot compensation for solid layers above bottommost by infill density manipulation.
float elefant_density = f->print_object_config->elefant_foot_layers_density.get_abs_value(1.0);
if (!is_approx(elefant_density, 1.0f) && surface_fill.surface.is_solid_infill()) {
size_t elefant_layers = f->print_object_config->elefant_foot_compensation_layers.value;
if (f->layer_id > 0 && f->layer_id <= elefant_layers)
params.density = elefant_density * (elefant_layers - (f->layer_id - 1)) / elefant_layers;
}
// make fill
f->fill_surface_extrusion(&surface_fill.surface,
params,
m_regions[surface_fill.region_id]->fills.entities);