Fix of a cooling buffer over multiple extruders.
This commit is contained in:
parent
115deee252
commit
bf9027ff2d
4 changed files with 18 additions and 6 deletions
16
t/cooling.t
16
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);
|
||||
}
|
||||
|
||||
|
@ -124,6 +124,18 @@ $config->set('disable_fan_first_layers', [ 0 ]);
|
|||
like $gcode, qr/M106/, 'fan is activated on all objects printing at different Z';
|
||||
}
|
||||
|
||||
{
|
||||
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 ]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue