def _load_profile_settings(self): self._layer_height = profile.getProfileSettingFloat('layer_height') self._spiralize = profile.getProfileSetting('spiralize') self._filament_diameter = profile.getProfileSetting('filament_diameter') self._filament_physical_density = profile.getPreferenceFloat('filament_physical_density') self._filament_cost_kg = profile.getPreferenceFloat('filament_cost_kg') self._filament_cost_meter = profile.getPreferenceFloat('filament_cost_meter')
def InitializeInfoPanelList(self, infoPanel): mainWindow = self.GetParent().GetParent().GetParent() settingsToDisplay = {} settingNames = ['layer_height', 'print_temperature', 'print_bed_temperature', 'fill_distance', 'wall_thickness'] newValue = None degree_sign= u'\N{DEGREE SIGN}' # Check to see if heated bed and retraction are enabled; if not, remove them from display list if profile.getMachineSetting('has_heated_bed') == "False": settingNames.remove('print_bed_temperature') # dictionary key is set to setting name, dictionary value is set to static text object with label specific to what is set in profile at that point; # quality and strength panels need to override this for setting in settingNames: if setting == "fill_distance": fill_distance_display = str(profile.getProfileSetting(setting) + "mm") settingsToDisplay[setting] = wx.StaticText(infoPanel, -1, label=fill_distance_display) elif setting == "print_temperature": print_temperature_display = str(profile.getProfileSetting(setting)) + degree_sign + "C" settingsToDisplay[setting] = wx.StaticText(infoPanel, -1, label=print_temperature_display) elif setting == "print_bed_temperature": bed_temperature_display = str(profile.getProfileSetting(setting)) + degree_sign + "C" settingsToDisplay[setting] = wx.StaticText(infoPanel, -1, label=bed_temperature_display) else: mm_display = str(profile.getProfileSetting(setting) + "mm") settingsToDisplay[setting] = wx.StaticText(infoPanel, -1, label=mm_display) self._callback() return settingsToDisplay
def loadData(self, data, profileType): # Get the support settings user has set raft = profile.getProfileSetting('platform_adhesion') support = profile.getProfileSetting('support') for setting, value in data.items(): if profileType == 'preference': profile.putPreference(setting, value) elif profileType == 'profile': profile.putProfileSetting(setting, value) # Add support preferences at the end to make sure they're not written over to 'None' profile.putProfileSetting('platform_adhesion', raft) profile.putProfileSetting('support', support) self.normalSettingsPanel.updateProfileToControls()
def checkPlatform(self, obj): p = obj.getPosition() s = obj.getSize()[0:2] / 2 + self._sizeOffsets offsetLeft = 0.0 offsetRight = 0.0 offsetBack = 0.0 offsetFront = 0.0 extruderCount = len(obj._meshList) if profile.getProfileSetting('support_dual_extrusion') == 'Second extruder' and profile.getProfileSetting('support') != 'None': extruderCount = max(extruderCount, 2) for n in xrange(1, extruderCount): if offsetLeft < self._extruderOffset[n][0]: offsetLeft = self._extruderOffset[n][0] if offsetRight > self._extruderOffset[n][0]: offsetRight = self._extruderOffset[n][0] if offsetFront < self._extruderOffset[n][1]: offsetFront = self._extruderOffset[n][1] if offsetBack > self._extruderOffset[n][1]: offsetBack = self._extruderOffset[n][1] boundLeft = -self._machineSize[0] / 2 + offsetLeft boundRight = self._machineSize[0] / 2 + offsetRight boundFront = -self._machineSize[1] / 2 + offsetFront boundBack = self._machineSize[1] / 2 + offsetBack if p[0] - s[0] < boundLeft: return False if p[0] + s[0] > boundRight: return False if p[1] - s[1] < boundFront: return False if p[1] + s[1] > boundBack: return False #Do clip Check for UM2. machine = profile.getMachineSetting('machine_type') if machine == "ultimaker2": #lowerRight clip check if p[0] - s[0] < boundLeft + 25 and p[1] - s[1] < boundFront + 10: return False #UpperRight if p[0] - s[0] < boundLeft + 25 and p[1] + s[1] > boundBack - 10: return False #LowerLeft if p[0] + s[0] > boundRight - 25 and p[1] - s[1] < boundFront + 10: return False #UpperLeft if p[0] + s[0] > boundRight - 25 and p[1] + s[1] > boundBack - 10: return False return True
def updateModelTransform(self, f=0): if len(self.objectList) < 1 or self.objectList[0].mesh == None: return rotate = profile.getProfileSettingFloat('model_rotate_base') mirrorX = profile.getProfileSetting('flip_x') == 'True' mirrorY = profile.getProfileSetting('flip_y') == 'True' mirrorZ = profile.getProfileSetting('flip_z') == 'True' swapXZ = profile.getProfileSetting('swap_xz') == 'True' swapYZ = profile.getProfileSetting('swap_yz') == 'True' for obj in self.objectList: if obj.mesh == None: continue obj.mesh.setRotateMirror(rotate, mirrorX, mirrorY, mirrorZ, swapXZ, swapYZ) minV = self.objectList[0].mesh.getMinimum() maxV = self.objectList[0].mesh.getMaximum() objectsBounderyCircleSize = self.objectList[0].mesh.bounderyCircleSize for obj in self.objectList: if obj.mesh == None: continue obj.mesh.getMinimumZ() minV = numpy.minimum(minV, obj.mesh.getMinimum()) maxV = numpy.maximum(maxV, obj.mesh.getMaximum()) objectsBounderyCircleSize = max(objectsBounderyCircleSize, obj.mesh.bounderyCircleSize) self.objectsMaxV = maxV self.objectsMinV = minV self.objectsBounderyCircleSize = objectsBounderyCircleSize for obj in self.objectList: if obj.mesh == None: continue obj.mesh.vertexes -= numpy.array([minV[0] + (maxV[0] - minV[0]) / 2, minV[1] + (maxV[1] - minV[1]) / 2, minV[2]]) #for v in obj.mesh.vertexes: # v[2] -= minV[2] # v[0] -= minV[0] + (maxV[0] - minV[0]) / 2 # v[1] -= minV[1] + (maxV[1] - minV[1]) / 2 obj.mesh.getMinimumZ() obj.dirty = True scale = profile.getProfileSettingFloat('model_scale') size = (self.objectsMaxV - self.objectsMinV) * scale self.toolbarInfo.SetValue('%0.1f %0.1f %0.1f' % (size[0], size[1], size[2])) self.glCanvas.Refresh()
def runSlicer(self, scene): extruderCount = 1 for obj in scene.objects(): if scene.checkPlatform(obj): extruderCount = max(extruderCount, len(obj._meshList)) if profile.getProfileSetting("support_dual_extrusion") == "Second extruder": extruderCount = max(extruderCount, 2) commandList = [getEngineFilename(), "-vv"] for k, v in self._engineSettings(extruderCount).iteritems(): commandList += ["-s", "%s=%s" % (k, str(v))] commandList += ["-o", self._exportFilename] commandList += ["-b", self._binaryStorageFilename] self._objCount = 0 with open(self._binaryStorageFilename, "wb") as f: hash = hashlib.sha512() order = scene.printOrder() if order is None: pos = numpy.array(profile.getMachineCenterCoords()) * 1000 commandList += ["-s", "posx=%d" % int(pos[0]), "-s", "posy=%d" % int(pos[1])] vertexTotal = 0 for obj in scene.objects(): if scene.checkPlatform(obj): for mesh in obj._meshList: vertexTotal += mesh.vertexCount f.write(numpy.array([vertexTotal], numpy.int32).tostring()) for obj in scene.objects(): if scene.checkPlatform(obj): for mesh in obj._meshList: vertexes = ( numpy.matrix(mesh.vertexes, copy=False) * numpy.matrix(obj._matrix, numpy.float32) ).getA() vertexes -= obj._drawOffset vertexes += numpy.array([obj.getPosition()[0], obj.getPosition()[1], 0.0]) f.write(vertexes.tostring()) hash.update(mesh.vertexes.tostring()) commandList += ["#"] self._objCount = 1 else: for n in order: obj = scene.objects()[n] for mesh in obj._meshList: f.write(numpy.array([mesh.vertexCount], numpy.int32).tostring()) s = mesh.vertexes.tostring() f.write(s) hash.update(s) pos = obj.getPosition() * 1000 pos += numpy.array(profile.getMachineCenterCoords()) * 1000 commandList += ["-m", ",".join(map(str, obj._matrix.getA().flatten()))] commandList += ["-s", "posx=%d" % int(pos[0]), "-s", "posy=%d" % int(pos[1])] commandList += ["#" * len(obj._meshList)] self._objCount += 1 self._modelHash = hash.hexdigest() if self._objCount > 0: self._thread = threading.Thread(target=self._watchProcess, args=(commandList, self._thread)) self._thread.daemon = True self._thread.start()
def StoreData(self): if self.UltimakerRadio.GetValue(): profile.putPreference('machine_width', '205') profile.putPreference('machine_depth', '205') profile.putPreference('machine_height', '200') profile.putPreference('machine_type', 'ultimaker') profile.putPreference('machine_center_is_zero', 'False') profile.putProfileSetting('nozzle_size', '0.4') profile.putPreference('extruder_head_size_min_x', '75.0') profile.putPreference('extruder_head_size_min_y', '18.0') profile.putPreference('extruder_head_size_max_x', '18.0') profile.putPreference('extruder_head_size_max_y', '35.0') profile.putPreference('extruder_head_size_height', '60.0') else: profile.putPreference('machine_width', '80') profile.putPreference('machine_depth', '80') profile.putPreference('machine_height', '60') profile.putPreference('machine_type', 'reprap') profile.putPreference('startMode', 'Normal') profile.putProfileSetting('nozzle_size', '0.5') profile.putProfileSetting('wall_thickness', float(profile.getProfileSetting('nozzle_size')) * 2) if self.SubmitUserStats.GetValue(): profile.putPreference('submit_slice_information', 'True') else: profile.putPreference('submit_slice_information', 'False')
def updateProfileToControls(self): "Update the configuration wx controls to show the new configuration settings" for setting in self.settingControlList: if setting.type == 'profile': setting.SetValue(profile.getProfileSetting(setting.configName)) else: setting.SetValue(profile.getPreference(setting.configName)) self.Update()
def getPossibleSDcardDrives(): global _removableCache, _removableCacheUpdateThread if profile.getProfileSetting('auto_detect_sd') == 'False': return [] if _removableCacheUpdateThread is None: _removableCacheUpdateThread = threading.Thread(target=_updateCache) _removableCacheUpdateThread.daemon = True _removableCacheUpdateThread.start() return _removableCache
def __init__(self, parent): super(simpleModePanel, self).__init__(parent) #toolsMenu = wx.Menu() #i = toolsMenu.Append(-1, 'Switch to Normal mode...') #self.Bind(wx.EVT_MENU, self.OnNormalSwitch, i) #self.menubar.Insert(1, toolsMenu, 'Normal mode') printTypePanel = wx.Panel(self) self.printTypeNormal = wx.RadioButton(printTypePanel, -1, 'Normal quality print', style=wx.RB_GROUP) self.printTypeLow = wx.RadioButton(printTypePanel, -1, 'Fast low quality print') self.printTypeHigh = wx.RadioButton(printTypePanel, -1, 'High quality print') self.printTypeJoris = wx.RadioButton(printTypePanel, -1, 'Thin walled cup or vase') printMaterialPanel = wx.Panel(self) self.printMaterialPLA = wx.RadioButton(printMaterialPanel, -1, 'PLA', style=wx.RB_GROUP) self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, 'ABS') self.printMaterialDiameter = wx.TextCtrl(printMaterialPanel, -1, profile.getProfileSetting('filament_diameter')) self.printSupport = wx.CheckBox(self, -1, 'Print support structure') self.printRetract = wx.CheckBox(self, -1, 'Use retraction') sizer = wx.GridBagSizer() self.SetSizer(sizer) sb = wx.StaticBox(printTypePanel, label="Select a print type:") boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) boxsizer.Add(self.printTypeNormal) boxsizer.Add(self.printTypeLow) boxsizer.Add(self.printTypeHigh) boxsizer.Add(self.printTypeJoris) printTypePanel.SetSizer(wx.BoxSizer(wx.VERTICAL)) printTypePanel.GetSizer().Add(boxsizer, flag=wx.EXPAND) sizer.Add(printTypePanel, (0,0), flag=wx.EXPAND) sb = wx.StaticBox(printMaterialPanel, label="Material:") boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) boxsizer.Add(self.printMaterialPLA) boxsizer.Add(self.printMaterialABS) boxsizer.Add(wx.StaticText(printMaterialPanel, -1, 'Diameter:')) boxsizer.Add(self.printMaterialDiameter) printMaterialPanel.SetSizer(wx.BoxSizer(wx.VERTICAL)) printMaterialPanel.GetSizer().Add(boxsizer, flag=wx.EXPAND) sizer.Add(printMaterialPanel, (1,0), flag=wx.EXPAND) sb = wx.StaticBox(self, label="Other:") boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) boxsizer.Add(self.printSupport) boxsizer.Add(self.printRetract) sizer.Add(boxsizer, (2,0), flag=wx.EXPAND) self.printTypeNormal.SetValue(True) self.printMaterialPLA.SetValue(True) self.printRetract.setValue(True)
def getExtraHeadSize(self): extraSizeMin = self.headSizeMin extraSizeMax = self.headSizeMax if profile.getProfileSettingFloat('skirt_line_count') > 0: skirtSize = profile.getProfileSettingFloat('skirt_line_count') * profile.calculateEdgeWidth() + profile.getProfileSettingFloat('skirt_gap') extraSizeMin = extraSizeMin + numpy.array([skirtSize, skirtSize, 0]) extraSizeMax = extraSizeMax + numpy.array([skirtSize, skirtSize, 0]) if profile.getProfileSetting('enable_raft') != 'False': raftSize = profile.getProfileSettingFloat('raft_margin') * 2 extraSizeMin = extraSizeMin + numpy.array([raftSize, raftSize, 0]) extraSizeMax = extraSizeMax + numpy.array([raftSize, raftSize, 0]) if profile.getProfileSetting('support') != 'None': extraSizeMin = extraSizeMin + numpy.array([3.0, 0, 0]) extraSizeMax = extraSizeMax + numpy.array([3.0, 0, 0]) if self.printMode == 1: extraSizeMin = numpy.array([6.0, 6.0, 0]) extraSizeMax = numpy.array([6.0, 6.0, 0]) return extraSizeMin, extraSizeMax
def getExtraHeadSize(self): extraSizeMin = self.headSizeMin extraSizeMax = self.headSizeMax if profile.getProfileSettingFloat("skirt_line_count") > 0: skirtSize = profile.getProfileSettingFloat( "skirt_line_count" ) * profile.calculateEdgeWidth() + profile.getProfileSettingFloat("skirt_gap") extraSizeMin = extraSizeMin + numpy.array([skirtSize, skirtSize, 0]) extraSizeMax = extraSizeMax + numpy.array([skirtSize, skirtSize, 0]) if profile.getProfileSetting("enable_raft") != "False": raftSize = profile.getProfileSettingFloat("raft_margin") * 2 extraSizeMin = extraSizeMin + numpy.array([raftSize, raftSize, 0]) extraSizeMax = extraSizeMax + numpy.array([raftSize, raftSize, 0]) if profile.getProfileSetting("support") != "None": extraSizeMin = extraSizeMin + numpy.array([3.0, 0, 0]) extraSizeMax = extraSizeMax + numpy.array([3.0, 0, 0]) if self.printMode == 1: extraSizeMin = numpy.array([6.0, 6.0, 0]) extraSizeMax = numpy.array([6.0, 6.0, 0]) return extraSizeMin, extraSizeMax
def gcodePath(newType, pathType, layerThickness, startPoint): """ Build a gcodePath object. This used to be objects, however, this code is timing sensitive and dictionaries proved to be faster. """ if layerThickness <= 0.0: layerThickness = 0.01 if profile.getProfileSetting('spiralize') == 'True': layerThickness = profile.getProfileSettingFloat('layer_height') return {'type': newType, 'pathType': pathType, 'layerThickness': layerThickness, 'points': [startPoint], 'extrusion': [0.0]}
def StoreData(self): if self.UltimakerRadio.GetValue(): profile.putPreference('machine_width', '205') profile.putPreference('machine_depth', '205') profile.putPreference('machine_height', '200') profile.putPreference('machine_type', 'ultimaker') profile.putProfileSetting('nozzle_size', '0.4') else: profile.putPreference('machine_width', '80') profile.putPreference('machine_depth', '80') profile.putPreference('machine_height', '60') profile.putPreference('machine_type', 'reprap') profile.putPreference('startMode', 'Normal') profile.putProfileSetting('nozzle_size', '0.5') profile.putProfileSetting('wall_thickness', float(profile.getProfileSetting('nozzle_size')) * 2)
def updateProfileToControls(self): self.scale.SetValue(profile.getProfileSetting('model_scale')) self.rotate.SetValue(profile.getProfileSettingFloat('model_rotate_base')) self.mirrorX.SetValue(profile.getProfileSetting('flip_x') == 'True') self.mirrorY.SetValue(profile.getProfileSetting('flip_y') == 'True') self.mirrorZ.SetValue(profile.getProfileSetting('flip_z') == 'True') self.swapXZ.SetValue(profile.getProfileSetting('swap_xz') == 'True') self.swapYZ.SetValue(profile.getProfileSetting('swap_yz') == 'True') self.updateModelTransform() self.glCanvas.updateProfileToControls()
def validate(self): from Cura.util import profile try: fill_distance = profile.getProfileSettingFloat('fill_distance') infill_type = profile.getProfileSetting('infill_type') # print infill_type if infill_type == 'None': return DISABLED, 'Infill has been disabled' else : if profile.getProfileSettingFloat('fill_distance') < profile.calculateEdgeWidth() : return ERROR, 'Distance between infill cannot be less than extrusion width : '+str(profile.calculateEdgeWidth()) +'mm' #elif profile.getProfileSettingFloat('fill_distance') > 0: # return SUCCESS return SUCCESS, '' except ValueError: #We already have an error by the int/float validator in this case. return SUCCESS, ''
def __init__(self, parent): super(UltimakerCalibrationPage, self).__init__(parent, "Ultimaker Calibration") self.AddText("Your Ultimaker requires some calibration.") self.AddText("This calibration is needed for a proper extrusion amount.") self.AddSeperator() self.AddText("The following values are needed:") self.AddText("* Diameter of filament") self.AddText("* Number of steps per mm of filament extrusion") self.AddSeperator() self.AddText("The better you have calibrated these values, the better your prints\nwill become.") self.AddSeperator() self.AddText("First we need the diameter of your filament:") self.filamentDiameter = self.AddTextCtrl(profile.getProfileSetting('filament_diameter')) self.AddText( "If you do not own digital Calipers that can measure\nat least 2 digits then use 2.89mm.\nWhich is the average diameter of most filament.") self.AddText("Note: This value can be changed later at any time.")
def StoreData(self): if self.Ultimaker2Radio.GetValue(): profile.putMachineSetting('machine_width', '230') profile.putMachineSetting('machine_depth', '225') profile.putMachineSetting('machine_height', '205') profile.putMachineSetting('machine_type', 'ultimaker2') profile.putMachineSetting('machine_center_is_zero', 'False') profile.putMachineSetting('has_heated_bed', 'True') profile.putMachineSetting('gcode_flavor', 'UltiGCode') profile.putProfileSetting('nozzle_size', '0.4') profile.putMachineSetting('extruder_head_size_min_x', '40.0') profile.putMachineSetting('extruder_head_size_min_y', '10.0') profile.putMachineSetting('extruder_head_size_max_x', '60.0') profile.putMachineSetting('extruder_head_size_max_y', '30.0') profile.putMachineSetting('extruder_head_size_height', '60.0') elif self.UltimakerRadio.GetValue(): profile.putMachineSetting('machine_width', '205') profile.putMachineSetting('machine_depth', '205') profile.putMachineSetting('machine_height', '200') profile.putMachineSetting('machine_type', 'ultimaker') profile.putMachineSetting('machine_center_is_zero', 'False') profile.putMachineSetting('gcode_flavor', 'RepRap (Marlin/Sprinter)') profile.putProfileSetting('nozzle_size', '0.4') profile.putMachineSetting('extruder_head_size_min_x', '75.0') profile.putMachineSetting('extruder_head_size_min_y', '18.0') profile.putMachineSetting('extruder_head_size_max_x', '18.0') profile.putMachineSetting('extruder_head_size_max_y', '35.0') profile.putMachineSetting('extruder_head_size_height', '60.0') else: profile.putMachineSetting('machine_width', '80') profile.putMachineSetting('machine_depth', '80') profile.putMachineSetting('machine_height', '60') profile.putMachineSetting('machine_type', 'reprap') profile.putMachineSetting('gcode_flavor', 'RepRap (Marlin/Sprinter)') profile.putPreference('startMode', 'Normal') profile.putProfileSetting('nozzle_size', '0.5') profile.checkAndUpdateMachineName() profile.putProfileSetting('wall_thickness', float(profile.getProfileSetting('nozzle_size')) * 2) if self.SubmitUserStats.GetValue(): profile.putPreference('submit_slice_information', 'True') else: profile.putPreference('submit_slice_information', 'False')
def StoreData(self): if self.UltimakerRadio.GetValue(): profile.putPreference("machine_width", "205") profile.putPreference("machine_depth", "205") profile.putPreference("machine_height", "200") profile.putPreference("machine_type", "ultimaker") profile.putPreference("machine_center_is_zero", "False") profile.putProfileSetting("nozzle_size", "0.4") else: profile.putPreference("machine_width", "80") profile.putPreference("machine_depth", "80") profile.putPreference("machine_height", "60") profile.putPreference("machine_type", "reprap") profile.putPreference("startMode", "Normal") profile.putProfileSetting("nozzle_size", "0.5") profile.putProfileSetting("wall_thickness", float(profile.getProfileSetting("nozzle_size")) * 2) if self.SubmitUserStats.GetValue(): profile.putPreference("submit_slice_information", "True") else: profile.putPreference("submit_slice_information", "False")
def __init__(self, parent, callback = None): super(normalSettingsPanel, self).__init__(parent) #Main tabs self.nb = wx.Notebook(self) self.SetSizer(wx.BoxSizer(wx.HORIZONTAL)) self.GetSizer().Add(self.nb, 1, wx.EXPAND) (left, right) = self.CreateConfigTab(self.nb, 'Print config') #self._addSettingsToPanels('basic', left, right) #self.SizeLabelWidths(left, right) configBase.TitleRow(left, "Quality") c = configBase.SettingRow(left, "Layer height (mm)", 'layer_height', '0.2', 'Layer height in millimeters.\n0.2 is a good value for quick prints.\n0.1 gives high quality prints.') validators.validFloat(c, 0.0001) validators.warningAbove(c, lambda : (float(profile.getProfileSetting('nozzle_size')) * 80.0 / 100.0), "Thicker layers then %.2fmm (80%% nozzle size) usually give bad results and are not recommended.") c = configBase.SettingRow(left, "Wall thickness (mm)", 'wall_thickness', '0.8', 'Thickness of the walls.\nThis is used in combination with the nozzle size to define the number\nof perimeter lines and the thickness of those perimeter lines.') validators.validFloat(c, 0.0001) validators.wallThicknessValidator(c) c = configBase.SettingRow(left, "Enable retraction", 'retraction_enable', False, 'Retract the filament when the nozzle is moving over a none-printed area. Details about the retraction can be configured in the advanced tab.') #(left, right, self.advancedPanel) = self.CreateDynamicConfigTab(self.nb, 'Advanced') #self._addSettingsToPanels('advanced', left, right) #self.SizeLabelWidths(left, right) #Plugin page self.pluginPanel = pluginPanel.pluginPanel(self.nb, callback) self.pluginPanel.GetActivePluginCount() if len(self.pluginPanel.pluginList) > 0: self.nb.AddPage(self.pluginPanel, "Plugins") else: self.pluginPanel.Show(False) #Alteration page self.alterationPanel = alterationPanel.alterationPanel(self.nb, callback) self.nb.AddPage(self.alterationPanel, "Start/End-GCode") self.Bind(wx.EVT_SIZE, self.OnSize) self.nb.SetSize(self.GetSize())
def __init__(self, parent, profileSetting, bitmapFilenameOn, bitmapFilenameOff, helpText='', id=-1, callback=None, size=(20, 20)): self.bitmapOn = wx.Bitmap(getPathForImage(bitmapFilenameOn)) self.bitmapOff = wx.Bitmap(getPathForImage(bitmapFilenameOff)) super(ToggleButton, self).__init__(parent, id, self.bitmapOff, size=size) self.callback = callback self.profileSetting = profileSetting self.helpText = helpText self.SetBezelWidth(1) self.SetUseFocusIndicator(False) if self.profileSetting != '': self.SetValue(profile.getProfileSetting(self.profileSetting) == 'True') self.Bind(wx.EVT_BUTTON, self.OnButtonProfile) else: self.Bind(wx.EVT_BUTTON, self.OnButton) self.Bind(wx.EVT_ENTER_WINDOW, self.OnMouseEnter) self.Bind(wx.EVT_LEAVE_WINDOW, self.OnMouseLeave) parent.AddControl(self)
def getSliceCommand(filename): if profile.getPreference('slicer').startswith('Slic3r') and getSlic3rExe() != False: slic3rExe = getSlic3rExe() if slic3rExe == False: return False cmd = [slic3rExe, '--output-filename-format', '[input_filename_base].gcode', '--nozzle-diameter', str(profile.calculateEdgeWidth()), '--print-center', '%s,%s' % (profile.getPreferenceFloat('machine_width') / 2, profile.getPreferenceFloat('machine_depth') / 2), '--z-offset', '0', '--gcode-flavor', 'reprap', '--gcode-comments', '--filament-diameter', profile.getProfileSetting('filament_diameter'), '--extrusion-multiplier', str(1.0 / float(profile.getProfileSetting('filament_density'))), '--temperature', profile.getProfileSetting('print_temperature'), '--travel-speed', profile.getProfileSetting('travel_speed'), '--perimeter-speed', profile.getProfileSetting('print_speed'), '--small-perimeter-speed', profile.getProfileSetting('print_speed'), '--infill-speed', profile.getProfileSetting('print_speed'), '--solid-infill-speed', profile.getProfileSetting('print_speed'), '--bridge-speed', profile.getProfileSetting('print_speed'), '--bottom-layer-speed-ratio', str(float(profile.getProfileSetting('bottom_layer_speed')) / float(profile.getProfileSetting('print_speed'))), '--layer-height', profile.getProfileSetting('layer_height'), '--first-layer-height-ratio', '1.0', '--infill-every-layers', '1', '--perimeters', str(profile.calculateLineCount()), '--solid-layers', str(profile.calculateSolidLayerCount()), '--fill-density', str(float(profile.getProfileSetting('fill_density'))/100), '--fill-angle', '45', '--fill-pattern', 'rectilinear', #rectilinear line concentric hilbertcurve archimedeanchords octagramspiral '--solid-fill-pattern', 'rectilinear', '--start-gcode', profile.getAlterationFilePath('start.gcode'), '--end-gcode', profile.getAlterationFilePath('end.gcode'), '--retract-length', profile.getProfileSetting('retraction_amount'), '--retract-speed', str(int(float(profile.getProfileSetting('retraction_speed')))), '--retract-restart-extra', profile.getProfileSetting('retraction_extra'), '--retract-before-travel', profile.getProfileSetting('retraction_min_travel'), '--retract-lift', '0', '--slowdown-below-layer-time', profile.getProfileSetting('cool_min_layer_time'), '--min-print-speed', profile.getProfileSetting('cool_min_feedrate'), '--skirts', profile.getProfileSetting('skirt_line_count'), '--skirt-distance', str(int(float(profile.getProfileSetting('skirt_gap')))), '--skirt-height', '1', '--scale', profile.getProfileSetting('model_scale'), '--rotate', profile.getProfileSetting('model_rotate_base'), '--duplicate-x', profile.getProfileSetting('model_multiply_x'), '--duplicate-y', profile.getProfileSetting('model_multiply_y'), '--duplicate-distance', '10'] if profile.getProfileSetting('support') != 'None': cmd.extend(['--support-material']) cmd.extend([filename]) return cmd else: pypyExe = getPyPyExe() if pypyExe == False: pypyExe = sys.executable #In case we have a frozen exe, then argv[0] points to the executable, but we want to give pypy a real script file. if hasattr(sys, 'frozen'): mainScriptFile = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../..", "cura_sf.zip")) else: mainScriptFile = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", os.path.split(sys.argv[0])[1])) cmd = [pypyExe, mainScriptFile, '-p', profile.getGlobalProfileString(), '-s'] if platform.system() == "Windows": try: cmd.append(str(filename)) except UnicodeEncodeError: cmd.append("#UTF8#" + filename.encode("utf-8")) else: cmd.append(filename) return cmd
def __init__(self, parent): super(normalSettingsPanel, self).__init__(parent) #Main tabs nb = wx.Notebook(self) self.SetSizer(wx.BoxSizer(wx.VERTICAL)) self.GetSizer().Add(nb, 1) (left, right) = self.CreateConfigTab(nb, 'Print config') configBase.TitleRow(left, "Quality") c = configBase.SettingRow(left, "Layer height (mm)", 'layer_height', '0.2', 'Layer height in millimeters.\n0.2 is a good value for quick prints.\n0.1 gives high quality prints.') validators.validFloat(c, 0.0001) validators.warningAbove(c, lambda : (float(profile.getProfileSetting('nozzle_size')) * 80.0 / 100.0), "Thicker layers then %.2fmm (80%% nozzle size) usually give bad results and are not recommended.") c = configBase.SettingRow(left, "Wall thickness (mm)", 'wall_thickness', '0.8', 'Thickness of the walls.\nThis is used in combination with the nozzle size to define the number\nof perimeter lines and the thickness of those perimeter lines.') validators.validFloat(c, 0.0001) validators.wallThicknessValidator(c) c = configBase.SettingRow(left, "Enable retraction", 'retraction_enable', False, 'Retract the filament when the nozzle is moving over a none-printed area. Details about the retraction can be configured in the advanced tab.') configBase.TitleRow(left, "Fill") c = configBase.SettingRow(left, "Bottom/Top thickness (mm)", 'solid_layer_thickness', '0.6', 'This controls the thickness of the bottom and top layers, the amount of solid layers put down is calculated by the layer thickness and this value.\nHaving this value a multiply of the layer thickness makes sense. And keep it near your wall thickness to make an evenly strong part.') validators.validFloat(c, 0.0) c = configBase.SettingRow(left, "Fill Density (%)", 'fill_density', '20', 'This controls how densily filled the insides of your print will be. For a solid part use 100%, for an empty part use 0%. A value around 20% is usually enough') validators.validFloat(c, 0.0, 100.0) configBase.TitleRow(right, "Speed && Temperature") c = configBase.SettingRow(right, "Print speed (mm/s)", 'print_speed', '50', 'Speed at which printing happens. A well adjusted Ultimaker can reach 150mm/s, but for good quality prints you want to print slower. Printing speed depends on a lot of factors. So you will be experimenting with optimal settings for this.') validators.validFloat(c, 1.0) validators.warningAbove(c, 150.0, "It is highly unlikely that your machine can achieve a printing speed above 150mm/s") validators.printSpeedValidator(c) #configBase.TitleRow(right, "Temperature") c = configBase.SettingRow(right, "Printing temperature", 'print_temperature', '0', 'Temperature used for printing. Set at 0 to pre-heat yourself') validators.validFloat(c, 0.0, 340.0) validators.warningAbove(c, 260.0, "Temperatures above 260C could damage your machine, be careful!") if profile.getPreference('has_heated_bed') == 'True': c = configBase.SettingRow(right, "Bed temperature", 'print_bed_temperature', '0', 'Temperature used for the heated printer bed. Set at 0 to pre-heat yourself') validators.validFloat(c, 0.0, 340.0) configBase.TitleRow(right, "Support structure") c = configBase.SettingRow(right, "Support type", 'support', ['None', 'Exterior Only', 'Everywhere'], 'Type of support structure build.\n"Exterior only" is the most commonly used support setting.\n\nNone does not do any support.\nExterior only only creates support where the support structure will touch the build platform.\nEverywhere creates support even on the insides of the model.') c = configBase.SettingRow(right, "Add raft", 'enable_raft', False, 'A raft is a few layers of lines below the bottom of the object. It prevents warping. Full raft settings can be found in the expert settings.\nFor PLA this is usually not required. But if you print with ABS it is almost required.') if int(profile.getPreference('extruder_amount')) > 1: c = configBase.SettingRow(right, "Support dual extrusion", 'support_dual_extrusion', False, 'Print the support material with the 2nd extruder in a dual extrusion setup. The primary extruder will be used for normal material, while the second extruder is used to print support material.') configBase.TitleRow(right, "Filament") c = configBase.SettingRow(right, "Diameter (mm)", 'filament_diameter', '2.89', 'Diameter of your filament, as accurately as possible.\nIf you cannot measure this value you will have to callibrate it, a higher number means less extrusion, a smaller number generates more extrusion.') validators.validFloat(c, 1.0) validators.warningAbove(c, 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.") c = configBase.SettingRow(right, "Packing Density", 'filament_density', '1.00', 'Packing density of your filament. This should be 1.00 for PLA and 0.85 for ABS') validators.validFloat(c, 0.5, 1.5) (left, right) = self.CreateConfigTab(nb, 'Advanced config') configBase.TitleRow(left, "Machine size") c = configBase.SettingRow(left, "Nozzle size (mm)", 'nozzle_size', '0.4', 'The nozzle size is very important, this is used to calculate the line width of the infill, and used to calculate the amount of outside wall lines and thickness for the wall thickness you entered in the print settings.') validators.validFloat(c, 0.1, 10.0) configBase.TitleRow(left, "Skirt") c = configBase.SettingRow(left, "Line count", 'skirt_line_count', '1', 'The skirt is a line drawn around the object at the first layer. This helps to prime your extruder, and to see if the object fits on your platform.\nSetting this to 0 will disable the skirt. Multiple skirt lines can help priming your extruder better for small objects.') validators.validInt(c, 0, 10) c = configBase.SettingRow(left, "Start distance (mm)", 'skirt_gap', '6.0', 'The distance between the skirt and the first layer.\nThis is the minimal distance, multiple skirt lines will be put outwards from this distance.') validators.validFloat(c, 0.0) configBase.TitleRow(left, "Retraction") c = configBase.SettingRow(left, "Minimum travel (mm)", 'retraction_min_travel', '5.0', 'Minimum amount of travel needed for a retraction to happen at all. To make sure you do not get a lot of retractions in a small area') validators.validFloat(c, 0.0) c = configBase.SettingRow(left, "Speed (mm/s)", 'retraction_speed', '40.0', 'Speed at which the filament is retracted, a higher retraction speed works better. But a very high retraction speed can lead to filament grinding.') validators.validFloat(c, 0.1) c = configBase.SettingRow(left, "Distance (mm)", 'retraction_amount', '0.0', 'Amount of retraction, set at 0 for no retraction at all. A value of 2.0mm seems to generate good results.') validators.validFloat(c, 0.0) c = configBase.SettingRow(left, "Extra length on start (mm)", 'retraction_extra', '0.0', 'Extra extrusion amount when restarting after a retraction, to better "Prime" your extruder after retraction.') validators.validFloat(c, 0.0) configBase.TitleRow(right, "Speed") c = configBase.SettingRow(right, "Travel speed (mm/s)", 'travel_speed', '150', 'Speed at which travel moves are done, a high quality build Ultimaker can reach speeds of 250mm/s. But some machines might miss steps then.') validators.validFloat(c, 1.0) validators.warningAbove(c, 300.0, "It is highly unlikely that your machine can achieve a travel speed above 300mm/s") c = configBase.SettingRow(right, "Max Z speed (mm/s)", 'max_z_speed', '1.0', 'Speed at which Z moves are done. When you Z axis is properly lubercated you can increase this for less Z blob.') validators.validFloat(c, 0.5) c = configBase.SettingRow(right, "Bottom layer speed (mm/s)", 'bottom_layer_speed', '25', 'Print speed for the bottom layer, you want to print the first layer slower so it sticks better to the printer bed.') validators.validFloat(c, 0.0) configBase.TitleRow(right, "Cool") c = configBase.SettingRow(right, "Minimal layer time (sec)", 'cool_min_layer_time', '10', 'Minimum time spend in a layer, gives the layer time to cool down before the next layer is put on top. If the layer will be placed down too fast the printer will slow down to make sure it has spend atleast this amount of seconds printing this layer.') validators.validFloat(c, 0.0) c = configBase.SettingRow(right, "Enable cooling fan", 'fan_enabled', True, 'Enable the cooling fan during the print. The extra cooling from the cooling fan is essensial during faster prints.') configBase.TitleRow(right, "Quality") c = configBase.SettingRow(right, "Initial layer thickness (mm)", 'bottom_thickness', '0.0', 'Layer thickness of the bottom layer. A thicker bottom layer makes sticking to the bed easier. Set to 0.0 to have the bottom layer thickness the same as the other layers.') validators.validFloat(c, 0.0) validators.warningAbove(c, lambda : (float(profile.getProfileSetting('nozzle_size')) * 3.0 / 4.0), "A bottom layer of more then %.2fmm (3/4 nozzle size) usually give bad results and is not recommended.") c = configBase.SettingRow(right, "Duplicate outlines", 'enable_skin', False, 'Skin prints the outer lines of the prints twice, each time with half the thickness. This gives the illusion of a higher print quality.') #Plugin page self.pluginPanel = pluginPanel.pluginPanel(nb) if len(self.pluginPanel.pluginList) > 0: nb.AddPage(self.pluginPanel, "Plugins") else: self.pluginPanel.Show(False) #Alteration page self.alterationPanel = alterationPanel.alterationPanel(nb) nb.AddPage(self.alterationPanel, "Start/End-GCode")
def raftLayerCount(setting): if profile.getProfileSetting('enable_raft') == "True": return '1' return '0'
def __init__(self, parent, callback): super(simpleModePanel, self).__init__(parent) self._callback = callback self._print_material_options = [] self._print_profile_options = [] self._print_other_options = [] self._print_material_types = {} self._all_print_materials = [] materials = resources.getSimpleModeMaterials() other_print_material_types = [] for material in materials: if material.disabled: continue if len(material.types) == 0: other_print_material_types.append(material) else: for type in material.types: if self._print_material_types.has_key(type): self._print_material_types[type].append(material) else: self._print_material_types[type] = [material] if len(self._print_material_types) == 0: self._print_material_types = None # Create material buttons self.printMaterialPanel = wx.Panel(self) selectedMaterial = None for material in materials: if material.disabled: continue # Show radio buttons if there are no material types if self._print_material_types is None: button = wx.RadioButton( self.printMaterialPanel, -1, material.name.replace('&', '&&'), style=wx.RB_GROUP if len(self._print_material_options) == 0 else 0) button.profile = material button.Bind(wx.EVT_RADIOBUTTON, self._materialSelected) self._print_material_options.append(button) self._all_print_materials.append(material) if profile.getProfileSetting( 'simpleModeMaterial') == material.name: selectedMaterial = material # Decide on the default selected material if selectedMaterial is None: for material in self._all_print_materials: if material.default: selectedMaterial = material break if selectedMaterial is None and len(self._all_print_materials) > 0: selectedMaterial = self._all_print_materials[0] # Decide to show the panel or not if self._print_material_types is None and len( self._print_material_options) < 2: self.printMaterialPanel.Show(len(self._print_material_options) > 1 and \ self._print_material_options[0].always_visible) # Create material types combobox self.printMaterialTypesPanel = wx.Panel(self) selectedMaterialType = None if self._print_material_types is not None: for material_type in self._print_material_types: if profile.getProfileSetting('simpleModeMaterialType') == material_type and \ selectedMaterial in self._print_material_types[material_type]: selectedMaterialType = material_type if selectedMaterialType is None: if profile.getProfileSetting('simpleModeMaterialType') == _( "All"): selectedMaterialType = profile.getProfileSetting( 'simpleModeMaterialType') elif selectedMaterial is None or len( selectedMaterial.types) == 0: selectedMaterialType = _("Others") else: selectedMaterialType = selectedMaterial.types[0] # Decide to show the material types or not if self._print_material_types is None: self.printMaterialTypesPanel.Show(False) self.printTypePanel = wx.Panel(self) sizer = wx.GridBagSizer() self.SetSizer(sizer) boxsizer = wx.BoxSizer(wx.VERTICAL) boxsizer.SetMinSize((80, 20)) if self._print_material_types is None: self.materialTypeCombo = None else: choices = self._print_material_types.keys() choices.sort(key=lambda type: sum( [mat.order for mat in self._print_material_types[type]])) # Now we can add Others, so it appears towards the end if len(other_print_material_types) > 0: self._print_material_types[_( "Others")] = other_print_material_types choices.append(_("Others")) choices.append(_("All")) label = wx.StaticText(self.printMaterialTypesPanel, label=_("Material ease of use:")) self.materialTypeCombo = wx.ComboBox(self.printMaterialTypesPanel, -1, selectedMaterialType, choices=choices, style=wx.CB_READONLY) self.materialTypeCombo.Bind(wx.EVT_COMBOBOX, self._materialTypeSelected) boxsizer.Add(label, flag=wx.EXPAND) boxsizer.Add(self.materialTypeCombo, border=5, flag=wx.BOTTOM | wx.TOP | wx.EXPAND) self.printMaterialTypesPanel.SetSizer(boxsizer) sizer.Add(self.printMaterialTypesPanel, (0, 0), border=10, flag=wx.EXPAND | wx.RIGHT | wx.LEFT | wx.TOP) if self._print_material_types is None: sb = wx.StaticBox(self.printMaterialPanel, label=_("Material:")) boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) boxsizer.SetMinSize((80, 20)) for button in self._print_material_options: # wxpython 2.8 gives a 13 pixel high radio/checkbutton but wxpython 3.0 # gives it a 25 pixels height, so we add a border to compensate for the ugliness if button.GetBestSize()[1] < 20: border = 5 else: border = 0 boxsizer.Add(button, border=border, flag=wx.ALL) self.printMaterialPanel.SetSizer(wx.BoxSizer(wx.VERTICAL)) self.printMaterialPanel.GetSizer().Add(boxsizer, flag=wx.EXPAND) self.materialCombo = None else: #There are some material types boxsizer = wx.BoxSizer(wx.VERTICAL) boxsizer.SetMinSize((80, 20)) label = wx.StaticText(self.printMaterialPanel, label=_("Material:")) self.materialCombo = wx.ComboBox(self.printMaterialPanel, -1, selectedMaterial.name, choices=[], style=wx.CB_READONLY) self.materialCombo.Bind(wx.EVT_COMBOBOX, self._materialSelected) boxsizer.Add(label, flag=wx.EXPAND) boxsizer.Add(self.materialCombo, border=5, flag=wx.BOTTOM | wx.TOP | wx.EXPAND) self.printMaterialPanel.SetSizer(boxsizer) self.materialHyperlink = wx.HyperlinkCtrl( self.printMaterialPanel, -1, label=_('Material Information'), url='', style=wx.HL_ALIGN_LEFT | wx.BORDER_NONE | wx.HL_CONTEXTMENU) self.materialHyperlink.Show(False) self.materialDescription = wx.StaticText(self.printMaterialPanel, -1, '') self.materialDescription.Show(False) boxsizer.Add(self.materialDescription, border=5, flag=wx.BOTTOM | wx.TOP | wx.EXPAND) boxsizer.Add(self.materialHyperlink, border=5, flag=wx.BOTTOM | wx.TOP | wx.EXPAND) sizer.Add(self.printMaterialPanel, (1, 0), border=10, flag=wx.EXPAND | wx.RIGHT | wx.LEFT | wx.TOP) sb = wx.StaticBox(self.printTypePanel, label=_("Select a quickprint profile:")) boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) boxsizer.SetMinSize((180, 20)) self.printTypePanel.SetSizer(wx.BoxSizer(wx.VERTICAL)) self.printTypePanel.GetSizer().Add(boxsizer, flag=wx.EXPAND) sizer.Add(self.printTypePanel, (2, 0), border=10, flag=wx.EXPAND | wx.RIGHT | wx.LEFT | wx.TOP) self.printOptionsBox = wx.StaticBox(self, label=_("Other options:")) boxsizer = wx.StaticBoxSizer(self.printOptionsBox, wx.VERTICAL) boxsizer.SetMinSize((100, 20)) sizer.Add(boxsizer, (3, 0), border=10, flag=wx.EXPAND | wx.RIGHT | wx.LEFT | wx.TOP) self.printOptionsSizer = boxsizer if selectedMaterialType: self.materialTypeCombo.SetValue(selectedMaterialType) self._materialTypeSelected(None) if selectedMaterial: if self.materialCombo: self.materialCombo.SetValue(selectedMaterial.name) else: for button in self._print_material_options: if button.profile == selectedMaterial: button.SetValue(True) break self._materialSelected(None) self.Layout()
def storedSettingInvertBoolean(name): return lambda setting: profile.getProfileSetting(name) == "False"
def ifSettingIs(name, value): return lambda setting: profile.getProfileSetting(name) == value
def getProfileInformation(): #NOTE TO MYSELF# #Skeinforge uses these variables, but has them converted first #In skeinforge, in carve.py, there is- 'Edge Width (mm):' which corresponds to the- 'Edge_Width_mm' below. #So it takes the 'Edge Width (mm):' and removed all spaces and brackets and puts a '_' between each word. return { 'carve': { 'Add_Layer_Template_to_SVG': "true", 'Edge_Width_mm': storedSettingFloat("edge_width_mm"), #'Edge_Width_mm': 2.2*0.2, #'Edge_Width_mm': "0.36", #100 micron 'Extra_Decimal_Places_float': "2.0", 'Import_Coarseness_ratio': "1.0", 'Layer_Height_mm': storedSettingFloat("layer_height"), 'Layers_From_index': "0", 'Layers_To_index': "912345678", 'Correct_Mesh': "True", 'Unproven_Mesh': "False", 'SVG_Viewer': "webbrowser", 'FlipX': storedSetting("flip_x"), 'FlipY': storedSetting("flip_y"), 'FlipZ': storedSetting("flip_z"), 'SwapXZ': storedSetting("swap_xz"), 'SwapYZ': storedSetting("swap_yz"), 'Scale': storedSettingFloat("model_scale"), 'Rotate': storedSettingFloat("model_rotate_base"), 'CenterX': lambda setting: profile.getProfileSettingFloat('object_center_x') if profile.getProfileSettingFloat('object_center_x') > 0 else profile.getPreferenceFloat("machine_width") / 2, 'CenterY': lambda setting: profile.getProfileSettingFloat('object_center_y') if profile.getProfileSettingFloat('object_center_y') > 0 else profile.getPreferenceFloat("machine_depth") / 2, 'AlternativeCenterFile': storedSetting("alternative_center"), },'scale': { 'Activate_Scale': "False", 'XY_Plane_Scale_ratio': "1.01", 'Z_Axis_Scale_ratio': "1", 'SVG_Viewer': "webbrowser", },'bottom': { 'Activate_Bottom': "True", 'Additional_Height_over_Layer_Thickness_ratio': "0.5", 'Altitude_mm': "0.0", 'SVG_Viewer': "webbrowser", },'preface': { 'Meta': DEFSET, 'Set_Positioning_to_Absolute': "True", 'Set_Units_to_Millimeters': "True", 'Start_at_Home': "False", 'Turn_Extruder_Off_at_Shut_Down': "True", 'Turn_Extruder_Off_at_Start_Up': "True", },'widen': { 'Activate_Widen': "False", 'Widen_Width_over_Edge_Width_ratio': "2", },'inset': { 'Add_Custom_Code_for_Temperature_Reading': "False", 'Infill_in_Direction_of_Bridge': profile.getProfileSetting('bridge_direction'), #'Infill_Width': "0.3", #100 micron 'Infill_Width': storedSettingFloat("infill_width"), 'Loop_Order_Choice': DEFSET, 'Overlap_Removal_Width_over_Perimeter_Width_ratio': "0.6", 'Turn_Extruder_Heater_Off_at_Shut_Down': "True", 'Volume_Fraction_ratio': "0.82", },'fill': { 'Activate_Fill': "True", 'Solid_Surface_Top': "False", 'Override_First_Layer_Sequence': storedSetting("force_first_layer_sequence"), 'Diaphragm_Period_layers': "160000", 'Diaphragm_Thickness_layers': "0", 'Extra_Shells_on_Alternating_Solid_Layer_layers': calculateShells, 'Extra_Shells_on_Base_layers': calculateShellsBase, 'Extra_Shells_on_Sparse_Layer_layers': calculateShells, 'Grid_Circle_Separation_over_Perimeter_Width_ratio': "0.2", 'Grid_Extra_Overlap_ratio': "0.1", 'Grid_Junction_Separation_Band_Height_layers': "10", 'Grid_Junction_Separation_over_Octogon_Radius_At_End_ratio': "0.0", 'Grid_Junction_Separation_over_Octogon_Radius_At_Middle_ratio': "0.0", 'Infill_Begin_Rotation_degrees': "0", 'Infill_Begin_Rotation_Repeat_layers': "1", 'Infill_Odd_Layer_Extra_Rotation_degrees': "90.0", 'Grid_Circular': ifSettingIs('infill_type', 'Grid Circular'), 'Grid_Hexagonal': ifSettingIs('infill_type', 'Grid Hexagonal'), 'Grid_Rectangular': ifSettingIs('infill_type', 'Grid Rectangular'), 'Line': ifSettingIs('infill_type', 'Line'), 'Infill_Perimeter_Overlap_ratio': storedPercentSetting('fill_overlap'), 'Infill_Solidity_ratio': storedPercentSetting('fill_density'), 'Infill_Width': "0.4", 'Sharpest_Angle_degrees': "60", 'Solid_Surface_Thickness_layers': calculateSolidLayerCount, 'Bottom_Surface_Thickness_layers': profile.getProfileSetting('bottom_surface_thickness_layers'), 'Top_Surface_Thickness_layers': profile.getProfileSetting('top_surface_thickness_layers'), 'Start_From_Choice': DEFSET, 'Surrounding_Angle_degrees': "60", 'Thread_Sequence_Choice': storedSetting('sequence'), },'multiply': { 'Activate_Multiply': "False", 'Center_X_mm': lambda setting: profile.getProfileSettingFloat('object_center_x') if profile.getProfileSettingFloat('object_center_x') > 0 else profile.getPreferenceFloat("machine_width") / 2, 'Center_Y_mm': lambda setting: profile.getProfileSettingFloat('object_center_y') if profile.getProfileSettingFloat('object_center_y') > 0 else profile.getPreferenceFloat("machine_depth") / 2, 'Number_of_Columns_integer': storedSetting('model_multiply_x'), 'Number_of_Rows_integer': storedSetting('model_multiply_y'), 'Reverse_Sequence_every_Odd_Layer': False, 'Separation_over_Perimeter_Width_ratio': calculateMultiplyDistance, },'speed': { 'Activate_Speed': "True", 'Add_Flow_Rate': "True", #'Bridge_Feed_Rate_Multiplier_ratio': "0.7", #100 micron #'Bridge_Flow_Rate_Multiplier_ratio': "2.0", #100 micron #'Bridge_Feed_Rate_Multiplier_ratio': storedPercentSetting('bridge_speed'), #'Bridge_Flow_Rate_Multiplier_ratio': storedPercentSetting('bridge_speed'), 'Bridge_Feed_Rate_Multiplier_ratio': storedPercentSetting("bridge_feed_ratio"), 'Bridge_Flow_Rate_Multiplier_ratio': storedPercentSetting("bridge_flow_ratio"), 'Duty_Cyle_at_Beginning_portion': "1.0", 'Duty_Cyle_at_Ending_portion': "0.0", 'Feed_Rate_mm/s': storedSettingFloat("print_speed"), 'Flow_Rate_Setting_float': calcFlowRate, #'Flow_Rate_Setting_float': storedSettingFloat("print_speed"), #'Flow_Rate_Setting_float': storedSettingFloat("print_flow"), 'Object_First_Layer_Feed_Rate_Infill_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layer_Feed_Rate_Perimeter_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layer_Feed_Rate_Travel_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layer_Flow_Rate_Infill_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layer_Flow_Rate_Perimeter_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layers_Amount_Of_Layers_For_Speed_Change': DEFSET, 'Orbital_Feed_Rate_over_Operating_Feed_Rate_ratio': "0.5", 'Maximum_Z_Feed_Rate_mm/s': "60.0", 'Perimeter_Feed_Rate_Multiplier_ratio': storedPercentSetting("perimeter_speed_ratio"), #'Perimeter_Flow_Rate_Multiplier_ratio': storedPercentSetting("perimeter_flow_ratio"), 'Perimeter_Flow_Rate_Multiplier_ratio': storedPercentSetting("perimeter_flow_ratio"), 'Travel_Feed_Rate_mm/s': storedSettingFloat("travel_speed"), 'Bottom_layer_flow_rate_ratio': calcBottomLayerFlowRateRatio, 'Top_layer_flow_rate_ratio': storedSettingFloat("top_surface_flow"), },'temperature': { 'Activate_Temperature': "True",#ifSettingAboveZero('print_temperature'), 'Cooling_Rate_Celcius/second': "3.0", 'Heating_Rate_Celcius/second': "10.0", 'Base_Temperature_Celcius': storedSettingFloat("print_temperature"), 'Interface_Temperature_Celcius': storedSettingFloat("print_temperature"), 'Object_First_Layer_Infill_Temperature_Celcius': storedSettingFloat("first_layer_print_temperature"), 'Object_First_Layer_Perimeter_Temperature_Celcius': storedSettingFloat("first_layer_print_temperature"), 'Object_Next_Layers_Temperature_Celcius': storedSettingFloat("print_temperature"), 'Support_Layers_Temperature_Celcius': storedSettingFloat("print_temperature"), 'Supported_Layers_Temperature_Celcius': storedSettingFloat("print_temperature"), },'raft': { 'Activate_Raft': "True", 'Add_Raft,_Elevate_Nozzle,_Orbit': DEFSET, 'Base_Feed_Rate_Multiplier_ratio': "1.0", 'Base_Flow_Rate_Multiplier_ratio': "1.0", 'Base_Infill_Density_ratio': "0.5", 'Base_Layer_Thickness_over_Layer_Thickness': "2.0", 'Base_Layers_integer': raftLayerCount, 'Base_Nozzle_Lift_over_Base_Layer_Thickness_ratio': "0.4", 'Initial_Circling': "False", 'Infill_Overhang_over_Extrusion_Width_ratio': "0.0", 'Interface_Feed_Rate_Multiplier_ratio': "1.0", 'Interface_Flow_Rate_Multiplier_ratio': "1.0", 'Interface_Infill_Density_ratio': storedSettingFloat("support_density"), 'Interface_Layer_Thickness_over_Layer_Thickness': "1.0", 'Interface_Layers_integer': raftLayerCount, 'Interface_Nozzle_Lift_over_Interface_Layer_Thickness_ratio': "0.45", 'Name_of_Support_End_File': DEFSET, 'Name_of_Support_Start_File': DEFSET, 'Operating_Nozzle_Lift_over_Layer_Thickness_ratio': "0.5", 'Raft_Additional_Margin_over_Length_%': "1.0", 'Raft_Margin_mm': "3.0", 'Support_Cross_Hatch': lambda setting: 'True' if profile.getProfileSetting('support_dual_extrusion') == 'True' and int(profile.getPreference('extruder_amount')) > 1 else 'False', 'Support_Flow_Rate_over_Operating_Flow_Rate_ratio': storedSettingFloat("support_extrusion"), 'Support_Gap_over_Perimeter_Extrusion_Width_ratio': "1.2", 'Support_Material_Choice_': storedSetting('support'), 'Support_Minimum_Angle_degrees': storedSettingFloat("support_angle"), 'Support_Margin_mm': '3.0', 'Support_Offset_X_mm': lambda setting: -profile.getPreferenceFloat('extruder_offset_x1') if profile.getProfileSetting('support_dual_extrusion') == 'True' and int(profile.getPreference('extruder_amount')) > 1 else '0', 'Support_Offset_Y_mm': lambda setting: -profile.getPreferenceFloat('extruder_offset_y1') if profile.getProfileSetting('support_dual_extrusion') == 'True' and int(profile.getPreference('extruder_amount')) > 1 else '0', },'skirt': { 'Skirt_line_count': storedSetting("skirt_line_count"), 'Convex': lambda setting: "True" if profile.getProfileSettingFloat('skirt_gap') > 0.0 else "False", 'Gap_Width_mm': storedSetting("skirt_gap"), 'Layers_To_index': "1", },'joris': { 'Activate_Joris': storedSetting("joris"), 'Layers_From_index': calculateSolidLayerCount, },'chamber': { 'Activate_Chamber': "False", 'Bed_Temperature_Celcius': DEFSET, 'Bed_Temperature_Begin_Change_Height_mm': DEFSET, 'Bed_Temperature_End_Change_Height_mm': DEFSET, 'Bed_Temperature_End_Celcius': DEFSET, 'Chamber_Temperature_Celcius': DEFSET, 'Holding_Force_bar': DEFSET, },'tower': { 'Activate_Tower': "False", 'Extruder_Possible_Collision_Cone_Angle_degrees': "60", 'Maximum_Tower_Height_layers': "5", 'Tower_Start_Layer_integer': "1", },'jitter': { 'Activate_Jitter': profile.getProfileSetting('organic_clip'), 'Jitter_Over_Perimeter_Width_ratio': DEFSET, },'clip': { 'Activate_Clip': "False", 'Clip_Over_Perimeter_Width_ratio': storedSettingFloat("clip"), 'Maximum_Connection_Distance_Over_Perimeter_Width_ratio': "10.0", },'smooth': { 'Activate_Smooth': "True", 'Layers_From_index': "1", 'Maximum_Shortening_over_Width_float': "1.2", },'stretch': { 'Activate_Stretch': "False", 'Cross_Limit_Distance_Over_Perimeter_Width_ratio': DEFSET, 'Loop_Stretch_Over_Perimeter_Width_ratio': DEFSET, 'Path_Stretch_Over_Perimeter_Width_ratio': DEFSET, 'Perimeter_Inside_Stretch_Over_Perimeter_Width_ratio': DEFSET, 'Perimeter_Outside_Stretch_Over_Perimeter_Width_ratio': DEFSET, 'Stretch_From_Distance_Over_Perimeter_Width_ratio': DEFSET, },'skin': { 'Activate_Skin': storedSetting("enable_skin"), 'Horizontal_Infill_Divisions_integer': "1", 'Horizontal_Perimeter_Divisions_integer': "1", 'Vertical_Divisions_integer': "2", 'Hop_When_Extruding_Infill': "False", 'Layers_From_index': "1", },'comb': { 'Activate_Comb': "False", 'Running_Jump_Space_mm': "2.0", },'cool': { 'Activate_Cool': "True", 'Bridge_Cool_Celcius': "1.0", 'Cool_Type': DEFSET, 'Maximum_Cool_Celcius': "2.0", 'Minimum_Layer_Time_seconds': storedSettingFloat("cool_min_layer_time"), 'Minimum_Orbital_Radius_millimeters': DEFSET, 'Name_of_Cool_End_File': DEFSET, 'Name_of_Cool_Start_File': DEFSET, 'Orbital_Outset_millimeters': DEFSET, 'Turn_Fan_On_at_Beginning': storedSetting("fan_enabled"), 'Turn_Fan_Off_at_Ending': storedSetting("fan_enabled"), 'Minimum_feed_rate_mm/s': storedSettingFloat("cool_min_feedrate"), 'Fan_on_at_layer': storedSettingInt('fan_layer'), 'Fan_speed_min_%': storedSettingInt('fan_speed'), 'Fan_speed_max_%': storedSettingInt('fan_speed_max'), },'hop': { 'Activate_Hop': storedSetting('hop_on_move'), 'Hop_Over_Layer_Thickness_ratio': lambda setting: 0.2 / profile.getProfileSettingFloat('layer_height'), 'Minimum_Hop_Angle_degrees': DEFSET, },'wipe': { 'Activate_Wipe': "False", 'Arrival_X_mm': DEFSET, 'Arrival_Y_mm': DEFSET, 'Arrival_Z_mm': DEFSET, 'Departure_X_mm': DEFSET, 'Departure_Y_mm': DEFSET, 'Departure_Z_mm': DEFSET, 'Wipe_X_mm': DEFSET, 'Wipe_Y_mm': DEFSET, 'Wipe_Z_mm': DEFSET, 'Wipe_Period_layers': DEFSET, },'oozebane': { 'Activate_Oozebane': "False", 'After_Startup_Distance_millimeters': DEFSET, 'Early_Shutdown_Distance_millimeters': DEFSET, 'Early_Startup_Distance_Constant_millimeters': DEFSET, 'Early_Startup_Maximum_Distance_millimeters': DEFSET, 'First_Early_Startup_Distance_millimeters': DEFSET, 'Minimum_Distance_for_Early_Startup_millimeters': DEFSET, 'Minimum_Distance_for_Early_Shutdown_millimeters': DEFSET, 'Slowdown_Startup_Steps_positive_integer': DEFSET, },'dwindle': { 'Activate_Dwindle': "False", 'End_Rate_Multiplier_ratio': '0.5', 'Pent_Up_Volume_cubic_millimeters': "0.4", 'Slowdown_Steps_positive_integer': '5', 'Slowdown_Volume_cubic_millimeters': "5.0", },'splodge': { 'Activate_Splodge': "False", 'Initial_Lift_over_Extra_Thickness_ratio': DEFSET, 'Initial_Splodge_Feed_Rate_mm/s': DEFSET, 'Operating_Splodge_Feed_Rate_mm/s': DEFSET, 'Operating_Splodge_Quantity_Length_millimeters': DEFSET, 'Initial_Splodge_Quantity_Length_millimeters': DEFSET, 'Operating_Lift_over_Extra_Thickness_ratio': DEFSET, },'home': { 'Activate_Home': "False", 'Name_of_Home_File': DEFSET, },'lash': { 'Activate_Lash': "False", 'X_Backlash_mm': DEFSET, 'Y_Backlash_mm': DEFSET, },'fillet': { 'Activate_Fillet': "False", 'Arc_Point': DEFSET, 'Arc_Radius': DEFSET, 'Arc_Segment': DEFSET, 'Bevel': DEFSET, 'Corner_Feed_Rate_Multiplier_ratio': DEFSET, 'Fillet_Radius_over_Perimeter_Width_ratio': DEFSET, 'Reversal_Slowdown_Distance_over_Perimeter_Width_ratio': DEFSET, 'Use_Intermediate_Feed_Rate_in_Corners': DEFSET, },'limit': { 'Activate_Limit': "True", 'Maximum_Initial_Feed_Rate_mm/s': "100.0", },'unpause': { 'Activate_Unpause': "False", 'Delay_milliseconds': DEFSET, 'Maximum_Speed_ratio': DEFSET, },'dimension': { 'Activate_Dimension': "True", 'Absolute_Extrusion_Distance': "True", 'Relative_Extrusion_Distance': "False", 'Extruder_Retraction_Speed_mm/s': storedSettingFloat('retraction_speed'), 'Filament_Diameter_mm': storedSettingFloat("filament_diameter"), 'Filament_Packing_Density_ratio': storedSettingFloat('filament_density'), 'Maximum_E_Value_before_Reset_float': "91234.0", 'Minimum_Travel_for_Retraction_millimeters': "0.5", 'Retract_Within_Island': storedSettingInvertBoolean("retract_on_jumps_only"), 'Retraction_Distance_millimeters': storedSettingFloat('retraction_amount'), 'Restart_Extra_Distance_millimeters': storedSettingFloat('retraction_extra'), },'alteration': { 'Activate_Alteration': storedSetting('add_start_end_gcode'), 'Name_of_End_File': "end.gcode", 'Name_of_Start_File': "start.gcode", 'Remove_Redundant_Mcode': "True", 'Replace_Variable_with_Setting': DEFSET, },'export': { 'Activate_Export': "True", 'Add_Descriptive_Extension': DEFSET, 'Add_Export_Suffix': "False", 'Add_Profile_Extension': DEFSET, 'Add_Timestamp_Extension': DEFSET, 'Also_Send_Output_To': DEFSET, 'Analyze_Gcode': DEFSET, 'Comment_Choice': DEFSET, 'Do_Not_Change_Output': DEFSET, 'binary_16_byte': DEFSET, 'gcode_step': DEFSET, 'gcode_time_segment': DEFSET, 'gcode_small': DEFSET, 'File_Extension': storedSetting('gcode_extension'), 'Name_of_Replace_File': DEFSET, 'Save_Penultimate_Gcode': "False", } }
def __init__(self, parent, callback): super(simpleModePanel, self).__init__(parent) self._callback = callback #toolsMenu = wx.Menu() #i = toolsMenu.Append(-1, 'Switch to Normal mode...') #self.Bind(wx.EVT_MENU, self.OnNormalSwitch, i) #self.menubar.Insert(1, toolsMenu, 'Normal mode') printTypePanel = wx.Panel(self) self.printTypeHigh = wx.RadioButton(printTypePanel, -1, 'High quality print', style=wx.RB_GROUP) self.printTypeNormal = wx.RadioButton(printTypePanel, -1, 'Normal quality print') self.printTypeLow = wx.RadioButton(printTypePanel, -1, 'Fast low quality print') self.printTypeJoris = wx.RadioButton(printTypePanel, -1, 'Thin walled cup or vase') self.printTypeJoris.Hide() printMaterialPanel = wx.Panel(self) self.printMaterialPLA = wx.RadioButton(printMaterialPanel, -1, 'PLA', style=wx.RB_GROUP) self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, 'ABS') self.printMaterialDiameter = wx.TextCtrl( printMaterialPanel, -1, profile.getProfileSetting('filament_diameter')) self.printSupport = wx.CheckBox(self, -1, 'Print support structure') sizer = wx.GridBagSizer() self.SetSizer(sizer) sb = wx.StaticBox(printTypePanel, label="Select a print type:") boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) boxsizer.Add(self.printTypeHigh) boxsizer.Add(self.printTypeNormal) boxsizer.Add(self.printTypeLow) boxsizer.Add(self.printTypeJoris, border=5, flag=wx.TOP) printTypePanel.SetSizer(wx.BoxSizer(wx.VERTICAL)) printTypePanel.GetSizer().Add(boxsizer, flag=wx.EXPAND) sizer.Add(printTypePanel, (0, 0), flag=wx.EXPAND) sb = wx.StaticBox(printMaterialPanel, label="Material:") boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) boxsizer.Add(self.printMaterialPLA) boxsizer.Add(self.printMaterialABS) boxsizer.Add(wx.StaticText(printMaterialPanel, -1, 'Diameter:')) boxsizer.Add(self.printMaterialDiameter) printMaterialPanel.SetSizer(wx.BoxSizer(wx.VERTICAL)) printMaterialPanel.GetSizer().Add(boxsizer, flag=wx.EXPAND) sizer.Add(printMaterialPanel, (1, 0), flag=wx.EXPAND) sb = wx.StaticBox(self, label="Other:") boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) boxsizer.Add(self.printSupport) sizer.Add(boxsizer, (2, 0), flag=wx.EXPAND) self.printTypeNormal.SetValue(True) self.printMaterialPLA.SetValue(True) self.printTypeHigh.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback()) self.printTypeNormal.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback()) self.printTypeLow.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback()) #self.printTypeJoris.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback()) self.printMaterialPLA.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback()) self.printMaterialABS.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback()) self.printMaterialDiameter.Bind(wx.EVT_TEXT, lambda e: self._callback()) self.printSupport.Bind(wx.EVT_CHECKBOX, lambda e: self._callback())
def storedSetting(name): return lambda setting: profile.getProfileSetting(name)
def _materialSelected(self, e): material = self._getSelectedMaterial() # Delete profile options boxsizer = self.printTypePanel.GetSizer().GetItem(0).GetSizer() boxsizer.Clear(True) self._print_profile_options = [] if material is None: self.printOptionsBox.Show(False) self.printTypePanel.Show(False) return self.printOptionsBox.Show(True) self.printTypePanel.Show(True) self.materialHyperlink.Show(material.url is not None) if material.url: self.materialHyperlink.SetURL(material.url) self.materialDescription.Show(material.description is not None) if material.description: self.materialDescription.SetLabel(material.description) # Add new profiles selectedProfile = None for print_profile in material.profiles: if print_profile.disabled: continue button = wx.RadioButton( self.printTypePanel, -1, print_profile.name.replace('&', '&&'), style=wx.RB_GROUP if len(self._print_profile_options) == 0 else 0) button.profile = print_profile self._print_profile_options.append(button) if profile.getProfileSetting( 'simpleModeProfile') == print_profile.name: selectedProfile = button # Decide on the profile to be selected by default if selectedProfile is None: for button in self._print_profile_options: if button.profile.default: selectedProfile = button break if selectedProfile is None and len(self._print_profile_options) > 0: selectedProfile = self._print_profile_options[0] # Decide if we show the profile panel or not if len(self._print_profile_options) < 2: self.printTypePanel.Show(len(self._print_profile_options) > 0 and \ self._print_profile_options[0].profile.always_visible) if selectedProfile: selectedProfile.SetValue(True) # Add profiles to the UI for button in self._print_profile_options: # wxpython 2.8 gives a 13 pixel high radio/checkbutton but wxpython 3.0 # gives it a 25 pixels height, so we add a border to compensate for the ugliness if button.GetBestSize()[1] < 20: border = 5 else: border = 0 boxsizer.Add(button, border=border, flag=wx.ALL) button.Bind(wx.EVT_RADIOBUTTON, self._update) # Save current selected options selected_options = [] deselected_options = [] for button in self._print_other_options: if button.GetValue(): selected_options.append(button.profile.name) else: deselected_options.append(button.profile.name) # Delete profile options boxsizer = self.printOptionsSizer boxsizer.Clear(True) self._print_other_options = [] # Create new options for option in material.options: if option.disabled: continue button = wx.CheckBox(self, -1, option.name.replace('&', '&&')) button.profile = option self._print_other_options.append(button) # Restore selection on similarly named options if option.name in selected_options or \ ((not option.name in deselected_options) and option.default): button.SetValue(True) # Decide if we show the profile panel or not # The always_visible doesn't make sense for options since they are checkboxes, and not radio buttons self.printOptionsBox.Show(len(self._print_other_options) > 0) # Add profiles to the UI for button in self._print_other_options: # wxpython 2.8 gives a 13 pixel high radio/checkbutton but wxpython 3.0 # gives it a 25 pixels height, so we add a border to compensate for the ugliness if button.GetBestSize()[1] < 20: border = 5 else: border = 0 boxsizer.Add(button, border=border, flag=wx.ALL) button.Bind(wx.EVT_CHECKBOX, self._update) self.printTypePanel.Layout() self.Layout() self.GetParent().Fit() # Do not call the callback on the initial UI build if e is not None: self._update(e)
def calculateWeight(self): #Calculates the weight of the filament in kg radius = float(profile.getProfileSetting('filament_diameter')) / 2 volumeM3 = (self.extrusionAmount * (math.pi * radius * radius)) / (1000*1000*1000) return volumeM3 * profile.getPreferenceFloat('filament_density')
def _engineSettings(self, extruderCount): settings = { 'layerThickness': int(profile.getProfileSettingFloat('layer_height') * 1000), 'initialLayerThickness': int(profile.getProfileSettingFloat('bottom_thickness') * 1000) if profile.getProfileSettingFloat('bottom_thickness') > 0.0 else int( profile.getProfileSettingFloat('layer_height') * 1000), 'filamentDiameter': int(profile.getProfileSettingFloat('filament_diameter') * 1000), 'filamentFlow': int(profile.getProfileSettingFloat('filament_flow')), 'extrusionWidth': int(profile.calculateEdgeWidth() * 1000), 'insetCount': int(profile.calculateLineCount()), 'downSkinCount': int(profile.calculateSolidLayerCount()) if profile.getProfileSetting('solid_bottom') == 'True' else 0, 'upSkinCount': int(profile.calculateSolidLayerCount()) if profile.getProfileSetting('solid_top') == 'True' else 0, 'infillOverlap': int(profile.getProfileSettingFloat('fill_overlap')), 'initialSpeedupLayers': int(4), 'initialLayerSpeed': int(profile.getProfileSettingFloat('bottom_layer_speed')), 'printSpeed': int(profile.getProfileSettingFloat('print_speed')), 'infillSpeed': int(profile.getProfileSettingFloat('infill_speed')) if int(profile.getProfileSettingFloat('infill_speed')) > 0 else int( profile.getProfileSettingFloat('print_speed')), 'moveSpeed': int(profile.getProfileSettingFloat('travel_speed')), 'fanSpeedMin': int(profile.getProfileSettingFloat('fan_speed')) if profile.getProfileSetting('fan_enabled') == 'True' else 0, 'fanSpeedMax': int(profile.getProfileSettingFloat('fan_speed_max')) if profile.getProfileSetting('fan_enabled') == 'True' else 0, 'supportAngle': int(-1) if profile.getProfileSetting('support') == 'None' else int(60), 'supportEverywhere': int(1) if profile.getProfileSetting('support') == 'Everywhere' else int(0), 'supportLineDistance': int(100 * profile.calculateEdgeWidth() * 1000 / profile.getProfileSettingFloat('support_fill_rate')) if profile.getProfileSettingFloat('support_fill_rate') > 0 else -1, 'supportXYDistance': int(1000 * profile.getProfileSettingFloat('support_xy_distance')), 'supportZDistance': int(1000 * profile.getProfileSettingFloat('support_z_distance')), 'supportExtruder': 0 if profile.getProfileSetting('support_dual_extrusion') == 'First extruder' else (1 if profile.getProfileSetting('support_dual_extrusion') == 'Second extruder' and profile.minimalExtruderCount() > 1 else -1), 'retractionAmount': int(profile.getProfileSettingFloat('retraction_amount') * 1000) if profile.getProfileSetting('retraction_enable') == 'True' else 0, 'retractionSpeed': int(profile.getProfileSettingFloat('retraction_speed')), 'retractionMinimalDistance': int( profile.getProfileSettingFloat('retraction_min_travel') * 1000), 'retractionAmountExtruderSwitch': int( profile.getProfileSettingFloat('retraction_dual_amount') * 1000), 'minimalExtrusionBeforeRetraction': int( profile.getProfileSettingFloat('retraction_minimal_extrusion') * 1000), 'enableCombing': 1 if profile.getProfileSetting('retraction_combing') == 'True' else 0, 'multiVolumeOverlap': int(profile.getProfileSettingFloat('overlap_dual') * 1000), 'objectSink': int(profile.getProfileSettingFloat('object_sink') * 1000), 'minimalLayerTime': int(profile.getProfileSettingFloat('cool_min_layer_time')), 'minimalFeedrate': int(profile.getProfileSettingFloat('cool_min_feedrate')), 'coolHeadLift': 1 if profile.getProfileSetting('cool_head_lift') == 'True' else 0, 'startCode': profile.getAlterationFileContents('start.gcode', extruderCount), 'endCode': profile.getAlterationFileContents('end.gcode', extruderCount), 'extruderOffset[1].X': int(profile.getMachineSettingFloat('extruder_offset_x1') * 1000), 'extruderOffset[1].Y': int(profile.getMachineSettingFloat('extruder_offset_y1') * 1000), 'extruderOffset[2].X': int(profile.getMachineSettingFloat('extruder_offset_x2') * 1000), 'extruderOffset[2].Y': int(profile.getMachineSettingFloat('extruder_offset_y2') * 1000), 'extruderOffset[3].X': int(profile.getMachineSettingFloat('extruder_offset_x3') * 1000), 'extruderOffset[3].Y': int(profile.getMachineSettingFloat('extruder_offset_y3') * 1000), 'fixHorrible': 0, } fanFullHeight = int( profile.getProfileSettingFloat('fan_full_height') * 1000) settings['fanFullOnLayerNr'] = (fanFullHeight - settings['initialLayerThickness'] - 1) / settings['layerThickness'] + 1 if settings['fanFullOnLayerNr'] < 0: settings['fanFullOnLayerNr'] = 0 if profile.getProfileSettingFloat('fill_density') == 0: settings['sparseInfillLineDistance'] = -1 elif profile.getProfileSettingFloat('fill_density') == 100: settings['sparseInfillLineDistance'] = settings['extrusionWidth'] #Set the up/down skins height to 10000 if we want a 100% filled object. # This gives better results then normal 100% infill as the sparse and up/down skin have some overlap. settings['downSkinCount'] = 10000 settings['upSkinCount'] = 10000 else: settings['sparseInfillLineDistance'] = int( 100 * profile.calculateEdgeWidth() * 1000 / profile.getProfileSettingFloat('fill_density')) if profile.getProfileSetting('platform_adhesion') == 'Brim': settings['skirtDistance'] = 0 settings['skirtLineCount'] = int( profile.getProfileSettingFloat('brim_line_count')) elif profile.getProfileSetting('platform_adhesion') == 'Raft': settings['skirtDistance'] = 0 settings['skirtLineCount'] = 0 settings['raftMargin'] = int( profile.getProfileSettingFloat('raft_margin') * 1000) settings['raftLineSpacing'] = int( profile.getProfileSettingFloat('raft_line_spacing') * 1000) settings['raftBaseThickness'] = int( profile.getProfileSettingFloat('raft_base_thickness') * 1000) settings['raftBaseLinewidth'] = int( profile.getProfileSettingFloat('raft_base_linewidth') * 1000) settings['raftInterfaceThickness'] = int( profile.getProfileSettingFloat('raft_interface_thickness') * 1000) settings['raftInterfaceLinewidth'] = int( profile.getProfileSettingFloat('raft_interface_linewidth') * 1000) else: settings['skirtDistance'] = int( profile.getProfileSettingFloat('skirt_gap') * 1000) settings['skirtLineCount'] = int( profile.getProfileSettingFloat('skirt_line_count')) settings['skirtMinLength'] = int( profile.getProfileSettingFloat('skirt_minimal_length') * 1000) if profile.getProfileSetting( 'fix_horrible_union_all_type_a') == 'True': settings['fixHorrible'] |= 0x01 if profile.getProfileSetting( 'fix_horrible_union_all_type_b') == 'True': settings['fixHorrible'] |= 0x02 if profile.getProfileSetting('fix_horrible_use_open_bits') == 'True': settings['fixHorrible'] |= 0x10 if profile.getProfileSetting( 'fix_horrible_extensive_stitching') == 'True': settings['fixHorrible'] |= 0x04 if settings['layerThickness'] <= 0: settings['layerThickness'] = 1000 if profile.getMachineSetting('gcode_flavor') == 'UltiGCode': settings['gcodeFlavor'] = 1 if profile.getMachineSetting('gcode_flavor') == 'MakerBot': settings['gcodeFlavor'] = 2 if profile.getMachineSetting('gcode_flavor') == 'Myriwell': settings['gcodeFlavor'] = 3 if profile.getProfileSetting('spiralize') == 'True': settings['spiralizeMode'] = 1 if profile.getProfileSetting('wipe_tower') == 'True': settings['wipeTowerSize'] = int( math.sqrt( profile.getProfileSettingFloat('wipe_tower_volume') * 1000 * 1000 * 1000 / settings['layerThickness'])) if profile.getProfileSetting('ooze_shield') == 'True': settings['enableOozeShield'] = 1 return settings
def getPostProcessPluginConfig(): try: return pickle.loads(str(profile.getProfileSetting('plugin_config'))) except: return []
def getProfileInformation(): return { 'carve': { 'Add_Layer_Template_to_SVG': 'False', 'Edge_Width_mm': calculateEdgeWidth, 'Extra_Decimal_Places_float': DEFSET, 'Import_Coarseness_ratio': DEFSET, 'Layer_Height_mm': storedSettingFloat("layer_height"), 'Layers_From_index': calcLayerSkip, 'Layers_To_index': DEFSET, 'Correct_Mesh': DEFSET, 'Unproven_Mesh': DEFSET, 'SVG_Viewer': DEFSET, 'ObjectMatrix': storedSetting("object_matrix"), 'CenterX': lambda setting: profile.getProfileSettingFloat('object_center_x'), 'CenterY': lambda setting: profile.getProfileSettingFloat('object_center_y'), 'ObjectSink': storedSetting("object_sink"), 'AlternativeCenterFile': storedSetting("alternative_center"), }, 'scale': { 'Activate_Scale': "False", 'XY_Plane_Scale_ratio': DEFSET, 'Z_Axis_Scale_ratio': DEFSET, 'SVG_Viewer': DEFSET, }, 'bottom': { 'Activate_Bottom': DEFSET, 'Additional_Height_over_Layer_Thickness_ratio': DEFSET, 'Altitude_mm': calcExtraBottomThickness, 'SVG_Viewer': DEFSET, }, 'preface': { 'Meta': DEFSET, 'Set_Positioning_to_Absolute': "False", 'Set_Units_to_Millimeters': "False", 'Start_at_Home': DEFSET, 'Turn_Extruder_Off_at_Shut_Down': DEFSET, 'Turn_Extruder_Off_at_Start_Up': DEFSET, }, 'widen': { 'Activate_Widen': DEFSET, 'Widen_Width_over_Edge_Width_ratio': DEFSET, }, 'inset': { 'Add_Custom_Code_for_Temperature_Reading': "False", 'Infill_in_Direction_of_Bridge': ifSettingAboveZero('fill_density'), 'Infill_Width': calculateEdgeWidth, 'Loop_Order_Choice': DEFSET, 'Overlap_Removal_Width_over_Perimeter_Width_ratio': DEFSET, 'Turn_Extruder_Heater_Off_at_Shut_Down': "False", 'Volume_Fraction_ratio': DEFSET, }, 'fill': { 'Activate_Fill': "True", 'Solid_Surface_Top': storedSetting("solid_top"), 'Override_First_Layer_Sequence': storedSetting("force_first_layer_sequence"), 'Diaphragm_Period_layers': DEFSET, 'Diaphragm_Thickness_layers': DEFSET, 'Extra_Shells_on_Alternating_Solid_Layer_layers': calculateShells, 'Extra_Shells_on_Base_layers': calculateShellsBase, 'Extra_Shells_on_Sparse_Layer_layers': calculateShells, 'Grid_Circle_Separation_over_Perimeter_Width_ratio': DEFSET, 'Grid_Extra_Overlap_ratio': DEFSET, 'Grid_Junction_Separation_Band_Height_layers': DEFSET, 'Grid_Junction_Separation_over_Octogon_Radius_At_End_ratio': DEFSET, 'Grid_Junction_Separation_over_Octogon_Radius_At_Middle_ratio': DEFSET, 'Infill_Begin_Rotation_degrees': DEFSET, 'Infill_Begin_Rotation_Repeat_layers': DEFSET, 'Infill_Odd_Layer_Extra_Rotation_degrees': DEFSET, 'Grid_Circular': ifSettingIs('infill_type', 'Grid Circular'), 'Grid_Hexagonal': ifSettingIs('infill_type', 'Grid Hexagonal'), 'Grid_Rectangular': ifSettingIs('infill_type', 'Grid Rectangular'), 'Line': ifSettingIs('infill_type', 'Line'), 'Infill_Perimeter_Overlap_ratio': storedPercentSetting('fill_overlap'), 'Infill_Solidity_ratio': storedPercentSetting('fill_density'), 'Infill_Width': calculateEdgeWidth, 'Sharpest_Angle_degrees': DEFSET, 'Solid_Surface_Thickness_layers': calculateSolidLayerCount, 'Start_From_Choice': DEFSET, 'Surrounding_Angle_degrees': DEFSET, 'Thread_Sequence_Choice': storedSetting('sequence'), }, 'multiply': { 'Activate_Multiply': "False", 'Center_X_mm': DEFSET, 'Center_Y_mm': DEFSET, 'Number_of_Columns_integer': DEFSET, 'Number_of_Rows_integer': DEFSET, 'Reverse_Sequence_every_Odd_Layer': DEFSET, 'Separation_over_Perimeter_Width_ratio': DEFSET, }, 'speed': { 'Activate_Speed': "True", 'Add_Flow_Rate': "True", 'Bridge_Feed_Rate_Multiplier_ratio': storedPercentSetting('bridge_speed'), 'Bridge_Flow_Rate_Multiplier_ratio': storedPercentSetting('bridge_speed'), 'Duty_Cyle_at_Beginning_portion': DEFSET, 'Duty_Cyle_at_Ending_portion': DEFSET, 'Feed_Rate_mm/s': storedSettingFloat("print_speed"), 'Flow_Rate_Setting_float': storedSettingFloat("print_speed"), 'Object_First_Layer_Feed_Rate_Infill_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layer_Feed_Rate_Perimeter_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layer_Feed_Rate_Travel_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layer_Flow_Rate_Infill_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layer_Flow_Rate_Perimeter_Multiplier_ratio': firstLayerSpeedRatio, 'Object_First_Layers_Amount_Of_Layers_For_Speed_Change': DEFSET, 'Orbital_Feed_Rate_over_Operating_Feed_Rate_ratio': DEFSET, 'Maximum_Z_Feed_Rate_mm/s': DEFSET, 'Perimeter_Feed_Rate_Multiplier_ratio': DEFSET, 'Perimeter_Flow_Rate_Multiplier_ratio': DEFSET, 'Travel_Feed_Rate_mm/s': storedSettingFloat("travel_speed"), 'Bottom_layer_flow_rate_ratio': calcBottomLayerFlowRateRatio, }, 'temperature': { 'Activate_Temperature': DEFSET, #ifSettingAboveZero('print_temperature'), 'Cooling_Rate_Celcius/second': DEFSET, 'Heating_Rate_Celcius/second': DEFSET, 'Base_Temperature_Celcius': DEFSET, #storedSettingFloat("print_temperature"), 'Interface_Temperature_Celcius': DEFSET, #storedSettingFloat("print_temperature"), 'Object_First_Layer_Infill_Temperature_Celcius': DEFSET, #storedSettingFloat("print_temperature"), 'Object_First_Layer_Perimeter_Temperature_Celcius': DEFSET, #storedSettingFloat("print_temperature"), 'Object_Next_Layers_Temperature_Celcius': DEFSET, #storedSettingFloat("print_temperature"), 'Support_Layers_Temperature_Celcius': DEFSET, #storedSettingFloat("print_temperature"), 'Supported_Layers_Temperature_Celcius': DEFSET, #storedSettingFloat("print_temperature"), }, 'raft': { 'Activate_Raft': "True", 'Add_Raft,_Elevate_Nozzle,_Orbit': DEFSET, 'Base_Feed_Rate_Multiplier_ratio': DEFSET, 'Base_Flow_Rate_Multiplier_ratio': storedPercentSetting('raft_base_material_amount'), 'Base_Infill_Density_ratio': DEFSET, 'Base_Layer_Thickness_over_Layer_Thickness': DEFSET, 'Base_Layers_integer': raftLayerCount, 'Base_Nozzle_Lift_over_Base_Layer_Thickness_ratio': DEFSET, 'Initial_Circling': DEFSET, 'Infill_Overhang_over_Extrusion_Width_ratio': DEFSET, 'Interface_Feed_Rate_Multiplier_ratio': DEFSET, 'Interface_Flow_Rate_Multiplier_ratio': storedPercentSetting('raft_interface_material_amount'), 'Interface_Infill_Density_ratio': DEFSET, 'Interface_Layer_Thickness_over_Layer_Thickness': DEFSET, 'Interface_Layers_integer': raftLayerCount, 'Interface_Nozzle_Lift_over_Interface_Layer_Thickness_ratio': DEFSET, 'Name_of_Support_End_File': DEFSET, 'Name_of_Support_Start_File': DEFSET, 'Operating_Nozzle_Lift_over_Layer_Thickness_ratio': DEFSET, 'Raft_Additional_Margin_over_Length_%': DEFSET, 'Raft_Margin_mm': storedSettingFloat('raft_margin'), 'Support_Cross_Hatch': lambda setting: 'True' if profile.getProfileSetting('support_dual_extrusion') == 'True' and int(profile.getPreference('extruder_amount')) > 1 else 'False', 'Support_Flow_Rate_over_Operating_Flow_Rate_ratio': storedPercentSetting('support_rate'), 'Support_Gap_over_Perimeter_Extrusion_Width_ratio': calcSupportDistanceRatio, 'Support_Material_Choice_': storedSetting('support'), 'Support_Minimum_Angle_degrees': DEFSET, 'Support_Margin_mm': '3.0', 'Support_Offset_X_mm': lambda setting: -profile.getPreferenceFloat('extruder_offset_x1') if profile.getProfileSetting('support_dual_extrusion') == 'True' and int(profile.getPreference('extruder_amount')) > 1 else '0', 'Support_Offset_Y_mm': lambda setting: -profile.getPreferenceFloat('extruder_offset_y1') if profile.getProfileSetting('support_dual_extrusion') == 'True' and int(profile.getPreference('extruder_amount')) > 1 else '0', }, 'skirt': { 'Skirt_line_count': storedSetting("skirt_line_count"), 'Convex': lambda setting: "True" if profile.getProfileSettingFloat('skirt_gap') > 0.0 else "False", 'Gap_Width_mm': storedSetting("skirt_gap"), 'Layers_To_index': "1", }, 'joris': { 'Activate_Joris': storedSetting("joris"), 'Layers_From_index': calculateSolidLayerCount, }, 'chamber': { 'Activate_Chamber': "False", 'Bed_Temperature_Celcius': DEFSET, 'Bed_Temperature_Begin_Change_Height_mm': DEFSET, 'Bed_Temperature_End_Change_Height_mm': DEFSET, 'Bed_Temperature_End_Celcius': DEFSET, 'Chamber_Temperature_Celcius': DEFSET, 'Holding_Force_bar': DEFSET, }, 'tower': { 'Activate_Tower': "False", 'Extruder_Possible_Collision_Cone_Angle_degrees': DEFSET, 'Maximum_Tower_Height_layers': DEFSET, 'Tower_Start_Layer_integer': DEFSET, }, 'jitter': { 'Activate_Jitter': "False", 'Jitter_Over_Perimeter_Width_ratio': DEFSET, }, 'clip': { 'Activate_Clip': "False", 'Clip_Over_Perimeter_Width_ratio': DEFSET, 'Maximum_Connection_Distance_Over_Perimeter_Width_ratio': DEFSET, }, 'smooth': { 'Activate_Smooth': "False", 'Layers_From_index': DEFSET, 'Maximum_Shortening_over_Width_float': DEFSET, }, 'stretch': { 'Activate_Stretch': "False", 'Cross_Limit_Distance_Over_Perimeter_Width_ratio': DEFSET, 'Loop_Stretch_Over_Perimeter_Width_ratio': DEFSET, 'Path_Stretch_Over_Perimeter_Width_ratio': DEFSET, 'Perimeter_Inside_Stretch_Over_Perimeter_Width_ratio': DEFSET, 'Perimeter_Outside_Stretch_Over_Perimeter_Width_ratio': DEFSET, 'Stretch_From_Distance_Over_Perimeter_Width_ratio': DEFSET, }, 'skin': { 'Activate_Skin': storedSetting("enable_skin"), 'Horizontal_Infill_Divisions_integer': "1", 'Horizontal_Perimeter_Divisions_integer': "1", 'Vertical_Divisions_integer': "2", 'Hop_When_Extruding_Infill': "False", 'Layers_From_index': "1", }, 'comb': { 'Activate_Comb': "True", 'Running_Jump_Space_mm': DEFSET, }, 'cool': { 'Activate_Cool': "True", 'Bridge_Cool_Celcius': DEFSET, 'Cool_Type': DEFSET, 'Maximum_Cool_Celcius': DEFSET, 'Minimum_Layer_Time_seconds': storedSettingFloat("cool_min_layer_time"), 'Minimum_Orbital_Radius_millimeters': DEFSET, 'Name_of_Cool_End_File': DEFSET, 'Name_of_Cool_Start_File': DEFSET, 'Orbital_Outset_millimeters': DEFSET, 'Turn_Fan_On_at_Beginning': storedSetting("fan_enabled"), 'Turn_Fan_Off_at_Ending': storedSetting("fan_enabled"), 'Minimum_feed_rate_mm/s': storedSettingFloat("cool_min_feedrate"), 'Fan_on_at_layer': storedSettingInt('fan_layer'), 'Fan_speed_min_%': storedSettingInt('fan_speed'), 'Fan_speed_max_%': storedSettingInt('fan_speed_max'), }, 'hop': { 'Activate_Hop': storedSetting('hop_on_move'), 'Hop_Over_Layer_Thickness_ratio': lambda setting: 0.2 / profile.getProfileSettingFloat('layer_height' ), 'Minimum_Hop_Angle_degrees': DEFSET, }, 'wipe': { 'Activate_Wipe': "False", 'Arrival_X_mm': DEFSET, 'Arrival_Y_mm': DEFSET, 'Arrival_Z_mm': DEFSET, 'Departure_X_mm': DEFSET, 'Departure_Y_mm': DEFSET, 'Departure_Z_mm': DEFSET, 'Wipe_X_mm': DEFSET, 'Wipe_Y_mm': DEFSET, 'Wipe_Z_mm': DEFSET, 'Wipe_Period_layers': DEFSET, }, 'oozebane': { 'Activate_Oozebane': "False", 'After_Startup_Distance_millimeters': DEFSET, 'Early_Shutdown_Distance_millimeters': DEFSET, 'Early_Startup_Distance_Constant_millimeters': DEFSET, 'Early_Startup_Maximum_Distance_millimeters': DEFSET, 'First_Early_Startup_Distance_millimeters': DEFSET, 'Minimum_Distance_for_Early_Startup_millimeters': DEFSET, 'Minimum_Distance_for_Early_Shutdown_millimeters': DEFSET, 'Slowdown_Startup_Steps_positive_integer': DEFSET, }, 'dwindle': { 'Activate_Dwindle': "False", 'End_Rate_Multiplier_ratio': '0.5', 'Pent_Up_Volume_cubic_millimeters': "0.4", 'Slowdown_Steps_positive_integer': '5', 'Slowdown_Volume_cubic_millimeters': "5.0", }, 'splodge': { 'Activate_Splodge': "False", 'Initial_Lift_over_Extra_Thickness_ratio': DEFSET, 'Initial_Splodge_Feed_Rate_mm/s': DEFSET, 'Operating_Splodge_Feed_Rate_mm/s': DEFSET, 'Operating_Splodge_Quantity_Length_millimeters': DEFSET, 'Initial_Splodge_Quantity_Length_millimeters': DEFSET, 'Operating_Lift_over_Extra_Thickness_ratio': DEFSET, }, 'home': { 'Activate_Home': "False", 'Name_of_Home_File': DEFSET, }, 'lash': { 'Activate_Lash': "False", 'X_Backlash_mm': DEFSET, 'Y_Backlash_mm': DEFSET, }, 'fillet': { 'Activate_Fillet': "False", 'Arc_Point': DEFSET, 'Arc_Radius': DEFSET, 'Arc_Segment': DEFSET, 'Bevel': DEFSET, 'Corner_Feed_Rate_Multiplier_ratio': DEFSET, 'Fillet_Radius_over_Perimeter_Width_ratio': DEFSET, 'Reversal_Slowdown_Distance_over_Perimeter_Width_ratio': DEFSET, 'Use_Intermediate_Feed_Rate_in_Corners': DEFSET, }, 'limit': { 'Activate_Limit': "False", 'Maximum_Initial_Feed_Rate_mm/s': DEFSET, }, 'unpause': { 'Activate_Unpause': "False", 'Delay_milliseconds': DEFSET, 'Maximum_Speed_ratio': DEFSET, }, 'dimension': { 'Activate_Dimension': "True", 'Absolute_Extrusion_Distance': "True", 'Relative_Extrusion_Distance': "False", 'Extruder_Retraction_Speed_mm/s': storedSettingFloat('retraction_speed'), 'Filament_Diameter_mm': storedSettingFloat("filament_diameter"), 'Filament_Packing_Density_ratio': storedSettingFloat("filament_density"), 'Maximum_E_Value_before_Reset_float': DEFSET, 'Minimum_Travel_for_Retraction_millimeters': storedSettingFloat("retraction_min_travel"), 'Retract_Within_Island': storedSettingInvertBoolean("retract_on_jumps_only"), 'Retraction_Distance_millimeters': lambda setting: profile.getProfileSettingFloat('retraction_amount') if profile.getProfileSetting('retraction_enable') == 'True' else 0, 'Restart_Extra_Distance_millimeters': storedSettingFloat('retraction_extra'), }, 'alteration': { 'Activate_Alteration': "False", 'Name_of_End_File': "end.gcode", 'Name_of_Start_File': "start.gcode", 'Remove_Redundant_Mcode': "True", 'Replace_Variable_with_Setting': DEFSET, }, 'export': { 'Activate_Export': "True", 'Add_Descriptive_Extension': DEFSET, 'Add_Export_Suffix': "False", 'Add_Profile_Extension': DEFSET, 'Add_Timestamp_Extension': DEFSET, 'Also_Send_Output_To': DEFSET, 'Analyze_Gcode': DEFSET, 'Comment_Choice': DEFSET, 'Do_Not_Change_Output': DEFSET, 'binary_16_byte': DEFSET, 'gcode_step': DEFSET, 'gcode_time_segment': DEFSET, 'gcode_small': DEFSET, 'File_Extension': storedSetting('gcode_extension'), 'Name_of_Replace_File': DEFSET, 'Save_Penultimate_Gcode': "False", } }