From 49ff9a0ebecb57341f93b6c7689b45adb803e2b7 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 1 May 2012 14:49:41 +0200 Subject: [PATCH] Emit G92 E0 when in relative mode. #322 --- lib/Slic3r/Print.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index d8f347269..6c1be7b1b 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -406,7 +406,8 @@ sub write_gcode { print $fh "G90 ; use absolute coordinates\n"; print $fh "G21 ; set units to millimeters\n"; if ($Slic3r::gcode_flavor =~ /^(?:reprap|teacup)$/) { - printf $fh "G92 %s0 ; reset extrusion distance\n", $Slic3r::extrusion_axis if $Slic3r::extrusion_axis; + printf $fh "G92 %s0 ; reset extrusion distance\n", $Slic3r::extrusion_axis + if $Slic3r::extrusion_axis && !$Slic3r::use_relative_e_distances; if ($Slic3r::gcode_flavor =~ /^(?:reprap|makerbot)$/) { if ($Slic3r::use_relative_e_distances) { print $fh "M83 ; use relative distances for extrusion\n";