mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-30 12:11:15 -06:00
Bugfix: duplicate options did not work correctly for copies > 2. #113
This commit is contained in:
parent
9a610395ce
commit
3c2b2cfef2
2 changed files with 9 additions and 14 deletions
|
|
@ -279,15 +279,17 @@ sub move {
|
|||
|
||||
sub duplicate {
|
||||
my $self = shift;
|
||||
my (@shift) = @_;
|
||||
my (@shifts) = @_;
|
||||
|
||||
my @new_facets = ();
|
||||
foreach my $facet (@{$self->facets}) {
|
||||
# transform vertex coordinates
|
||||
my ($normal, @vertices) = @$facet;
|
||||
push @new_facets, [ $normal ];
|
||||
foreach my $vertex (@vertices) {
|
||||
push @{$new_facets[-1]}, [ map $vertex->[$_] + ($shift[$_] || 0), (X,Y,Z) ];
|
||||
foreach my $shift (@shifts) {
|
||||
push @new_facets, [ $normal ];
|
||||
foreach my $vertex (@vertices) {
|
||||
push @{$new_facets[-1]}, [ map $vertex->[$_] + ($shift->[$_] || 0), (X,Y,Z) ];
|
||||
}
|
||||
}
|
||||
}
|
||||
push @{$self->facets}, @new_facets;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue