Rename support_material_tool to support_material_extruder

This commit is contained in:
Alessandro Ranellucci 2012-06-28 15:14:27 +02:00
parent 3e8bc73fcb
commit dbcfebeb66
4 changed files with 10 additions and 11 deletions

View File

@ -132,7 +132,7 @@ our $support_material_threshold = 45;
our $support_material_pattern = 'rectilinear'; our $support_material_pattern = 'rectilinear';
our $support_material_spacing = 2.5; our $support_material_spacing = 2.5;
our $support_material_angle = 0; our $support_material_angle = 0;
our $support_material_tool = 0; our $support_material_extruder = 0;
our $start_gcode = "G28 ; home all axes"; our $start_gcode = "G28 ; home all axes";
our $end_gcode = <<"END"; our $end_gcode = <<"END";
M104 S0 ; turn off temperature M104 S0 ; turn off temperature

View File

@ -320,12 +320,11 @@ our $Options = {
cli => 'support-material-angle=i', cli => 'support-material-angle=i',
type => 'i', type => 'i',
}, },
'support_material_tool' => { 'support_material_extruder' => {
label => 'Extruder', label => 'Extruder',
cli => 'support-material-tool=i', cli => 'support-material-extruder=i',
type => 'select', type => 'i',
values => [0,1], aliases => [qw(support_material_tool)],
labels => [qw(Primary Secondary)],
}, },
'start_gcode' => { 'start_gcode' => {
label => 'Start G-code', label => 'Start G-code',

View File

@ -87,7 +87,7 @@ sub new {
}, },
support_material => { support_material => {
title => 'Support material', title => 'Support material',
options => [qw(support_material support_material_threshold support_material_pattern support_material_spacing support_material_angle support_material_tool)], options => [qw(support_material support_material_threshold support_material_pattern support_material_spacing support_material_angle support_material_extruder)],
}, },
); );
$self->{panels} = \%panels; $self->{panels} = \%panels;

View File

@ -510,7 +510,7 @@ sub write_gcode {
my $gcodegen = Slic3r::GCode->new; my $gcodegen = Slic3r::GCode->new;
my $min_print_speed = 60 * $Slic3r::min_print_speed; my $min_print_speed = 60 * $Slic3r::min_print_speed;
my $dec = $gcodegen->dec; my $dec = $gcodegen->dec;
if ($Slic3r::support_material && $Slic3r::support_material_tool > 0) { if ($Slic3r::support_material && $Slic3r::support_material_extruder > 0) {
print $fh $gcodegen->set_tool(0); print $fh $gcodegen->set_tool(0);
} }
print $fh $gcodegen->set_fan(0, 1) if $Slic3r::cooling && $Slic3r::disable_fan_first_layers; print $fh $gcodegen->set_fan(0, 1) if $Slic3r::cooling && $Slic3r::disable_fan_first_layers;
@ -601,12 +601,12 @@ sub write_gcode {
# extrude support material # extrude support material
if ($layer->support_fills) { if ($layer->support_fills) {
$gcode .= $gcodegen->set_tool($Slic3r::support_material_tool) $gcode .= $gcodegen->set_tool($Slic3r::support_material_extruder)
if $Slic3r::support_material_tool > 0; if $Slic3r::support_material_extruder > 0;
$gcode .= $gcodegen->extrude_path($_, 'support material') $gcode .= $gcodegen->extrude_path($_, 'support material')
for $layer->support_fills->shortest_path($gcodegen->last_pos); for $layer->support_fills->shortest_path($gcodegen->last_pos);
$gcode .= $gcodegen->set_tool(0) $gcode .= $gcodegen->set_tool(0)
if $Slic3r::support_material_tool > 0; if $Slic3r::support_material_extruder > 0;
} }
} }
return if !$gcode; return if !$gcode;