- preferences UI is now started on preferences open
- more work/fixes in working on data structures (offset, offset_value, job_type, shape)
This commit is contained in:
@@ -592,7 +592,7 @@ class ToolIsolation(AppTool, Gerber):
|
||||
# Tool Type
|
||||
tool_type_item = FCComboBox()
|
||||
tool_type_item.addItems(self.tool_type_item_options)
|
||||
idx = tool_type_item.findText(tooluid_value['tool_type'])
|
||||
idx = int(tooluid_value['data']['tools_mill_shape'])
|
||||
tool_type_item.setCurrentIndex(idx)
|
||||
self.ui.tools_table.setCellWidget(row_no, 2, tool_type_item)
|
||||
|
||||
@@ -1318,15 +1318,8 @@ class ToolIsolation(AppTool, Gerber):
|
||||
|
||||
tool_found = 0
|
||||
|
||||
offset = 'Path'
|
||||
offset_val = 0.0
|
||||
tool_type = 'V'
|
||||
# look in database tools
|
||||
for db_tool, db_tool_val in tools_db_dict.items():
|
||||
offset = db_tool_val['offset']
|
||||
offset_val = db_tool_val['offset_value']
|
||||
tool_type = db_tool_val['tool_type']
|
||||
|
||||
db_tooldia = db_tool_val['tooldia']
|
||||
low_limit = float(db_tool_val['data']['tol_min'])
|
||||
high_limit = float(db_tool_val['data']['tol_max'])
|
||||
@@ -1385,9 +1378,6 @@ class ToolIsolation(AppTool, Gerber):
|
||||
self.iso_tools.update({
|
||||
tooluid: {
|
||||
'tooldia': new_tdia,
|
||||
'offset': deepcopy(offset),
|
||||
'offset_value': deepcopy(offset_val),
|
||||
'tool_type': deepcopy(tool_type),
|
||||
'data': deepcopy(new_tools_dict),
|
||||
'solid_geometry': []
|
||||
}
|
||||
@@ -1444,10 +1434,6 @@ class ToolIsolation(AppTool, Gerber):
|
||||
self.iso_tools.update({
|
||||
int(self.tooluid): {
|
||||
'tooldia': truncated_tooldia,
|
||||
'offset': 'Path',
|
||||
'offset_value': 0.0,
|
||||
'type': 'Iso' if self.app.defaults["tools_iso_tool_type"] == 'V' else 'Rough',
|
||||
'tool_type': deepcopy(self.app.defaults["tools_iso_tool_type"]),
|
||||
'data': deepcopy(self.default_data),
|
||||
'solid_geometry': []
|
||||
}
|
||||
@@ -1751,7 +1737,7 @@ class ToolIsolation(AppTool, Gerber):
|
||||
|
||||
tool_dia = tools_storage[tool]['tooldia']
|
||||
for i in range(passes):
|
||||
tool_type = tools_storage[tool]['tool_type']
|
||||
tool_type = tools_storage[tool]['data']['tools_mill_shape']
|
||||
|
||||
iso_offset = tool_dia * ((2 * i + 1) / 2.0000001) - (i * overlap * tool_dia)
|
||||
if negative_dia:
|
||||
@@ -1925,7 +1911,7 @@ class ToolIsolation(AppTool, Gerber):
|
||||
if float('%.*f' % (self.decimals, tools_storage[tool]['tooldia'])) == sorted_tool:
|
||||
|
||||
tool_dia = tools_storage[tool]['tooldia']
|
||||
tool_type = tools_storage[tool]['tool_type']
|
||||
tool_type = tools_storage[tool]['data']['tools_mill_shape']
|
||||
tool_data = tools_storage[tool]['data']
|
||||
|
||||
passes = tool_data['tools_iso_passes']
|
||||
@@ -2098,9 +2084,9 @@ class ToolIsolation(AppTool, Gerber):
|
||||
|
||||
for tool in sorted_tools:
|
||||
tool_dia = tools_storage[tool]['tooldia']
|
||||
tool_has_offset = tools_storage[tool]['offset']
|
||||
tool_offset_value = tools_storage[tool]['offset_value']
|
||||
tool_type = tools_storage[tool]['tool_type']
|
||||
tool_has_offset = tools_storage[tool]['data']['tools_mill_offset_type']
|
||||
tool_offset_value = tools_storage[tool]['data']['tools_mill_offset_value']
|
||||
tool_type = tools_storage[tool]['data']['tools_mill_shape']
|
||||
tool_data = tools_storage[tool]['data']
|
||||
|
||||
work_geo = geometry
|
||||
@@ -2868,9 +2854,6 @@ class ToolIsolation(AppTool, Gerber):
|
||||
self.iso_tools.update({
|
||||
tooluid: {
|
||||
'tooldia': truncated_tooldia,
|
||||
'offset': deepcopy(tool['offset']),
|
||||
'offset_value': deepcopy(tool['offset_value']),
|
||||
'tool_type': deepcopy(tool['tool_type']),
|
||||
'data': deepcopy(tool['data']),
|
||||
'solid_geometry': []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user