- working to update the Paint Tool
This commit is contained in:
parent
70dd9aecae
commit
8a2f5fed05
|
@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
|
|||
|
||||
=================================================
|
||||
|
||||
30.03.2020
|
||||
|
||||
- working to update the Paint Tool
|
||||
|
||||
29.03.2020
|
||||
|
||||
- modified the new database to accept data from NCC and Paint Tools
|
||||
|
|
10
camlib.py
10
camlib.py
|
@ -1470,8 +1470,13 @@ class Geometry(object):
|
|||
line = LineString([(left, y), (right, y)])
|
||||
line = line.intersection(margin_poly)
|
||||
|
||||
try:
|
||||
for ll in line:
|
||||
lines_trimmed.append(ll)
|
||||
if prog_plot:
|
||||
self.plot_temp_shapes(ll)
|
||||
except TypeError:
|
||||
lines_trimmed.append(line)
|
||||
if prog_plot:
|
||||
self.plot_temp_shapes(line)
|
||||
except Exception as e:
|
||||
|
@ -1502,8 +1507,13 @@ class Geometry(object):
|
|||
line = LineString([(x, top), (x, bot)])
|
||||
line = line.intersection(margin_poly)
|
||||
|
||||
try:
|
||||
for ll in line:
|
||||
lines_trimmed.append(ll)
|
||||
if prog_plot:
|
||||
self.plot_temp_shapes(ll)
|
||||
except TypeError:
|
||||
lines_trimmed.append(line)
|
||||
if prog_plot:
|
||||
self.plot_temp_shapes(line)
|
||||
except Exception as e:
|
||||
|
|
|
@ -128,6 +128,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||
self.tools_box.addWidget(self.tools_table)
|
||||
|
||||
self.tools_table.setColumnCount(4)
|
||||
# 3rd column is reserved (and hidden) for the tool ID
|
||||
self.tools_table.setHorizontalHeaderLabels(['#', _('Diameter'), _('TT'), ''])
|
||||
self.tools_table.setColumnHidden(3, True)
|
||||
self.tools_table.setSortingEnabled(False)
|
||||
|
@ -3971,6 +3972,13 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||
return
|
||||
self.app.inform.emit('[success] %s' % _("Tool from DB added in Tool Table."))
|
||||
|
||||
# select last tool added
|
||||
toolid = res
|
||||
for row in range(self.tools_table.rowCount()):
|
||||
if int(self.tools_table.item(row, 3).text()) == toolid:
|
||||
self.tools_table.selectRow(row)
|
||||
self.on_row_selection_change()
|
||||
|
||||
def on_ncc_tool_from_db_inserted(self, tool):
|
||||
"""
|
||||
Called from the Tools DB object through a App method when adding a tool from Tools Database
|
||||
|
@ -4012,9 +4020,9 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||
self.ncc_tools.update({
|
||||
tooluid: {
|
||||
'tooldia': float('%.*f' % (self.decimals, tooldia)),
|
||||
'offset': 'Path',
|
||||
'offset_value': 0.0,
|
||||
'type': 'Iso',
|
||||
'offset': tool['offset'],
|
||||
'offset_value': tool['offset_value'],
|
||||
'type': tool['type'],
|
||||
'tool_type': tool['tool_type'],
|
||||
'data': deepcopy(tool['data']),
|
||||
'solid_geometry': []
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue