Memory optimizations broke multiple copies
This commit is contained in:
parent
5ccc0a8f62
commit
23ae015c49
1
Build.PL
1
Build.PL
@ -16,6 +16,7 @@ my $build = Module::Build->new(
|
|||||||
'Math::PlanePath' => '53',
|
'Math::PlanePath' => '53',
|
||||||
'Moo' => '0',
|
'Moo' => '0',
|
||||||
'perl' => '5.10.0',
|
'perl' => '5.10.0',
|
||||||
|
'Scalar::Util' => '0',
|
||||||
'Time::HiRes' => '0',
|
'Time::HiRes' => '0',
|
||||||
},
|
},
|
||||||
build_requires => {
|
build_requires => {
|
||||||
|
@ -3,6 +3,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use Math::Clipper qw();
|
use Math::Clipper qw();
|
||||||
|
use Scalar::Util qw(reftype);
|
||||||
use Slic3r::Geometry qw(A B polyline_remove_parallel_continuous_edges polyline_remove_acute_vertices
|
use Slic3r::Geometry qw(A B polyline_remove_parallel_continuous_edges polyline_remove_acute_vertices
|
||||||
move_points same_point);
|
move_points same_point);
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ sub serialize {
|
|||||||
|
|
||||||
sub deserialize {
|
sub deserialize {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
return $self if reftype $self ne 'SCALAR';
|
||||||
my @v = unpack '(l2)*', $$self;
|
my @v = unpack '(l2)*', $$self;
|
||||||
my $o = [ map [ $v[2*$_], $v[2*$_+1] ], 0 .. int($#v/2) ];
|
my $o = [ map [ $v[2*$_], $v[2*$_+1] ], 0 .. int($#v/2) ];
|
||||||
bless $_, 'Slic3r::Point' for @$o;
|
bless $_, 'Slic3r::Point' for @$o;
|
||||||
|
Loading…
Reference in New Issue
Block a user