Skip to content

Commit

Permalink
fix a bug that gapfill was assigned with wrong extruder/filament
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftFever committed Sep 8, 2024
1 parent 7d4402c commit 78d7263
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/libslic3r/GCode/ToolOrdering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,22 +173,16 @@ unsigned int LayerTools::extruder(const ExtrusionEntityCollection &extrusions, c
assert(region.config().solid_infill_filament.value > 0);
// 1 based extruder ID.
unsigned int extruder = 1;

if (this->extruder_override == 0) {
if (extrusions.has_infill()) {
if (extrusions.has_solid_infill()) {
if (extrusions.has_solid_infill())
extruder = region.config().solid_infill_filament;
} else {
else
extruder = region.config().sparse_infill_filament;
}
} else if (extrusions.has_perimeters()) {
} else
extruder = region.config().wall_filament.value;
} else {
extruder = this->extruder_override;
}
} else {
} else
extruder = this->extruder_override;
}

return (extruder == 0) ? 0 : extruder - 1;
}
Expand Down

0 comments on commit 78d7263

Please sign in to comment.