New --fan-always-on option. #241 #110

This commit is contained in:
Alessandro Ranellucci 2012-03-03 22:21:30 +01:00
parent c7006fed26
commit 06c22c9db3
6 changed files with 13 additions and 3 deletions

View File

@ -176,6 +176,8 @@ The author is Alessandro Ranellucci (me).
of seconds (default: 15) of seconds (default: 15)
--min-print-speed Minimum print speed speed (mm/s, default: 10) --min-print-speed Minimum print speed speed (mm/s, default: 10)
--disable-fan-first-layers Disable fan for the first N layers (default: 1) --disable-fan-first-layers Disable fan for the first N layers (default: 1)
--fan-always-on Keep fan always on at min fan speed, even for layers that don't need
cooling
Skirt options: Skirt options:
--skirts Number of skirts to draw (0+, default: 1) --skirts Number of skirts to draw (0+, default: 1)

View File

@ -124,6 +124,7 @@ our $fan_below_layer_time = 60;
our $slowdown_below_layer_time = 15; our $slowdown_below_layer_time = 15;
our $min_print_speed = 10; our $min_print_speed = 10;
our $disable_fan_first_layers = 1; our $disable_fan_first_layers = 1;
our $fan_always_on = 0;
# skirt options # skirt options
our $skirts = 1; our $skirts = 1;

View File

@ -338,6 +338,11 @@ our $Options = {
cli => 'disable-fan-first-layers=i', cli => 'disable-fan-first-layers=i',
type => 'i', type => 'i',
}, },
'fan_always_on' => {
label => 'Keep fan always on',
cli => 'fan-always-on',
type => 'bool',
},
# skirt options # skirt options
'skirts' => { 'skirts' => {

View File

@ -49,7 +49,7 @@ sub new {
}, },
cooling => { cooling => {
title => 'Cooling', title => 'Cooling',
options => [qw(cooling min_fan_speed max_fan_speed bridge_fan_speed fan_below_layer_time slowdown_below_layer_time min_print_speed disable_fan_first_layers)], options => [qw(cooling min_fan_speed max_fan_speed bridge_fan_speed fan_below_layer_time slowdown_below_layer_time min_print_speed disable_fan_first_layers fan_always_on)],
label_width => 300, label_width => 300,
}, },
skirt => { skirt => {

View File

@ -670,7 +670,7 @@ sub export_gcode {
} }
last if !$layer_gcode; last if !$layer_gcode;
my $fan_speed = 0; my $fan_speed = $Slic3r::fan_always_on ? $Slic3r::min_fan_speed : 0;
my $speed_factor = 1; my $speed_factor = 1;
if ($Slic3r::cooling) { if ($Slic3r::cooling) {
my $layer_time = $extruder->elapsed_time; my $layer_time = $extruder->elapsed_time;
@ -694,8 +694,8 @@ sub export_gcode {
/gexm; /gexm;
} }
$fan_speed = 0 if $layer->id < $Slic3r::disable_fan_first_layers; $fan_speed = 0 if $layer->id < $Slic3r::disable_fan_first_layers;
$layer_gcode = $extruder->set_fan($fan_speed) . $layer_gcode;
} }
$layer_gcode = $extruder->set_fan($fan_speed) . $layer_gcode;
# bridge fan speed # bridge fan speed
if (!$Slic3r::cooling || $Slic3r::bridge_fan_speed == 0 || $layer->id < $Slic3r::disable_fan_first_layers) { if (!$Slic3r::cooling || $Slic3r::bridge_fan_speed == 0 || $layer->id < $Slic3r::disable_fan_first_layers) {

View File

@ -194,6 +194,8 @@ Usage: slic3r.pl [ OPTIONS ] file.stl
of seconds (default: $Slic3r::slowdown_below_layer_time) of seconds (default: $Slic3r::slowdown_below_layer_time)
--min-print-speed Minimum print speed speed (mm/s, default: $Slic3r::min_print_speed) --min-print-speed Minimum print speed speed (mm/s, default: $Slic3r::min_print_speed)
--disable-fan-first-layers Disable fan for the first N layers (default: $Slic3r::disable_fan_first_layers) --disable-fan-first-layers Disable fan for the first N layers (default: $Slic3r::disable_fan_first_layers)
--fan-always-on Keep fan always on at min fan speed, even for layers that don't need
cooling
Skirt options: Skirt options:
--skirts Number of skirts to draw (0+, default: $Slic3r::skirts) --skirts Number of skirts to draw (0+, default: $Slic3r::skirts)