diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2016-12-17 02:02:21 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-02-21 18:42:51 +0300 |
commit | fefba5ff1d9a1b73f71c17185fa028429467de5b (patch) | |
tree | 8da5d3ee86958f528ad0f6175179ebe6d2931c42 /slic3r.pl | |
parent | a8edff1e8442aa29366bbac2e9cf72fcd4b45ccc (diff) |
Bugfix: --rotate did not support decimal values and interpreted them as radians. #3460
Diffstat (limited to 'slic3r.pl')
-rwxr-xr-x | slic3r.pl | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -13,6 +13,7 @@ use Getopt::Long qw(:config no_auto_abbrev); use List::Util qw(first); use POSIX qw(setlocale LC_NUMERIC); use Slic3r; +use Slic3r::Geometry qw(deg2rad); use Time::HiRes qw(gettimeofday tv_interval); $|++; binmode STDOUT, ':utf8'; @@ -44,7 +45,7 @@ my %cli_options = (); 'info' => \$opt{info}, 'scale=f' => \$opt{scale}, - 'rotate=i' => \$opt{rotate}, + 'rotate=f' => \$opt{rotate}, 'duplicate=i' => \$opt{duplicate}, 'duplicate-grid=s' => \$opt{duplicate_grid}, 'print-center=s' => \$opt{print_center}, @@ -201,7 +202,7 @@ if (@ARGV) { # slicing from command line my $sprint = Slic3r::Print::Simple->new( scale => $opt{scale} // 1, - rotate => $opt{rotate} // 0, + rotate => deg2rad($opt{rotate} // 0), duplicate => $opt{duplicate} // 1, duplicate_grid => $opt{duplicate_grid} // [1,1], print_center => $opt{print_center} // Slic3r::Pointf->new(100,100), |