Make sure there are no gaps in spiral vase. Includes regression test. #1251
This commit is contained in:
parent
691c45d57f
commit
91cade7e8f
4 changed files with 52 additions and 10 deletions
25
t/shells.t
25
t/shells.t
|
@ -1,4 +1,4 @@
|
|||
use Test::More tests => 4;
|
||||
use Test::More tests => 5;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
@ -99,4 +99,27 @@ use Slic3r::Test;
|
|||
"shells are not propagated across perimeters of the neighbor layer";
|
||||
}
|
||||
|
||||
{
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
$config->set('spiral_vase', 1);
|
||||
$config->set('bottom_solid_layers', 0);
|
||||
$config->set('skirts', 0);
|
||||
|
||||
# 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
|
||||
# travel moves are left to move to the new starting point - in a cube, end
|
||||
# points coincide with next layer starting points (provided there's no clipping)
|
||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
|
||||
my $travel_moves_after_first_extrusion = 0;
|
||||
my $started_extruding = 0;
|
||||
Slic3r::GCode::Reader->new(gcode => Slic3r::Test::gcode($print))->parse(sub {
|
||||
my ($self, $cmd, $args, $info) = @_;
|
||||
|
||||
$started_extruding = 1 if $info->{extruding};
|
||||
$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";
|
||||
}
|
||||
|
||||
__END__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue