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
path: root/lib
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-07-07 21:12:44 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-07-07 21:12:44 +0400
commit6f6ee40daeb9e9e6b1f11cace77a90fc6c21aca4 (patch)
tree6c0ca70e3a5a89b7129da5ebeaca3cae2a4a2578 /lib
parentc57a88c9436d62f82f0cc96d048f66608aa6b140 (diff)
Small optimization in case no overhang logic is required at all
Diffstat (limited to 'lib')
-rw-r--r--lib/Slic3r/GCode.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm
index fa61e259b..ccfadc57c 100644
--- a/lib/Slic3r/GCode.pm
+++ b/lib/Slic3r/GCode.pm
@@ -96,8 +96,10 @@ sub change_layer {
my ($layer) = @_;
$self->layer($layer);
+
+ # avoid computing overhangs if they're not needed
$self->_layer_overhangs(
- $layer->id > 0
+ $layer->id > 0 && ($Slic3r::Config->overhangs || $Slic3r::Config->start_perimeters_at_non_overhang)
? [ map $_->expolygon, grep $_->surface_type == S_TYPE_BOTTOM, map @{$_->slices}, @{$layer->regions} ]
: []
);