Store config in Slic3r::GCode object

This commit is contained in:
Alessandro Ranellucci
2013-05-31 11:19:36 +02:00
parent 7baaf6bf5d
commit da76496988
3 changed files with 72 additions and 68 deletions

View File

@@ -11,8 +11,10 @@ use Slic3r;
use Slic3r::Geometry qw(scale);
{
local $Slic3r::Config = Slic3r::Config->new_from_defaults;
my $gcodegen = Slic3r::GCode->new(layer_count => 1);
my $gcodegen = Slic3r::GCode->new(
config => Slic3r::Config->new_from_defaults,
layer_count => 1,
);
$gcodegen->set_shift(10, 10);
is_deeply $gcodegen->last_pos, [scale -10, scale -10], 'last_pos is shifted correctly';
}