Don't output slic3r:z attribute in SVG for raft layers

This commit is contained in:
Alessandro Ranellucci 2015-01-30 18:45:30 +01:00
parent e2b1b52679
commit 8605969dc5
5 changed files with 10 additions and 8 deletions

View file

@ -140,8 +140,11 @@ EOF
my @previous_layer_slices = ();
for my $layer (@layers) {
$layer_id++;
# TODO: remove slic3r:z for raft layers
printf $fh qq{ <g id="layer%d" slic3r:z="%s">\n}, $layer_id, unscale($layer->slice_z);
if ($layer->slice_z == -1) {
printf $fh qq{ <g id="layer%d">\n}, $layer_id;
} else {
printf $fh qq{ <g id="layer%d" slic3r:z="%s">\n}, $layer_id, unscale($layer->slice_z);
}
my @current_layer_slices = ();
# sort slices so that the outermost ones come first

View file

@ -76,7 +76,7 @@ sub generate {
$i, # id
($i == 0) ? $support_z->[$i] : ($support_z->[$i] - $support_z->[$i-1]), # height
$support_z->[$i], # print_z
-1); # slice_z
);
if ($i >= 1) {
$object->support_layers->[-2]->set_upper_layer($object->support_layers->[-1]);
$object->support_layers->[-1]->set_lower_layer($object->support_layers->[-2]);