Fix regression causing the plater to merge all materials into a single one, thus not producing multi-extrusion prints

This commit is contained in:
Alessandro Ranellucci 2012-10-21 20:56:19 +02:00
parent f5f9574173
commit 4f1b56f004
2 changed files with 43 additions and 15 deletions

View file

@ -37,6 +37,12 @@ sub set_material {
);
}
sub scale {
my $self = shift;
$_->scale(@_) for @{$self->objects};
}
# flattens everything to a single mesh
sub mesh {
my $self = shift;
@ -112,6 +118,17 @@ sub mesh {
);
}
sub scale {
my $self = shift;
my ($factor) = @_;
return if $factor == 1;
# transform vertex coordinates
foreach my $vertex (@{$self->vertices}) {
$vertex->[$_] *= $factor for X,Y,Z;
}
}
package Slic3r::Model::Volume;
use Moo;