Skip to content

Commit

Permalink
Don't use equality comparisons for floats
Browse files Browse the repository at this point in the history
This fixes an issue where F0 moves arise from 0-width (or 0 layer
height?) support material segments when using autospeed.

Fixes: #3261
  • Loading branch information
hyperair committed Mar 8, 2016
1 parent a32937c commit 5f8eea9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Slic3r/Print/GCode.pm
Expand Up @@ -75,7 +75,8 @@ sub BUILD {
}
}
}
@mm3_per_mm = grep $_ != 0, @mm3_per_mm;
# filter out 0-width segments
@mm3_per_mm = grep $_ > 0.000001, @mm3_per_mm;
if (@mm3_per_mm) {
my $min_mm3_per_mm = min(@mm3_per_mm);
# In order to honor max_print_speed we need to find a target volumetric
Expand Down

0 comments on commit 5f8eea9

Please sign in to comment.