From 0b29ad123e45841163e33978912bdadd95874aac Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 11 Apr 2012 17:46:36 +0200 Subject: [PATCH] Honor duplication options for SVG export --- lib/Slic3r/Skein.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Skein.pm b/lib/Slic3r/Skein.pm index f4a7f2c46..45cead013 100644 --- a/lib/Slic3r/Skein.pm +++ b/lib/Slic3r/Skein.pm @@ -187,9 +187,14 @@ EOF printf $fh qq{ \n}, $layer->id, unscale $layer->slice_z; # sort slices so that the outermost ones come first my @slices = sort { $a->expolygon->contour->encloses_point($b->expolygon->contour->[0]) ? 0 : 1 } @{$layer->slices}; - foreach my $slice (@slices) { - $print_polygon->($slice->expolygon->contour, 'contour'); - $print_polygon->($_, 'hole') for $slice->expolygon->holes; + + foreach my $copy (@{$print->copies}) { + foreach my $slice (@slices) { + my $expolygon = $slice->expolygon->clone; + $expolygon->translate(@$copy); + $print_polygon->($expolygon->contour, 'contour'); + $print_polygon->($_, 'hole') for $expolygon->holes; + } } print $fh qq{ \n}; }