diff options
author | bubnikv <bubnikv@gmail.com> | 2017-06-30 20:07:14 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-06-30 20:07:14 +0300 |
commit | bf9027ff2de3a8439ef4f4b0af6110717f59747d (patch) | |
tree | 30bbcaf68a7596dda1be276c2dcf5746e44e657f /t | |
parent | 115deee252ee0c6aff0745962ba07fa62260b854 (diff) |
Fix of a cooling buffer over multiple extruders.
Diffstat (limited to 't')
-rw-r--r-- | t/cooling.t | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/t/cooling.t b/t/cooling.t index 0f0aef618..1317f1dce 100644 --- a/t/cooling.t +++ b/t/cooling.t @@ -2,7 +2,7 @@ use Test::More; use strict; use warnings; -plan tests => 13; +plan tests => 15; BEGIN { use FindBin; @@ -32,7 +32,7 @@ sub buffer { $gcodegen = Slic3r::GCode->new; $gcodegen->apply_print_config($print_config); $gcodegen->set_layer_count(10); - $gcodegen->set_elapsed_time(0); + $gcodegen->set_extruders([ 0 ]); return Slic3r::GCode::CoolingBuffer->new($gcodegen); } @@ -125,6 +125,18 @@ $config->set('disable_fan_first_layers', [ 0 ]); } { + my $buffer = buffer($config, { + 'cooling' => [ 1 , 0 ], + 'fan_below_layer_time' => [ $print_time2 + 1, $print_time2 + 1 ], + 'slowdown_below_layer_time' => [ $print_time2 + 2, $print_time2 + 2 ] + }); + $buffer->gcodegen->set_extruders([ 0, 1 ]); + my $gcode = $buffer->process_layer($gcode1 . "T1\nG1 X0 E1 F3000\n", 0); + like $gcode, qr/^M106/, 'fan is activated for the 1st tool'; + like $gcode, qr/.*M107/, 'fan is disabled for the 2nd tool'; +} + +{ my $config = Slic3r::Config->new_from_defaults; $config->set('cooling', [ 1 ]); $config->set('bridge_fan_speed', [ 100 ]); |