From 6529abc176795b19684d07c0f07f389d3f125f93 Mon Sep 17 00:00:00 2001 From: Chow Loong Jin Date: Sun, 6 Mar 2016 17:44:39 +0800 Subject: [PATCH] Don't use equality comparisons for floats This fixes an issue where F0 moves arise from 0-width (or 0 layer height?) support material segments when using autospeed. Fixes: #3261 --- lib/Slic3r/Print/GCode.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print/GCode.pm b/lib/Slic3r/Print/GCode.pm index e3022fef05..0b67fe2dcd 100644 --- a/lib/Slic3r/Print/GCode.pm +++ b/lib/Slic3r/Print/GCode.pm @@ -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