Ported the between_objects_gcode custom G-code blocks,

thanks @lordofhyphens, https://github.com/alexrj/Slic3r/pull/3275

Improved handling of custom G-code blocks: Slic3r will try to extract
the target extruder and bed temperatures from the custom G-code blocks.
This commit is contained in:
bubnikv 2017-11-28 15:19:57 +01:00
parent f58b217369
commit 672194b475
8 changed files with 207 additions and 100 deletions

View file

@ -1,4 +1,4 @@
use Test::More tests => 40;
use Test::More tests => 41;
use strict;
use warnings;
@ -210,4 +210,13 @@ use Slic3r::Test;
}
}
{
my $config = Slic3r::Config::new_from_defaults;
$config->set('complete_objects', 1);
$config->set('between_objects_gcode', '_MY_CUSTOM_GCODE_');
my $print = Slic3r::Test::init_print('20mm_cube', config => $config, duplicate => 3);
my $gcode = Slic3r::Test::gcode($print);
is scalar(() = $gcode =~ /^_MY_CUSTOM_GCODE_/gm), 2, 'between_objects_gcode is applied correctly';
}
__END__