mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-12-06 02:46:33 +01:00
Refactoring: use Slic3r::Geometry::BoundingBox objects everywhere
This commit is contained in:
1 parent
07407e5dbd
commit
ac4a0bcdd8
20 files changed
+105
-127
No files matched your search
@@ -5,7 +5,7 @@ use Slic3r::Geometry qw(PI);
|
||||
|
||||
has 'layer_id' => (is => 'rw');
|
||||
has 'angle' => (is => 'rw', default => sub { $Slic3r::Config->fill_angle });
|
||||
has 'bounding_box' => (is => 'ro', required => 1);
|
||||
has 'bounding_box' => (is => 'ro', required => 1); # Slic3r::Geometry::BoundingBox object
|
||||
|
||||
sub angles () { [0, PI/2] }
|
||||
|
||||
@@ -16,7 +16,7 @@ sub infill_direction {
|
||||
# set infill angle
|
||||
my (@rotate, @shift);
|
||||
$rotate[0] = Slic3r::Geometry::deg2rad($self->angle);
|
||||
$rotate[1] = Slic3r::Geometry::bounding_box_center($self->bounding_box);
|
||||
$rotate[1] = $self->bounding_box->center_2D;
|
||||
@shift = @{$rotate[1]};
|
||||
|
||||
if (defined $self->layer_id) {
|
||||
|
||||
Reference in new issue
Block a user