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':
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")
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())
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))
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)
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()