Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2011-09-26 18:19:32 +0400
committerAlessandro Ranellucci <aar@cpan.org>2011-09-26 18:19:32 +0400
commitc16ecb4316c070c4205ca6132bfeeaaa64003bbf (patch)
tree2b2ed80c86984593d6ec5a61bad605d5b7611cfe /lib/Slic3r/STL.pm
parent404c76adc804523fbc870b9a18b6267f38071f14 (diff)
Fixed regression which prevented horizontal shells to be processed for external top surfaces
Diffstat (limited to 'lib/Slic3r/STL.pm')
-rw-r--r--lib/Slic3r/STL.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Slic3r/STL.pm b/lib/Slic3r/STL.pm
index a72714114..97b02a2e0 100644
--- a/lib/Slic3r/STL.pm
+++ b/lib/Slic3r/STL.pm
@@ -121,16 +121,16 @@ sub _facet {
my $clockwise = !is_counter_clockwise([@vertices]);
# defensive programming and/or input check
- if (($normal->[Z] > 0 && $clockwise > 0) || ($normal->[Z] < 0 && $clockwise < 0)) {
+ if (($normal->[Z] > 0 && $clockwise) || ($normal->[Z] < 0 && !$clockwise)) {
YYY $normal;
die sprintf "STL normal (%.0f) and right-hand rule computation (%s) differ!\n",
- $normal->[Z], $clockwise > 0 ? 'clockwise' : 'counter-clockwise';
+ $normal->[Z], $clockwise ? 'clockwise' : 'counter-clockwise';
}
- if ($layer->id == 0 && $clockwise < 0) {
+ if ($layer->id == 0 && !$clockwise) {
die "Right-hand rule gives bad result for facets on base layer!\n";
}
- $surface->surface_type($clockwise < 0 ? 'top' : 'bottom');
+ $surface->surface_type($clockwise ? 'bottom' : 'top');
return;
}