From 4fad87e4382ff503276d28ca111a8efa332a5c8f Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 13 Mar 2016 12:24:03 +0100 Subject: [PATCH] Fixed float comparison in combine_infill --- lib/Slic3r/Print/Object.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index 240023834..e55cefd7b 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -4,7 +4,7 @@ use warnings; use List::Util qw(min max sum first); use Slic3r::Flow ':roles'; -use Slic3r::Geometry qw(X Y Z PI scale unscale chained_path); +use Slic3r::Geometry qw(X Y Z PI scale unscale chained_path epsilon); use Slic3r::Geometry::Clipper qw(diff diff_ex intersection intersection_ex union union_ex offset offset_ex offset2 offset2_ex intersection_ppl CLIPPER_OFFSET_SCALE JT_MITER); use Slic3r::Print::State ':steps'; @@ -1010,7 +1010,7 @@ sub combine_infill { # check whether the combination of this layer with the lower layers' buffer # would exceed max layer height or max combined layer count - if ($current_height + $height >= $nozzle_diameter || $layers >= $every) { + if ($current_height + $height >= $nozzle_diameter + epsilon || $layers >= $every) { # append combination to lower layer $combine{$layer_idx-1} = $layers; $current_height = $layers = 0;