i = toolsMenu.Append(-1, _("Copy profile to clipboard"))
self.Bind(wx.EVT_MENU, self.onCopyProfileClipboard,i)
+
+ toolsMenu.AppendSeparator()
+ self.allAtOnceItem = toolsMenu.Append(-1, _("Print all at once"), kind=wx.ITEM_RADIO)
+ self.Bind(wx.EVT_MENU, self.onOneAtATimeSwitch, self.allAtOnceItem)
+ self.oneAtATime = toolsMenu.Append(-1, _("Print one at a time"), kind=wx.ITEM_RADIO)
+ self.Bind(wx.EVT_MENU, self.onOneAtATimeSwitch, self.oneAtATime)
+ if profile.getPreference('oneAtATime') == 'True':
+ self.oneAtATime.Check(True)
+ else:
+ self.allAtOnceItem.Check(True)
+
self.menubar.Append(toolsMenu, _("Tools"))
#Machine menu for machine configuration/tooling
self.headOffsetWizardMenuItem.Enable(False)
self.scene.updateProfileToControls()
+ def onOneAtATimeSwitch(self, e):
+ profile.putPreference('oneAtATime', self.oneAtATime.IsChecked())
+ if self.oneAtATime.IsChecked() and profile.getMachineSettingFloat('extruder_head_size_height') < 1:
+ wx.MessageBox(_('For "One at a time" printing, you need to have entered the correct head size and gantry height in the machine settings'), _('One at a time warning'), wx.OK | wx.ICON_WARNING)
+ self.scene.updateProfileToControls()
+
def OnPreferences(self, e):
prefDialog = preferencesDialog.preferencesDialog(self)
prefDialog.Centre()
glVertex3f(p[0], p[1], 0)
glEnd()
glPopMatrix()
- glPushMatrix()
- glColor4f(0,0,0,0.06)
- glTranslatef(self._selectedObj.getPosition()[0], self._selectedObj.getPosition()[1], 0)
- glBegin(GL_TRIANGLE_FAN)
- for p in self._selectedObj._printAreaHull[::-1]:
- glVertex3f(p[0], p[1], 0)
- glEnd()
- glBegin(GL_TRIANGLE_FAN)
- for p in self._selectedObj._headAreaMinHull[::-1]:
- glVertex3f(p[0], p[1], 0)
- glEnd()
+ if self._scene.isOneAtATime():
+ glPushMatrix()
+ glColor4f(0,0,0,0.06)
+ glTranslatef(self._selectedObj.getPosition()[0], self._selectedObj.getPosition()[1], 0)
+ glBegin(GL_TRIANGLE_FAN)
+ for p in self._selectedObj._printAreaHull[::-1]:
+ glVertex3f(p[0], p[1], 0)
+ glEnd()
+ glBegin(GL_TRIANGLE_FAN)
+ for p in self._selectedObj._headAreaMinHull[::-1]:
+ glVertex3f(p[0], p[1], 0)
+ glEnd()
+ glPopMatrix()
glDepthMask(True)
glDisable(GL_CULL_FACE)
- glPopMatrix()
#Draw the outline of the selected object, on top of everything else except the GUI.
if self._selectedObj is not None and self._selectedObj._loadAnim is None:
self._headSizeOffsets[0] = min(xMin, xMax)
self._headSizeOffsets[1] = min(yMin, yMax)
self._gantryHeight = gantryHeight
- self._oneAtATime = self._gantryHeight > 0
+ self._oneAtATime = self._gantryHeight > 0 and profile.getPreference('oneAtATime') == 'True'
+ for obj in self._objectList:
+ if obj.getSize()[2] > self._gantryHeight:
+ self._oneAtATime = False
headArea = numpy.array([[-xMin,-yMin],[ xMax,-yMin],[ xMax, yMax],[-xMin, yMax]], numpy.float32)
else:
obj.setHeadArea(headArea, self._headSizeOffsets)
+ def isOneAtATime(self):
+ return self._oneAtATime
+
def setExtruderOffset(self, extruderNr, offsetX, offsetY):
self._extruderOffset[extruderNr] = numpy.array([offsetX, offsetY], numpy.float32)
""", str, 'alteration', 'alteration')
setting('startMode', 'Simple', ['Simple', 'Normal'], 'preference', 'hidden')
+setting('oneAtATime', 'True', bool, 'preference', 'hidden')
setting('lastFile', os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'resources', 'example', 'UltimakerRobot_support.stl')), str, 'preference', 'hidden')
setting('save_profile', 'False', bool, 'preference', 'hidden').setLabel(_("Save profile on slice"), _("When slicing save the profile as [stl_file]_profile.ini next to the model."))
setting('filament_cost_kg', '0', float, 'preference', 'hidden').setLabel(_("Cost (price/kg)"), _("Cost of your filament per kg, to estimate the cost of the final print."))