From 7f23e72a1067e647f19f60ba1e8a0fc013ed515a Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 30 Mar 2013 00:52:45 +0100 Subject: [PATCH] Display preview for small files too. #929 --- lib/Slic3r/GUI/Plater.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index bd1fa2964..331aecaae 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1137,7 +1137,8 @@ sub make_thumbnail { for (map @$_, map @$_, @{$thumbnail->expolygons}) { @$_ = map $_ * $self->thumbnail_scaling_factor, @$_; } - @{$thumbnail->expolygons} = map $_->simplify(0.5), grep $_->area >= 1, @{$thumbnail->expolygons}; + # only simplify expolygons larger than the threshold + @{$thumbnail->expolygons} = map { ($_->area >= 1) ? $_->simplify(0.5) : $_ } @{$thumbnail->expolygons}; foreach my $expolygon (@{$thumbnail->expolygons}) { $expolygon->rotate(Slic3r::Geometry::deg2rad($self->rotate)); $expolygon->scale($self->scale);