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: slic3r#3261
  • Loading branch information
hyperair committed Mar 6, 2016
1 parent a32937c commit 6529abc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Slic3r/Print/GCode.pm
Original file line number Diff line number Diff line change
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 6529abc

Please sign in to comment.