Skip to content

Commit

Permalink
Fix wrong support infill in some cases
Browse files Browse the repository at this point in the history
support_line_distance with a value of 0 actually means no infill, which
was currently interpreted with infinitely dense infill.

CURA-11947
  • Loading branch information
wawanbreton committed Jun 26, 2024
1 parent e09e5b4 commit 1fdb9f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3549,8 +3549,11 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer
= (part.custom_line_distance_ > 0
? part.custom_line_distance_
: default_support_line_distance * density_factor); // the highest density infill combines with the next to create a grid with density_factor 1
support_line_distance_here /= (1 << (infill_density_multiplier - 1));
support_line_distance_here = std::max(support_line_distance_here, support_line_width);
if (support_line_distance_here != 0 && infill_density_multiplier > 1)
{
support_line_distance_here /= (1 << (infill_density_multiplier - 1));
support_line_distance_here = std::max(support_line_distance_here, support_line_width);
}
const int support_shift = support_line_distance_here / 2;
if (part.custom_line_distance_ == 0 && (density_idx == max_density_idx || support_pattern == EFillMethod::CROSS || support_pattern == EFillMethod::CROSS_3D))
{
Expand Down

0 comments on commit 1fdb9f7

Please sign in to comment.