Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix last_pos shifting and add unit test
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,7 @@ t/collinear.t | |
t/custom_gcode.t | ||
t/dynamic.t | ||
t/fill.t | ||
t/gcode.t | ||
t/geometry.t | ||
t/layers.t | ||
t/loops.t | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use Test::More tests => 1; | ||
use strict; | ||
use warnings; | ||
|
||
BEGIN { | ||
use FindBin; | ||
use lib "$FindBin::Bin/../lib"; | ||
} | ||
|
||
use Slic3r; | ||
use Slic3r::Geometry qw(scale); | ||
|
||
{ | ||
local $Slic3r::Config = Slic3r::Config->new_from_defaults; | ||
my $gcodegen = Slic3r::GCode->new(layer_count => 1); | ||
$gcodegen->set_shift(10, 10); | ||
is_deeply $gcodegen->last_pos, [scale -10, scale -10], 'last_pos is shifted correctly'; | ||
} | ||
|
||
__END__ |