mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 22:54:08 -06: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:
parent
017158c877
commit
45559f87f3
3 changed files with 7 additions and 2 deletions
|
@ -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 }) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue