chiark / gitweb /
Save last known Z position in multi color slicing.
authorDaid <daid303@gmail.com>
Tue, 1 May 2012 16:40:10 +0000 (18:40 +0200)
committerDaid <daid303@gmail.com>
Tue, 1 May 2012 16:40:10 +0000 (18:40 +0200)
Cura/gui/sliceProgessPanel.py

index e3e96d258aee70cce37f0ecdc32025156e974d5d..7f10300ea60c9391855b477a02cdd6cea3b58b32 100644 (file)
@@ -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))