Added failing test for bridge speed not being used for first object layer above support material. #2301

This commit is contained in:
Alessandro Ranellucci 2014-10-18 14:08:40 +02:00
parent e5aed3a63e
commit 4b013d7a48

View File

@ -1,4 +1,4 @@
use Test::More tests => 18;
use Test::More tests => 20;
use strict;
use warnings;
@ -102,10 +102,13 @@ use Slic3r::Test;
$config->set('support_material_pattern', 'honeycomb');
$config->set('support_material_extrusion_width', 0.6);
$config->set('first_layer_extrusion_width', '100%');
$config->set('bridge_speed', 99);
$config->set('cooling', 0); # prevent speed alteration
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
my $layer_id = 0;
my @raft = my @first_object_layer = ();
my %first_object_layer_speeds = (); # F => 1
Slic3r::GCode::Reader->new->parse(Slic3r::Test::gcode($print), sub {
my ($self, $cmd, $args, $info) = @_;
@ -119,6 +122,7 @@ use Slic3r::Test;
push @raft, @path;
} else {
push @first_object_layer, @path;
$first_object_layer_speeds{ $args->{F} // $self->F } = 1;
}
}
} elsif ($cmd eq 'G1' && $info->{dist_Z} > 0) {
@ -128,6 +132,10 @@ use Slic3r::Test;
ok !@{diff(\@first_object_layer, \@raft)},
'first object layer is completely supported by raft';
is scalar(keys %first_object_layer_speeds), 1,
'only one speed used in first object layer';
is_deeply [ keys %first_object_layer_speeds ], [ $config->bridge_speed*60 ],
'bridge speed used in first object layer';
}
{