From: Daid Date: Tue, 1 May 2012 16:40:10 +0000 (+0200) Subject: Save last known Z position in multi color slicing. X-Git-Tag: RC3~13^2~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3d70d671453f2d75f7f0155d9df08bd88d4e4a34;p=cura.git Save last known Z position in multi color slicing. --- diff --git a/Cura/gui/sliceProgessPanel.py b/Cura/gui/sliceProgessPanel.py index e3e96d25..7f10300e 100644 --- a/Cura/gui/sliceProgessPanel.py +++ b/Cura/gui/sliceProgessPanel.py @@ -1,7 +1,7 @@ from __future__ import absolute_import import __init__ -import wx, sys, os, math, threading, subprocess, time +import wx, sys, os, math, threading, subprocess, time, re from util import profile from util import sliceRun @@ -202,6 +202,8 @@ class WorkerThread(threading.Thread): hasLine = True if line.startswith(';LAYER:'): break + if 'Z' in line: + lastZ = float(re.search('Z([^\s]+)', line).group(1)) if not layerHasLine: nextExtruder = files.index(f) resultFile.write(';LAYER:%d\n' % (layerNr))