Skip to content

Commit

Permalink
Make the platform 10mm smaller if you have dual extrusion, else you h…
Browse files Browse the repository at this point in the history
…it the screws on the backside of the platform. Do not load the UM platform mesh unless you have an ultimaker.
  • Loading branch information
daid committed Aug 23, 2013
1 parent 28efc5a commit 3e05699
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cura/gui/configWizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def StoreData(self):
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':
Expand Down
2 changes: 1 addition & 1 deletion Cura/gui/mainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def OnDefaultMarlinFirmware(self, e):
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")
Expand Down
10 changes: 6 additions & 4 deletions Cura/gui/sceneView.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def __init__(self, parent):
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())

Expand Down Expand Up @@ -104,7 +103,7 @@ def __init__(self, parent):
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))

Expand Down Expand Up @@ -1140,7 +1139,10 @@ def _drawMachine(self):

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)
Expand Down
3 changes: 3 additions & 0 deletions Cura/util/sliceEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ def _watchProcess(self, commandList, oldThread):
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()
Expand Down

0 comments on commit 3e05699

Please sign in to comment.