mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 21:27:52 -06:00
Merge branch 'master' into avoid-crossing-perimeters
Conflicts: lib/Slic3r/GCode.pm lib/Slic3r/Print.pm
This commit is contained in:
commit
61b164b539
21 changed files with 123 additions and 65 deletions
|
@ -64,8 +64,8 @@ our $Options = {
|
|||
tooltip => 'Some G/M-code commands, including temperature control and others, are not universal. Set this option to your printer\'s firmware to get a compatible output. The "No extrusion" flavor prevents Slic3r from exporting any extrusion value at all.',
|
||||
cli => 'gcode-flavor=s',
|
||||
type => 'select',
|
||||
values => [qw(reprap teacup makerbot mach3 no-extrusion)],
|
||||
labels => ['RepRap (Marlin/Sprinter)', 'Teacup', 'MakerBot', 'Mach3/EMC', 'No extrusion'],
|
||||
values => [qw(reprap teacup makerbot sailfish mach3 no-extrusion)],
|
||||
labels => ['RepRap (Marlin/Sprinter)', 'Teacup', 'MakerBot', 'Sailfish', 'Mach3/EMC', 'No extrusion'],
|
||||
default => 'reprap',
|
||||
},
|
||||
'use_relative_e_distances' => {
|
||||
|
@ -158,7 +158,7 @@ our $Options = {
|
|||
sidetext => '°C',
|
||||
cli => 'temperature=i@',
|
||||
type => 'i',
|
||||
max => 300,
|
||||
max => 400,
|
||||
serialize => $serialize_comma,
|
||||
deserialize => sub { $_[0] ? [ split /,/, $_[0] ] : [0] },
|
||||
default => [200],
|
||||
|
@ -171,7 +171,7 @@ our $Options = {
|
|||
type => 'i',
|
||||
serialize => $serialize_comma,
|
||||
deserialize => sub { $_[0] ? [ split /,/, $_[0] ] : [0] },
|
||||
max => 300,
|
||||
max => 400,
|
||||
default => [200],
|
||||
},
|
||||
|
||||
|
@ -703,7 +703,7 @@ END
|
|||
type => 'f',
|
||||
serialize => $serialize_comma,
|
||||
deserialize => $deserialize_comma,
|
||||
default => [3],
|
||||
default => [10],
|
||||
},
|
||||
'retract_restart_extra_toolchange' => {
|
||||
label => 'Extra length on restart',
|
||||
|
@ -722,7 +722,7 @@ END
|
|||
tooltip => 'This flag enables all the cooling features.',
|
||||
cli => 'cooling!',
|
||||
type => 'bool',
|
||||
default => 0,
|
||||
default => 1,
|
||||
},
|
||||
'min_fan_speed' => {
|
||||
label => 'Min',
|
||||
|
@ -953,7 +953,7 @@ sub new_from_cli {
|
|||
if ($args{$opt_key}) {
|
||||
die "Invalid value for --${_}-gcode: file does not exist\n"
|
||||
if !-e $args{$opt_key};
|
||||
open my $fh, "<", $args{$opt_key}
|
||||
Slic3r::open(\my $fh, "<", $args{$opt_key})
|
||||
or die "Failed to open $args{$opt_key}\n";
|
||||
binmode $fh, ':utf8';
|
||||
$args{$opt_key} = do { local $/; <$fh> };
|
||||
|
@ -1031,6 +1031,17 @@ sub set {
|
|||
$value = 1;
|
||||
}
|
||||
|
||||
# For historical reasons, the world's full of configs having these very low values;
|
||||
# to avoid unexpected behavior we need to ignore them. Banning these two hard-coded
|
||||
# values is a dirty hack and will need to be removed sometime in the future, but it
|
||||
# will avoid lots of complaints for now.
|
||||
if ($opt_key eq 'perimeter_acceleration' && $value == '25') {
|
||||
$value = 0;
|
||||
}
|
||||
if ($opt_key eq 'infill_acceleration' && $value == '50') {
|
||||
$value = 0;
|
||||
}
|
||||
|
||||
if (!exists $Options->{$opt_key}) {
|
||||
my @keys = grep { $Options->{$_}{aliases} && grep $_ eq $opt_key, @{$Options->{$_}{aliases}} } keys %$Options;
|
||||
if (!@keys) {
|
||||
|
@ -1258,7 +1269,7 @@ sub write_ini {
|
|||
my $class = shift;
|
||||
my ($file, $ini) = @_;
|
||||
|
||||
open my $fh, '>', $file;
|
||||
Slic3r::open(\my $fh, '>', $file);
|
||||
binmode $fh, ':utf8';
|
||||
my $localtime = localtime;
|
||||
printf $fh "# generated by Slic3r $Slic3r::VERSION on %s\n", "$localtime";
|
||||
|
@ -1276,7 +1287,7 @@ sub read_ini {
|
|||
my ($file) = @_;
|
||||
|
||||
local $/ = "\n";
|
||||
open my $fh, '<', $file;
|
||||
Slic3r::open(\my $fh, '<', $file);
|
||||
binmode $fh, ':utf8';
|
||||
|
||||
my $ini = { _ => {} };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue