From b266d6217a02777ca0dc9f5c06cca312b5ca6bd5 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 5 Jul 2013 14:17:54 +0200 Subject: [PATCH] Skip slow gap detection if we aren't going to fill gaps anyway --- lib/Slic3r/Layer/Region.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Layer/Region.pm b/lib/Slic3r/Layer/Region.pm index 71bc4a271..bab64317f 100644 --- a/lib/Slic3r/Layer/Region.pm +++ b/lib/Slic3r/Layer/Region.pm @@ -195,7 +195,7 @@ sub make_perimeters { # where offset2() collapses the expolygon, then there's no room for an inner loop # and we can extract the gap for later processing - { + if ($Slic3r::Config->gap_fill_speed > 0 && $Slic3r::Config->fill_density > 0) { my $diff = diff_ex( [ offset(\@last, -0.5*$spacing) ], # +2 on the offset here makes sure that Clipper float truncation @@ -303,7 +303,7 @@ sub _fill_gaps { my $self = shift; my ($gaps) = @_; - return unless $Slic3r::Config->gap_fill_speed > 0 && $Slic3r::Config->fill_density > 0 && @$gaps; + return unless @$gaps; my $filler = $self->layer->object->fill_maker->filler('rectilinear'); $filler->layer_id($self->layer->id);