mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-21 14:09:54 +02:00
Save the vector used for aligning object volumes to origin and apply it to additional parts added from the object part panel in order to make them coincide
This commit is contained in:
1 parent
017158c877
commit
45559f87f3
3 files changed
+7
-2
No files matched your search
@@ -309,6 +309,7 @@ has 'instances' => (is => 'rw');
|
||||
has 'config' => (is => 'rw', default => sub { Slic3r::Config->new });
|
||||
has 'layer_height_ranges' => (is => 'rw', default => sub { [] }); # [ z_min, z_max, layer_height ]
|
||||
has '_bounding_box' => (is => 'rw');
|
||||
has 'origin_translation' => (is => 'ro', default => sub { Slic3r::Point->new }); # translation vector applied by center_around_origin()
|
||||
|
||||
sub add_volume {
|
||||
my $self = shift;
|
||||
@@ -446,6 +447,7 @@ sub center_around_origin {
|
||||
$shift[Y] -= $size->y/2; #//
|
||||
|
||||
$self->translate(@shift);
|
||||
$self->origin_translation->translate(@shift[X,Y]);
|
||||
|
||||
if (defined $self->instances) {
|
||||
foreach my $instance (@{ $self->instances }) {
|
||||
|
||||
Reference in new issue
Block a user