From: daid303 Date: Thu, 20 Dec 2012 12:32:02 +0000 (+0100) Subject: Raise head on "pause at Z" so you can flush the nozzle when changing colors. X-Git-Tag: 13.03~144 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6790d018b51c5c269a635be37ec8905cee84fafe;p=cura.git Raise head on "pause at Z" so you can flush the nozzle when changing colors. --- diff --git a/Cura/gui/firmwareInstall.py b/Cura/gui/firmwareInstall.py index efb791a5..b65a07ca 100644 --- a/Cura/gui/firmwareInstall.py +++ b/Cura/gui/firmwareInstall.py @@ -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 diff --git a/Cura/gui/preview3d.py b/Cura/gui/preview3d.py index 9cc852e7..527e47bb 100644 --- a/Cura/gui/preview3d.py +++ b/Cura/gui/preview3d.py @@ -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) diff --git a/Cura/plugins/pauseAtZ.py b/Cura/plugins/pauseAtZ.py index 52d190a0..4404884a 100644 --- a/Cura/plugins/pauseAtZ.py +++ b/Cura/plugins/pauseAtZ.py @@ -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