1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-14 08:34:26 +00:00

Merge branch 'master' into xs

This commit is contained in:
Alessandro Ranellucci
2013-07-06 12:15:17 +02:00
4 changed files with 17 additions and 2 deletions
+6 -1
View File
@@ -32,6 +32,11 @@ sub clone {
Storable::dclone($_[0])
}
sub threadsafe_clone {
my $self = shift;
return (ref $self)->new(map $_->threadsafe_clone, @$self);
}
sub contour {
my $self = shift;
return $self->[0];
@@ -303,7 +308,7 @@ has 'expolygons' => (is => 'ro', default => sub { [] });
sub clone {
my $self = shift;
return (ref $self)->new(
expolygons => [ map $_->clone, @{$self->expolygons} ],
expolygons => [ map $_->threadsafe_clone, @{$self->expolygons} ],
);
}
+5
View File
@@ -24,6 +24,11 @@ sub clone {
Storable::dclone($_[0])
}
sub threadsafe_clone {
my $self = shift;
return (ref $self)->new(@$self);
}
sub coincides_with {
my $self = shift;
my ($point) = @_;
+5
View File
@@ -22,6 +22,11 @@ sub clone {
Storable::dclone($_[0])
}
sub threadsafe_clone {
my $self = shift;
return (ref $self)->new(map $_->threadsafe_clone, @$self);
}
sub serialize {
my $self = shift;
return pack 'l*', map @$_, @$self;
+1 -1
View File
@@ -607,7 +607,7 @@ sub horizontal_projection {
my @f = ();
foreach my $facet (@{$self->facets}) {
push @f, Slic3r::Polygon->new([ map [ @{$self->vertices->[$_]}[X,Y] ], @$facet ]);
push @f, Slic3r::Polygon->new(map [ @{$self->vertices->[$_]}[X,Y] ], @$facet);
}
my $scale_vector = Math::Clipper::integerize_coordinate_sets({ bits => 32 }, @f);