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

Refactoring, new bounding_box_3D function

This commit is contained in:
Alessandro Ranellucci
2012-09-22 16:10:24 +02:00
parent 35e449e891
commit b5672de3ca
2 changed files with 16 additions and 9 deletions
+1 -8
View File
@@ -381,14 +381,7 @@ sub duplicate {
sub extents {
my $self = shift;
my @extents = (map [undef, undef], X,Y,Z);
foreach my $vertex (@{$self->vertices}) {
for (X,Y,Z) {
$extents[$_][MIN] = $vertex->[$_] if !defined $extents[$_][MIN] || $vertex->[$_] < $extents[$_][MIN];
$extents[$_][MAX] = $vertex->[$_] if !defined $extents[$_][MAX] || $vertex->[$_] > $extents[$_][MAX];
}
}
return @extents;
return Slic3r::Geometry::bounding_box_3D($self->vertices);
}
sub size {