mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 18:58:00 -06:00
Fixed regression causing rotation from plater to also translate the resulting G-code. #1191
This commit is contained in:
parent
c62b49d1af
commit
49531f6f78
4 changed files with 5 additions and 6 deletions
|
@ -324,14 +324,14 @@ sub make_loops {
|
|||
|
||||
sub rotate {
|
||||
my $self = shift;
|
||||
my ($deg) = @_;
|
||||
my ($deg, $center) = @_;
|
||||
return if $deg == 0;
|
||||
|
||||
my $rad = Slic3r::Geometry::deg2rad($deg);
|
||||
|
||||
# transform vertex coordinates
|
||||
foreach my $vertex (@{$self->vertices}) {
|
||||
@$vertex = (@{ +(Slic3r::Geometry::rotate_points($rad, undef, [ $vertex->[X], $vertex->[Y] ]))[0] }, $vertex->[Z]);
|
||||
@$vertex = (@{ +(Slic3r::Geometry::rotate_points($rad, $center, [ $vertex->[X], $vertex->[Y] ]))[0] }, $vertex->[Z]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue