- finished work in ToolSolderPaste

This commit is contained in:
Marius Stanciu
2019-02-21 23:48:13 +02:00
committed by Marius S
parent d5768d3b34
commit d453c31bf5
11 changed files with 442 additions and 273 deletions

View File

@@ -4695,6 +4695,9 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
'''
self.exc_cnc_tools = {}
# flag to store if the CNCJob is part of a special group of CNCJob objects that can't be processed by the
# default engine of FlatCAM. They generated by some of tools and are special cases of CNCJob objects.
self. special_group = None
# for now it show if the plot will be done for multi-tool CNCJob (True) or for single tool
# (like the one in the TCL Command), False
@@ -4944,11 +4947,22 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
preamble = str(self.ui.prepend_text.get_value())
postamble = str(self.ui.append_text.get_value())
self.export_gcode(filename, preamble=preamble, postamble=postamble)
gc = self.export_gcode(filename, preamble=preamble, postamble=postamble)
if gc == 'fail':
return
self.app.file_saved.emit("gcode", filename)
self.app.inform.emit("[success] Machine Code file saved to: %s" % filename)
def on_modifygcode_button_click(self, *args):
preamble = str(self.ui.prepend_text.get_value())
postamble = str(self.ui.append_text.get_value())
gc = self.export_gcode(preamble=preamble, postamble=postamble, to_file=True)
if gc == 'fail':
return
else:
self.app.gcode_edited = gc
# add the tab if it was closed
self.app.ui.plot_tab_area.addTab(self.app.ui.cncjob_tab, "Code Editor")
@@ -4959,10 +4973,6 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
# Switch plot_area to CNCJob tab
self.app.ui.plot_tab_area.setCurrentWidget(self.app.ui.cncjob_tab)
preamble = str(self.ui.prepend_text.get_value())
postamble = str(self.ui.append_text.get_value())
self.app.gcode_edited = self.export_gcode(preamble=preamble, postamble=postamble, to_file=True)
# first clear previous text in text editor (if any)
self.app.ui.code_editor.clear()
@@ -5076,6 +5086,14 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
roland = False
hpgl = False
try:
if self.special_group:
self.app.inform.emit("[WARNING_NOTCL]This CNCJob object can't be processed because "
"it is a %s CNCJob object." % str(self.special_group))
return 'fail'
except AttributeError:
pass
# detect if using Roland postprocessor
try:
for key in self.cnc_tools: