Report total time spend slicing after project planner slice

This commit is contained in:
daid 2012-04-25 15:49:43 +02:00
parent 3770dea42c
commit bfaebcce3e
2 changed files with 5 additions and 1 deletions

View File

@ -610,6 +610,7 @@ class ProjectSliceProgressWindow(wx.Frame):
self.prevStep = 'start'
self.totalDoneFactor = 0.0
self.startTime = time.time()
self.sliceStartTime = time.time()
#How long does each step take compared to the others. This is used to make a better scaled progress bar, and guess time left.
# TODO: Duplicate with sliceProgressPanel, move to sliceRun.
@ -724,12 +725,15 @@ class ProjectSliceProgressWindow(wx.Frame):
os.remove(action.filename[: action.filename.rfind('.')] + "_export.project_tmp")
wx.CallAfter(self.progressGauge.SetValue, 10000)
self.totalDoneFactor = 0.0
wx.CallAfter(self.progressGauge2.SetValue, self.actionList.index(action) + 1)
resultFile.write(';TYPE:CUSTOM\n')
resultFile.write(profile.getAlterationFileContents('end.gcode'))
resultFile.close()
self.abort = True
sliceTime = time.time() - self.sliceStartTime
wx.CallAfter(self.statusText.SetLabel, 'Slicing took: %d:%d' % (sliceTime / 60, sliceTime % 60))
wx.CallAfter(self.abortButton.SetLabel, 'Close')
def main():

View File

@ -63,7 +63,7 @@ class sliceProgessPanel(wx.Panel):
print filename, self.filelist.index(filename)
if self.filelist.index(filename) > 0:
profile.putProfileSetting('fan_enabled', 'False')
profile.putProfileSetting('skirt_lines', '0')
profile.putProfileSetting('skirt_line_count', '0')
if len(self.filelist) > 1:
profile.putProfileSetting('add_start_end_gcode', 'False')
profile.putProfileSetting('gcode_extension', 'multi_extrude_tmp')