|
@@ -969,6 +969,20 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|
|
|
|
|
|
|
p_gcode = ''
|
|
p_gcode = ''
|
|
|
header = ''
|
|
header = ''
|
|
|
|
|
+ time_str = "{:%A, %d %B %Y at %H:%M}".format(datetime.now())
|
|
|
|
|
+
|
|
|
|
|
+ header += '(G-CODE GENERATED BY FLATCAM v%s - www.flatcam.org - Version Date: %s)\n' % \
|
|
|
|
|
+ (str(self.app.version), str(self.app.version_date)) + '\n'
|
|
|
|
|
+
|
|
|
|
|
+ header += '(This is a autolevelling probing GCode.)\n' \
|
|
|
|
|
+ '(Make sure that before you start the job you first do a zero for all axis.)\n' \
|
|
|
|
|
+ '(This means that you need to zero the CNC axis and then jog to the toolchange X, Y location,)\n\n'
|
|
|
|
|
+
|
|
|
|
|
+ header += '(Name: ' + str(self.options['name']) + ')\n'
|
|
|
|
|
+ header += '(Type: ' + "Autolevelling Probing GCode " + ')\n'
|
|
|
|
|
+
|
|
|
|
|
+ header += '(Units: ' + self.units.upper() + ')\n'
|
|
|
|
|
+ header += '(Created on ' + time_str + ')\n\n'
|
|
|
|
|
|
|
|
# commands
|
|
# commands
|
|
|
if controller == 'MACH3':
|
|
if controller == 'MACH3':
|
|
@@ -1211,7 +1225,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|
|
self.gcode_editor_tab = AppTextEditor(app=self.app, plain_text=True)
|
|
self.gcode_editor_tab = AppTextEditor(app=self.app, plain_text=True)
|
|
|
|
|
|
|
|
# add the tab if it was closed
|
|
# add the tab if it was closed
|
|
|
- self.app.ui.plot_tab_area.addTab(self.gcode_editor_tab, '%s' % _("Code Editor"))
|
|
|
|
|
|
|
+ self.app.ui.plot_tab_area.addTab(self.gcode_editor_tab, '%s' % _("Code Review"))
|
|
|
self.gcode_editor_tab.setObjectName('code_editor_tab')
|
|
self.gcode_editor_tab.setObjectName('code_editor_tab')
|
|
|
|
|
|
|
|
# delete the absolute and relative position and messages in the infobar
|
|
# delete the absolute and relative position and messages in the infobar
|
|
@@ -1237,6 +1251,11 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|
|
|
|
|
|
|
self.gcode_editor_tab.buttonSave.hide()
|
|
self.gcode_editor_tab.buttonSave.hide()
|
|
|
self.gcode_editor_tab.buttonOpen.hide()
|
|
self.gcode_editor_tab.buttonOpen.hide()
|
|
|
|
|
+ self.gcode_editor_tab.buttonPrint.hide()
|
|
|
|
|
+ self.gcode_editor_tab.buttonPreview.hide()
|
|
|
|
|
+ self.gcode_editor_tab.buttonReplace.hide()
|
|
|
|
|
+ self.gcode_editor_tab.sel_all_cb.hide()
|
|
|
|
|
+ self.gcode_editor_tab.entryReplace.hide()
|
|
|
self.gcode_editor_tab.code_editor.setReadOnly(True)
|
|
self.gcode_editor_tab.code_editor.setReadOnly(True)
|
|
|
|
|
|
|
|
self.app.inform.emit('[success] %s...' % _('Loaded Machine Code into Code Editor'))
|
|
self.app.inform.emit('[success] %s...' % _('Loaded Machine Code into Code Editor'))
|