chiark / gitweb /
Make the platform 10mm smaller if you have dual extrusion, else you hit the screws...
authordaid <daid303@gmail.com>
Fri, 23 Aug 2013 13:47:14 +0000 (15:47 +0200)
committerdaid <daid303@gmail.com>
Fri, 23 Aug 2013 13:47:14 +0000 (15:47 +0200)
Cura/gui/configWizard.py
Cura/gui/mainWindow.py
Cura/gui/sceneView.py
Cura/util/sliceEngine.py

index 42a11b4043e02d50325b42f4ccfedf87d537ac54..1bafbeacfc9ee9659cb9eae141c1ddeb272dc9d5 100644 (file)
@@ -326,6 +326,7 @@ class SelectParts(InfoPage):
                profile.putPreference('has_heated_bed', str(self.heatedBed.GetValue()))
                if self.dualExtrusion.GetValue():
                        profile.putPreference('extruder_amount', '2')
+                       profile.putPreference('machine_depth', '195')
                else:
                        profile.putPreference('extruder_amount', '1')
                if profile.getPreference('ultimaker_extruder_upgrade') == 'True':
index ad23c3c677966ec2ae305ba5120c8753d4f35af4..4081aa3253a65825d49d6c69559e817ce7eafdf5 100644 (file)
@@ -369,7 +369,7 @@ class mainWindow(wx.Frame):
                firmwareInstall.InstallFirmware()
 
        def OnCustomFirmware(self, e):
-               if profile.getPreference('machine_type') == 'ultimaker':
+               if profile.getPreference('machine_type').startswith('ultimaker'):
                        wx.MessageBox('Warning: Installing a custom firmware does not guarantee that you machine will function correctly, and could damage your machine.', 'Firmware update', wx.OK | wx.ICON_EXCLAMATION)
                dlg=wx.FileDialog(self, "Open firmware to upload", os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
                dlg.SetWildcard("HEX file (*.hex)|*.hex;*.HEX")
index 5b59e78a814fddd7054d3dbe2de8eb8b05e9ee58..e3b527a388938c0d746fec10bb4644c3f1048459 100644 (file)
@@ -51,8 +51,7 @@ class SceneView(openglGui.glGuiPanel):
                self._viewTarget = numpy.array([0,0,0], numpy.float32)
                self._animView = None
                self._animZoom = None
-               self._platformMesh = meshLoader.loadMeshes(resources.getPathForMesh('ultimaker_platform.stl'))[0]
-               self._platformMesh._drawOffset = numpy.array([0,0,2.5], numpy.float32)
+               self._platformMesh = None
                self._isSimpleMode = True
                self._usbPrintMonitor = printWindow.printProcessMonitor(lambda : self._queueRefresh())
 
@@ -104,7 +103,7 @@ class SceneView(openglGui.glGuiPanel):
                self.viewSelection = openglGui.glComboButton(self, 'View mode', [7,19,11,15,23], ['Normal', 'Overhang', 'Transparent', 'X-Ray', 'Layers'], (-1,0), self.OnViewChange)
                self.layerSelect = openglGui.glSlider(self, 10000, 0, 1, (-1,-2), lambda : self.QueueRefresh())
 
-               self.youMagineButton = openglGui.glButton(self, 26, 'YouMagine upload', (2,0), lambda button: youmagineGui.youmagineManager(self.GetTopLevelParent(), self))
+               self.youMagineButton = openglGui.glButton(self, 26, 'YouMagine upload', (2,0), lambda button: youmagineGui.youmagineManager(self.GetTopLevelParent(), self._scene))
 
                self.notification = openglGui.glNotification(self, (0, 0))
 
@@ -1140,7 +1139,10 @@ void main(void)
 
                size = [profile.getPreferenceFloat('machine_width'), profile.getPreferenceFloat('machine_depth'), profile.getPreferenceFloat('machine_height')]
 
-               if profile.getPreference('machine_type') == 'ultimaker':
+               if profile.getPreference('machine_type').startswith('ultimaker'):
+                       if self._platformMesh is None:
+                               self._platformMesh = meshLoader.loadMeshes(resources.getPathForMesh('ultimaker_platform.stl'))[0]
+                               self._platformMesh._drawOffset = numpy.array([0,0,2.5], numpy.float32)
                        glColor4f(1,1,1,0.5)
                        self._objectShader.bind()
                        self._renderObject(self._platformMesh, False, False)
index 2c4758b75c23efa17eae8cada5ff42b44ac09f78..4c834e6ac1cb2da62a712258f9abf0e4fd78a9a9 100644 (file)
@@ -209,6 +209,9 @@ class Slicer(object):
                                self._printTimeSeconds = int(line.split(':')[1].strip())
                        elif line.startswith('Filament:'):
                                self._filamentMM = int(line.split(':')[1].strip())
+                               if profile.getPreference('gcode_flavor') == 'UltiGCode':
+                                       radius = profile.getProfileSettingFloat('filament_diameter') / 2.0
+                                       self._filamentMM /= (math.pi * radius * radius)
                        else:
                                self._sliceLog.append(line.strip())
                        line = self._process.stdout.readline()