mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Fixed regression causing rotation from plater to also translate the resulting G-code. #1191
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user