From 49278583c6a5b46dabaa462019e725ae9eb97f24 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Fri, 6 Nov 2015 14:18:43 -0500 Subject: [PATCH] for Z change, also accept negative Z values --- Cura/util/machineCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cura/util/machineCom.py b/Cura/util/machineCom.py index e6764400..0db7ecb2 100644 --- a/Cura/util/machineCom.py +++ b/Cura/util/machineCom.py @@ -602,7 +602,7 @@ class MachineCom(object): if self._printSection in self._feedRateModifier: line = re.sub('F([0-9]*)', lambda m: 'F' + str(int(int(m.group(1)) * self._feedRateModifier[self._printSection])), line) if ('G0' in line or 'G1' in line) and 'Z' in line: - z = float(re.search('Z([0-9\.]*)', line).group(1)) + z = float(re.search('Z(-?[0-9\.]*)', line).group(1)) if self._currentZ != z: self._currentZ = z self._callback.mcZChange(z) -- 2.30.2