Fix rotation and scaling in plater producing mispositioned objects in G-code after recent changes. Includes a large refactoring and the new Slic3r::Geometry::BoundingBox class. #1171 #1191
This commit is contained in:
parent
9ea55497c2
commit
510c2092df
8 changed files with 151 additions and 32 deletions
|
@ -335,11 +335,25 @@ sub align_to_origin {
|
|||
|
||||
my @bb = Slic3r::Geometry::bounding_box([ map @$_, map @$_, @{$self->expolygons} ]);
|
||||
$_->translate(-$bb[X1], -$bb[Y1]) for @{$self->expolygons};
|
||||
$self;
|
||||
}
|
||||
|
||||
sub scale {
|
||||
my $self = shift;
|
||||
$_->scale(@_) for @{$self->expolygons};
|
||||
$self;
|
||||
}
|
||||
|
||||
sub rotate {
|
||||
my $self = shift;
|
||||
$_->rotate(@_) for @{$self->expolygons};
|
||||
$self;
|
||||
}
|
||||
|
||||
sub translate {
|
||||
my $self = shift;
|
||||
$_->translate(@_) for @{$self->expolygons};
|
||||
$self;
|
||||
}
|
||||
|
||||
sub size {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue