Fix perimeters_* options to be singular to be consistent.
This commit is contained in:
parent
cbb111ee64
commit
07f2dab5f6
@ -82,7 +82,7 @@ our $temperature = [200];
|
||||
our $first_layer_temperature= [];
|
||||
|
||||
# extruder mapping (1-based indexes)
|
||||
our $perimeters_extruder = 1;
|
||||
our $perimeter_extruder = 1;
|
||||
our $infill_extruder = 1;
|
||||
our $support_material_extruder = 1;
|
||||
|
||||
@ -114,7 +114,7 @@ our $infill_every_layers = 1;
|
||||
# flow options
|
||||
our $extrusion_width = 0;
|
||||
our $first_layer_extrusion_width = 0;
|
||||
our $perimeters_extrusion_width = 0;
|
||||
our $perimeter_extrusion_width = 0;
|
||||
our $infill_extrusion_width = 0;
|
||||
our $support_material_extrusion_width = 0;
|
||||
our $bridge_flow_ratio = 1;
|
||||
|
@ -122,10 +122,11 @@ our $Options = {
|
||||
},
|
||||
|
||||
# extruder mapping
|
||||
'perimeters_extruder' => {
|
||||
label => 'Perimeters extruder',
|
||||
cli => 'perimeters-extruder=i',
|
||||
'perimeter_extruder' => {
|
||||
label => 'Perimeter extruder',
|
||||
cli => 'perimeter-extruder=i',
|
||||
type => 'i',
|
||||
aliases => [qw(perimeters_extruder)],
|
||||
},
|
||||
'infill_extruder' => {
|
||||
label => 'Infill extruder',
|
||||
@ -252,10 +253,11 @@ our $Options = {
|
||||
cli => 'first-layer-extrusion-width=s',
|
||||
type => 'f',
|
||||
},
|
||||
'perimeters_extrusion_width' => {
|
||||
label => 'Perimeters extrusion width (mm or % or 0 for default)',
|
||||
cli => 'perimeters-extrusion-width=s',
|
||||
'perimeter_extrusion_width' => {
|
||||
label => 'Perimeter extrusion width (mm or % or 0 for default)',
|
||||
cli => 'perimeter-extrusion-width=s',
|
||||
type => 'f',
|
||||
aliases => [qw(perimeters_extrusion_width)],
|
||||
},
|
||||
'infill_extrusion_width' => {
|
||||
label => 'Infill extrusion width (mm or % or 0 for default)',
|
||||
@ -700,7 +702,7 @@ sub validate {
|
||||
|
||||
# initialize extruder(s)
|
||||
$Slic3r::extruders = [];
|
||||
for my $t (0, map $_-1, $Slic3r::perimeters_extruder, $Slic3r::infill_extruder, $Slic3r::support_material_extruder) {
|
||||
for my $t (0, map $_-1, $Slic3r::perimeter_extruder, $Slic3r::infill_extruder, $Slic3r::support_material_extruder) {
|
||||
$Slic3r::extruders->[$t] ||= Slic3r::Extruder->new(
|
||||
map { $_ => Slic3r::Config->get($_)->[$t] // Slic3r::Config->get($_)->[0] } #/
|
||||
qw(nozzle_diameter filament_diameter extrusion_multiplier temperature first_layer_temperature)
|
||||
@ -715,8 +717,8 @@ sub validate {
|
||||
width => $Slic3r::first_layer_extrusion_width,
|
||||
);
|
||||
}
|
||||
$Slic3r::perimeters_flow = $Slic3r::extruders->[ $Slic3r::perimeters_extruder-1 ]
|
||||
->make_flow(width => $Slic3r::perimeters_extrusion_width || $Slic3r::extrusion_width);
|
||||
$Slic3r::perimeters_flow = $Slic3r::extruders->[ $Slic3r::perimeter_extruder-1 ]
|
||||
->make_flow(width => $Slic3r::perimeter_extrusion_width || $Slic3r::extrusion_width);
|
||||
$Slic3r::infill_flow = $Slic3r::extruders->[ $Slic3r::infill_extruder-1 ]
|
||||
->make_flow(width => $Slic3r::infill_extrusion_width || $Slic3r::extrusion_width);
|
||||
$Slic3r::support_material_flow = $Slic3r::extruders->[ $Slic3r::support_material_extruder-1 ]
|
||||
|
@ -71,7 +71,7 @@ sub new {
|
||||
},
|
||||
extrusion => {
|
||||
title => 'Extrusion',
|
||||
options => [qw(extrusion_width first_layer_extrusion_width perimeters_extrusion_width infill_extrusion_width support_material_extrusion_width bridge_flow_ratio)],
|
||||
options => [qw(extrusion_width first_layer_extrusion_width perimeter_extrusion_width infill_extrusion_width support_material_extrusion_width bridge_flow_ratio)],
|
||||
},
|
||||
output => {
|
||||
title => 'Output',
|
||||
|
@ -598,7 +598,7 @@ sub write_gcode {
|
||||
$gcodegen->shift_y($shift[Y] + unscale $copy->[Y]);
|
||||
|
||||
# extrude perimeters
|
||||
$gcode .= $gcodegen->set_tool($Slic3r::perimeters_extruder-1);
|
||||
$gcode .= $gcodegen->set_tool($Slic3r::perimeter_extruder-1);
|
||||
$gcode .= $gcodegen->extrude($_, 'perimeter') for @{ $layer->perimeters };
|
||||
|
||||
# extrude fills
|
||||
|
Loading…
Reference in New Issue
Block a user