From 92dec2db2a67c4d7144ae008a61213c084de5ec2 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 4 Oct 2011 22:36:05 +0200 Subject: [PATCH] Fixed detection of horizontal shells --- lib/Slic3r/STL.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/STL.pm b/lib/Slic3r/STL.pm index 44a229357..5407f6054 100644 --- a/lib/Slic3r/STL.pm +++ b/lib/Slic3r/STL.pm @@ -117,7 +117,9 @@ sub _facet { Slic3r::debugf "layers: min = %s, max = %s\n", $min_layer, $max_layer; # is the facet horizontal? - if ($min_layer == $max_layer) { + # (note that we can have $min_z == $max_z && $min_layer != $max_layer + # if $min_z % $layer_height != 0) + if ($min_z == $max_z) { Slic3r::debugf "Facet is horizontal\n"; my $layer = $print->layer($min_layer); my $surface = $layer->add_surface(@vertices);