From: daid303 Date: Mon, 22 Apr 2013 09:23:04 +0000 (+0200) Subject: Add start/end code support. X-Git-Tag: 13.05~66 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2f4d3ee67f84b46e5e85f7c5a92d275509649c9f;p=cura.git Add start/end code support. --- diff --git a/Cura/gui/alterationPanel.py b/Cura/gui/alterationPanel.py index 059bc22c..f2b8f8ca 100644 --- a/Cura/gui/alterationPanel.py +++ b/Cura/gui/alterationPanel.py @@ -9,9 +9,9 @@ class alterationPanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent,-1) - self.alterationFileList = ['start.gcode', 'end.gcode', 'nextobject.gcode', 'replace.csv'] - if int(profile.getPreference('extruder_amount')) > 1: - self.alterationFileList.append('switchExtruder.gcode') + self.alterationFileList = ['start.gcode', 'end.gcode']#, 'nextobject.gcode', 'replace.csv' + #if int(profile.getPreference('extruder_amount')) > 1: + # self.alterationFileList.append('switchExtruder.gcode') self.currentFile = None self.textArea = gcodeTextArea.GcodeTextArea(self) diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 6981b697..91adfa29 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -457,10 +457,7 @@ class normalSettingsPanel(configBase.configPanelBase): #Alteration page self.alterationPanel = alterationPanel.alterationPanel(self.nb) - if False: - self.nb.AddPage(self.alterationPanel, "Start/End-GCode") - else: - self.alterationPanel.Show(False) + self.nb.AddPage(self.alterationPanel, "Start/End-GCode") self.Bind(wx.EVT_SIZE, self.OnSize) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 5f50cf58..1fd47f43 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -183,7 +183,7 @@ M107 ;start with the fan off G28 X0 Y0 ;move X/Y to min endstops G28 Z0 ;move Z to min endstops -G1 Z15.0 F{max_z_speed} ;move the platform down 15mm +G1 Z15.0 F{travel_speed} ;move the platform down 15mm G92 E0 ;zero the extruded length G1 F200 E3 ;extrude 3mm of feed stock diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 6be78773..9671d580 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -174,7 +174,9 @@ class Slicer(object): '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 + 'coolHeadLift': 1 if profile.getProfileSetting('cool_head_lift') == 'True' else 0, + 'startCode': profile.getAlterationFileContents('start.gcode'), + 'endCode': profile.getAlterationFileContents('end.gcode'), } def _runSliceProcess(self, cmdList):