Display preview for small files too. #929

This commit is contained in:
Alessandro Ranellucci 2013-03-30 00:52:45 +01:00
parent 33a4ec660d
commit 7f23e72a10

View File

@ -1137,7 +1137,8 @@ sub make_thumbnail {
for (map @$_, map @$_, @{$thumbnail->expolygons}) { for (map @$_, map @$_, @{$thumbnail->expolygons}) {
@$_ = map $_ * $self->thumbnail_scaling_factor, @$_; @$_ = 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}) { foreach my $expolygon (@{$thumbnail->expolygons}) {
$expolygon->rotate(Slic3r::Geometry::deg2rad($self->rotate)); $expolygon->rotate(Slic3r::Geometry::deg2rad($self->rotate));
$expolygon->scale($self->scale); $expolygon->scale($self->scale);