Merge branch 'main' into zaa

This commit is contained in:
SoftFever
2026-04-28 16:57:02 +08:00
committed by GitHub
11158 changed files with 1904567 additions and 1867499 deletions
+12 -3
View File
@@ -808,8 +808,10 @@ void split_solid_surface(size_t layer_id, const SurfaceFill &fill, ExPolygons &n
return;
}
// Expand the normal infills a little bit to avoid gaps between normal and narrow infills
normal_infill = intersection_ex(offset_ex(normal_fill_areas_ex, scaled_spacing * 0.1), fill.expolygons);
// Expand the normal infills to avoid gaps between normal and narrow infills.
// The inner_area was shrunk by scaled_spacing * 0.5, so we need to expand
// by at least that amount to ensure proper coverage and avoid gaps.
normal_infill = intersection_ex(offset_ex(normal_fill_areas_ex, scaled_spacing * 0.5), fill.expolygons);
narrow_infill = narrow_fill_areas;
#ifdef DEBUG_SURFACE_SPLIT
@@ -1319,7 +1321,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);
+4 -3
View File
@@ -3082,6 +3082,7 @@ bool FillRectilinear::fill_surface_trapezoidal(
// Use extended object bounding box for consistent pattern across layers
BoundingBox bb = this->extended_object_bounding_box();
const size_t infill_layer_id = (surface->thickness_layers > 0) ? this->layer_id / surface->thickness_layers : this->layer_id;
switch (Pattern_type) {
case 0: // Grid / Trapezoidal
@@ -3144,8 +3145,8 @@ bool FillRectilinear::fill_surface_trapezoidal(
flip_vertical = !flip_vertical;
}
// transpose points for odd layers
if (layer_id % 2 == 1) {
// transpose points for odd infill layers (taking infill combination into account)
if (infill_layer_id % 2 == 1) {
for (Polyline& pl : polylines) {
for (Point& p : pl.points) {
std::swap(p.x(), p.y());
@@ -3174,7 +3175,7 @@ bool FillRectilinear::fill_surface_trapezoidal(
// Align bounding box to the grid
bb.merge(align_to_grid(bb.center(), Point(period,h)));
const int layer_mod = layer_id % 3;
const size_t layer_mod = infill_layer_id % 3;
const double angle = layer_mod * 2.0 * M_PI / 3.0;
const Point rotation_center = bb.center();