From 4b013d7a4816aec3018b08e6b530a2c6c070b667 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 18 Oct 2014 14:08:40 +0200 Subject: [PATCH] Added failing test for bridge speed not being used for first object layer above support material. #2301 --- t/support.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/support.t b/t/support.t index 4a780ddde..fd6d9cb9b 100644 --- a/t/support.t +++ b/t/support.t @@ -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'; } {