Commit 2613f65d authored by Jeremy Hammett's avatar Jeremy Hammett

Update gviz.py

parent b5db90d1
......@@ -18,8 +18,11 @@ class window(wx.Frame):
def __init__(self,f,size=(600,600),build_dimensions=[200,200,100,0,0,0],grid=(10,50),extrusion_width=0.5):
wx.Frame.__init__(self,None,title="Gcode view, shift to move view, mousewheel to set layer",size=(size[0],size[1]))
self.p=gviz(self,size=size,build_dimensions=build_dimensions,grid=grid,extrusion_width=extrusion_width)
# Set up a status bar for displaying info (Jezmy)
self.CreateStatusBar(1);
self.SetStatusText("Layer number and Z position show here when you scroll");
s=time.time()
#print time.time()-s
self.initpos=[0,0]
......@@ -124,18 +127,16 @@ class gviz(wx.Panel):
def layerup(self):
if(self.layerindex+1<len(self.layers)):
self.layerindex+=1
# Display layer info on statusbar (Jezmy)
self.parent.SetStatusText("Layer "+str(self.layerindex +1)+" - Going Up - Z = "+str(self.layers[self.layerindex])+" mm",0)
# self.parent.setstatustext("Layer = "+str(self.layerindex) , 0)
self.repaint()
self.Refresh()
def layerdown(self):
if(self.layerindex>0):
self.layerindex-=1
self.layerindex-=1
# Display layer info on statusbar (Jezmy)
self.parent.SetStatusText("Layer "+str(self.layerindex + 1)+" - Going Down - Z = "+str(self.layers[self.layerindex])+ " mm",0)
# self.parent.setstatustext("Layer = "+str(self.layerindex), 0)
self.repaint()
self.Refresh()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment