diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2011-09-03 22:47:38 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2011-09-03 22:47:38 +0400 |
commit | a5ba0af7efbc9123dc859885d2ebbf4cd2b5b87b (patch) | |
tree | 4af94b2146e05fe4740b0c437cf93f0c96bf919a /lib/Slic3r/Line.pm | |
parent | 74b4d8d612c48c896d8866cd400ad64ff059d919 (diff) |
Generate GCODE
Diffstat (limited to 'lib/Slic3r/Line.pm')
-rw-r--r-- | lib/Slic3r/Line.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Slic3r/Line.pm b/lib/Slic3r/Line.pm index 92603cfc8..147e5635e 100644 --- a/lib/Slic3r/Line.pm +++ b/lib/Slic3r/Line.pm @@ -1,9 +1,11 @@ package Slic3r::Line; use Moose; - use Moose::Util::TypeConstraints; use Scalar::Util qw(weaken); +subtype 'Slic3r::Line::Length', as 'Int'; +coerce 'Slic3r::Line::Length', from 'Num', via { sprintf '%.0f', $_ }; + has 'a' => ( is => 'ro', isa => 'Slic3r::Point', |