mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-23 00:29:26 -07:00
First layer temperature. #134
This commit is contained in:
@@ -91,6 +91,11 @@ our $Options = {
|
||||
type => 'f',
|
||||
aliases => [qw(filament_packing_density)],
|
||||
},
|
||||
'first_layer_temperature' => {
|
||||
label => 'First layer temperature (°C)',
|
||||
cli => 'fisrt-layer-temperature=i',
|
||||
type => 'i',
|
||||
},
|
||||
'temperature' => {
|
||||
label => 'Temperature (°C)',
|
||||
cli => 'temperature=i',
|
||||
@@ -594,6 +599,7 @@ sub validate {
|
||||
$Slic3r::small_perimeter_speed ||= $Slic3r::perimeter_speed;
|
||||
$Slic3r::bridge_speed ||= $Slic3r::infill_speed;
|
||||
$Slic3r::solid_infill_speed ||= $Slic3r::infill_speed;
|
||||
$Slic3r::first_layer_temperature //= $Slic3r::temperature; #/
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -25,7 +25,7 @@ sub new {
|
||||
},
|
||||
filament => {
|
||||
title => 'Filament',
|
||||
options => [qw(filament_diameter extrusion_multiplier temperature)],
|
||||
options => [qw(filament_diameter extrusion_multiplier temperature first_layer_temperature)],
|
||||
},
|
||||
print_speed => {
|
||||
title => 'Print speed',
|
||||
|
||||
@@ -587,8 +587,8 @@ sub export_gcode {
|
||||
|
||||
# write start commands to file
|
||||
printf $fh "M104 %s%d ; set temperature\n",
|
||||
($Slic3r::gcode_flavor eq 'mach3' ? 'P' : 'S'), $Slic3r::temperature
|
||||
if $Slic3r::temperature;
|
||||
($Slic3r::gcode_flavor eq 'mach3' ? 'P' : 'S'), $Slic3r::first_layer_temperature
|
||||
if $Slic3r::first_layer_temperature;
|
||||
print $fh "$Slic3r::start_gcode\n";
|
||||
printf $fh "M109 %s%d ; wait for temperature to be reached\n",
|
||||
($Slic3r::gcode_flavor eq 'mach3' ? 'P' : 'S'), $Slic3r::temperature
|
||||
@@ -622,6 +622,12 @@ sub export_gcode {
|
||||
|
||||
# write gcode commands layer by layer
|
||||
foreach my $layer (@{ $self->layers }) {
|
||||
if ($layer->id == 1) {
|
||||
printf $fh "M104 %s%d ; set temperature\n",
|
||||
($Slic3r::gcode_flavor eq 'mach3' ? 'P' : 'S'), $Slic3r::temperature
|
||||
if $Slic3r::temperature && $Slic3r::temperature != $Slic3r::first_layer_temperature;
|
||||
}
|
||||
|
||||
# go to layer
|
||||
print $fh $extruder->change_layer($layer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user