Raise head on "pause at Z" so you can flush the nozzle when changing colors.

master
daid303 2012-12-20 13:32:02 +01:00
parent 9e615a60ed
commit 6790d018b5
3 changed files with 13 additions and 7 deletions

View File

@ -12,6 +12,10 @@ from Cura.util import resources
def getDefaultFirmware():
if profile.getPreference('machine_type') == 'ultimaker':
if profile.getPreferenceFloat('extruder_amount') > 1:
return None
if profile.getPreference('has_heated_bed') == 'True':
return None
if sys.platform.startswith('linux'):
return resources.getPathForFirmware("ultimaker_115200.hex")
else:
@ -21,12 +25,12 @@ def getDefaultFirmware():
class InstallFirmware(wx.Dialog):
def __init__(self, filename = None, port = None):
super(InstallFirmware, self).__init__(parent=None, title="Firmware install", size=(250, 100))
if port == None:
if port is None:
port = profile.getPreference('serial_port')
if filename == None:
if filename is None:
filename = getDefaultFirmware()
if filename == None:
wx.MessageBox('Cura does not ship with a default firmware for your machine.', 'Firmware update', wx.OK | wx.ICON_ERROR)
if filename is None:
wx.MessageBox('I am sorry, but Cura does not ship with a default firmware for your machine configuration.', 'Firmware update', wx.OK | wx.ICON_ERROR)
self.Destroy()
return

View File

@ -505,7 +505,7 @@ class PreviewGLCanvas(glcanvas.GLCanvas):
p1 = numpy.array(gluUnProject(e.GetX(), self.viewport[1] + self.viewport[3] - e.GetY(), 1, self.modelMatrix, self.projMatrix, self.viewport))
cursorZ0 = p0 - (p1 - p0) * (p0[2] / (p1[2] - p0[2]))
cursorXY = math.sqrt((cursorZ0[0] * cursorZ0[0]) + (cursorZ0[1] * cursorZ0[1]))
if cursorXY >= radius * 1.1 and cursorXY <= radius * 1.3:
if radius * 1.1 <= cursorXY <= radius * 1.3:
self.SetCursor(wx.StockCursor(wx.CURSOR_SIZING))
else:
self.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT))
@ -513,7 +513,7 @@ class PreviewGLCanvas(glcanvas.GLCanvas):
if e.Dragging() and e.LeftIsDown():
if self.dragType == '':
#Define the drag type depending on the cursor position.
if cursorXY >= radius * 1.1 and cursorXY <= radius * 1.3 and self.viewMode != 'GCode' and self.viewMode == 'Mixed':
if radius * 1.1 <= cursorXY <= radius * 1.3 and self.viewMode != 'GCode' and self.viewMode != 'Mixed':
self.dragType = 'modelRotate'
self.dragStart = math.atan2(cursorZ0[0], cursorZ0[1])
else:
@ -794,7 +794,7 @@ class PreviewGLCanvas(glcanvas.GLCanvas):
glTranslate(self.parent.machineCenter.x, self.parent.machineCenter.y, 0)
#Draw the rotate circle
if self.parent.objectsMaxV != None and self.viewMode != 'GCode' and self.viewMode == 'Mixed':
if self.parent.objectsMaxV is not None and self.viewMode != 'GCode' and self.viewMode != 'Mixed':
glDisable(GL_LIGHTING)
glDisable(GL_CULL_FACE)
glEnable(GL_BLEND)

View File

@ -45,6 +45,8 @@ with open(filename, "w") as f:
f.write("G1 E-%f F6000\n" % (retractAmount))
#Move the head away
f.write("G1 X%f Y%f F9000\n" % (parkX, parkY))
if z < 15:
f.write("G1 Z15 F300\n")
#Wait till the user continues printing
f.write("M0\n")
#Move the head back