From a00f6c72ed818242c46733d4457bf8143a640e70 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 18 May 2014 23:56:00 +0200 Subject: [PATCH] Don't emit temperature commands if standby temperature delta is zero --- lib/Slic3r/GCode.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index d515573c2..d3b026f19 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -591,11 +591,13 @@ sub set_extruder { $gcode .= $self->travel_to($standby_point); } - my $temp = defined $self->layer && $self->layer->id == 0 - ? $self->extruder->first_layer_temperature - : $self->extruder->temperature; - # we assume that heating is always slower than cooling, so no need to block - $gcode .= $self->set_temperature($temp + $self->config->standby_temperature_delta, 0); + if ($self->config->standby_temperature_delta != 0) { + my $temp = defined $self->layer && $self->layer->id == 0 + ? $self->extruder->first_layer_temperature + : $self->extruder->temperature; + # we assume that heating is always slower than cooling, so no need to block + $gcode .= $self->set_temperature($temp + $self->config->standby_temperature_delta, 0); + } } # set the new extruder @@ -612,7 +614,7 @@ sub set_extruder { $gcode .= $self->reset_e; # set the new extruder to the operating temperature - if ($self->config->ooze_prevention) { + if ($self->config->ooze_prevention && $self->config->standby_temperature_delta != 0) { my $temp = defined $self->layer && $self->layer->id == 0 ? $self->extruder->first_layer_temperature : $self->extruder->temperature;