mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-21 14:09:54 +02:00
Optimization: cache model bounding box
This commit is contained in:
1 parent
c88d8a5842
commit
82fbdb603f
2 files changed
+51
-13
No files matched your search
@@ -62,6 +62,18 @@ sub scale {
|
||||
$self;
|
||||
}
|
||||
|
||||
sub translate {
|
||||
my $self = shift;
|
||||
my @shift = @_;
|
||||
|
||||
for my $axis (X .. $#{$self->extents}) {
|
||||
$self->extents->[$axis][MIN] += $shift[$axis];
|
||||
$self->extents->[$axis][MAX] += $shift[$axis];
|
||||
}
|
||||
|
||||
$self;
|
||||
}
|
||||
|
||||
sub size {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
Reference in new issue
Block a user