Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-07-29 19:28:30 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-07-29 19:28:30 +0400
commitb5907dc73463ae75d2975d236a593c949c052869 (patch)
tree0a4a98b87f0864bed6d2ca102eac21e4effe9391 /t/shells.t
parent1210b8989350b96ffbb0ddda39c6132e3eb3f40f (diff)
Bugfix: z_offset was not applied in spiral_vase. Includes regression test #1343
Diffstat (limited to 't/shells.t')
-rw-r--r--t/shells.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/shells.t b/t/shells.t
index 8cfcc87f6..bd4b221c6 100644
--- a/t/shells.t
+++ b/t/shells.t
@@ -1,4 +1,4 @@
-use Test::More tests => 6;
+use Test::More tests => 10;
use strict;
use warnings;
@@ -104,6 +104,7 @@ use Slic3r::Test;
$config->set('spiral_vase', 1);
$config->set('bottom_solid_layers', 0);
$config->set('skirts', 0);
+ $config->set('first_layer_height', '100%');
# TODO: this needs to be tested with a model with sloping edges, where starting
# points of each layer are not aligned - in that case we would test that no
@@ -114,18 +115,25 @@ use Slic3r::Test;
my $print = Slic3r::Test::init_print($model_name, config => $config);
my $travel_moves_after_first_extrusion = 0;
my $started_extruding = 0;
+ my @z_steps = ();
Slic3r::GCode::Reader->new(gcode => Slic3r::Test::gcode($print))->parse(sub {
my ($self, $cmd, $args, $info) = @_;
$started_extruding = 1 if $info->{extruding};
+ push @z_steps, ($args->{Z} - $self->Z)
+ if $started_extruding && exists $args->{Z};
$travel_moves_after_first_extrusion++
if $info->{travel} && $started_extruding && !exists $args->{Z};
});
is $travel_moves_after_first_extrusion, 0, "no gaps in spiral vase ($description)";
+ ok !(grep { $_ > $config->layer_height } @z_steps), "no gaps in Z ($description)";
};
$test->('20mm_cube', 'solid model');
$test->('40x10', 'hollow model');
+
+ $config->set('z_offset', -10);
+ $test->('20mm_cube', 'solid model with negative z-offset');
}
__END__