chiark / gitweb /
Add start/end code support.
authordaid303 <daid303@gmail.com>
Mon, 22 Apr 2013 09:23:04 +0000 (11:23 +0200)
committerdaid303 <daid303@gmail.com>
Mon, 22 Apr 2013 09:23:04 +0000 (11:23 +0200)
Cura/gui/alterationPanel.py
Cura/gui/mainWindow.py
Cura/util/profile.py
Cura/util/sliceEngine.py

index 059bc22c3c69139023c5ba15a37e63de7cc90389..f2b8f8ca0f92251a8ed65c09feaf22a281bbcdf5 100644 (file)
@@ -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)
index 6981b6975eba4cef275e595b2dc70c2b5440e06e..91adfa299040a53b9eefc2102a2c2bc3848e385d 100644 (file)
@@ -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)
 
index 5f50cf589e8bc4ae09d15caa03bd6ae7ff82577c..1fd47f43756e56f4641a85f6bc5c6a79978d3a41 100644 (file)
@@ -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
index 6be78773e4fe13f395e7c13367e094b6eae18084..9671d580a34722dfcf833910aab17eaeca92c022 100644 (file)
@@ -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):