- In Excellon Object UI fixed the enable/disable for the Milling section according to the Tools Table row that is selected
- In Excellon Object UI fixed the miiling geometry generation - updated th translations strings to the changes in the source code
This commit is contained in:
parent
738cda0de5
commit
35328c2a81
|
@ -11,6 +11,9 @@ CHANGELOG for FlatCAM beta
|
|||
|
||||
- in Geometry Object fixed the issue with not using the End X-Y value and also made some other updates here
|
||||
- in NCC and Paint Tool fixed some issues with missing keys in the tool data dictionary
|
||||
- In Excellon Object UI fixed the enable/disable for the Milling section according to the Tools Table row that is selected
|
||||
- In Excellon Object UI fixed the miiling geometry generation
|
||||
- updated th translations strings to the changes in the source code
|
||||
|
||||
20.10.2020
|
||||
|
||||
|
|
|
@ -701,7 +701,7 @@ class ExcellonObjectUI(ObjectUI):
|
|||
self.milling_button = QtWidgets.QPushButton(_('Milling Tool'))
|
||||
self.milling_button.setIcon(QtGui.QIcon(self.app.resource_location + '/milling_tool32.png'))
|
||||
self.milling_button.setToolTip(
|
||||
_("Generate GCode out of slot holes in an Excellon object.")
|
||||
_("Generate a Geometry for milling drills or slots in an Excellon object.")
|
||||
)
|
||||
self.milling_button.setStyleSheet("""
|
||||
QPushButton
|
||||
|
@ -710,6 +710,8 @@ class ExcellonObjectUI(ObjectUI):
|
|||
}
|
||||
""")
|
||||
grid2.addWidget(self.milling_button, 6, 0, 1, 2)
|
||||
# TODO until the Milling Tool is finished this stays disabled
|
||||
self.milling_button.setDisabled(True)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
|
|
|
@ -442,6 +442,9 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
|||
self.ui.slot_tooldia_entry.setDisabled(False)
|
||||
self.ui.generate_milling_slots_button.setDisabled(False)
|
||||
|
||||
# update the milling section
|
||||
self.on_row_selection_change()
|
||||
|
||||
self.ui_connect()
|
||||
|
||||
def ui_connect(self):
|
||||
|
@ -514,12 +517,22 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
|||
self.ui.slot_tooldia_entry.setDisabled(False)
|
||||
self.ui.generate_milling_slots_button.setDisabled(False)
|
||||
|
||||
# find if we have drills:
|
||||
has_drills = None
|
||||
for tt in self.tools:
|
||||
if 'drills' in self.tools[tt] and self.tools[tt]['drills']:
|
||||
has_drills = True
|
||||
break
|
||||
has_drills = True
|
||||
has_slots = True
|
||||
for row in sel_rows:
|
||||
row_dia = self.app.dec_format(float(self.ui.tools_table.item(row, 1).text()), self.decimals)
|
||||
|
||||
for tt in self.tools:
|
||||
tool_dia = self.app.dec_format(float(self.tools[tt]['tooldia']), self.decimals)
|
||||
if tool_dia == row_dia:
|
||||
# find if we have drills:
|
||||
if 'drills' not in self.tools[tt] or not self.tools[tt]['drills']:
|
||||
has_drills = None
|
||||
|
||||
# find if we have slots
|
||||
if 'slots' not in self.tools[tt] or not self.tools[tt]['slots']:
|
||||
has_slots = None
|
||||
|
||||
if has_drills is None:
|
||||
self.ui.tooldia_entry.setDisabled(True)
|
||||
self.ui.generate_milling_button.setDisabled(True)
|
||||
|
@ -527,12 +540,6 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
|||
self.ui.tooldia_entry.setDisabled(False)
|
||||
self.ui.generate_milling_button.setDisabled(False)
|
||||
|
||||
# find if we have slots
|
||||
has_slots = None
|
||||
for tt in self.tools:
|
||||
if 'slots' in self.tools[tt] and self.tools[tt]['slots']:
|
||||
has_slots = True
|
||||
break
|
||||
if has_slots is None:
|
||||
self.ui.slot_tooldia_entry.setDisabled(True)
|
||||
self.ui.generate_milling_slots_button.setDisabled(True)
|
||||
|
@ -895,7 +902,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
|||
geo_obj.options['Tools_in_use'] = tool_table_items
|
||||
geo_obj.options['type'] = 'Excellon Geometry'
|
||||
geo_obj.options["cnctooldia"] = str(tooldia)
|
||||
geo_obj.options["multidepth"] = self.options["multidepth"]
|
||||
geo_obj.options["multidepth"] = self.app.defaults["geometry_multidepth"]
|
||||
geo_obj.solid_geometry = []
|
||||
|
||||
# in case that the tool used has the same diameter with the hole, and since the maximum resolution
|
||||
|
@ -995,7 +1002,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
|||
geo_obj.options['Tools_in_use'] = tool_table_items
|
||||
geo_obj.options['type'] = 'Excellon Geometry'
|
||||
geo_obj.options["cnctooldia"] = str(tooldia)
|
||||
geo_obj.options["multidepth"] = self.options["multidepth"]
|
||||
geo_obj.options["multidepth"] = self.app.defaults["geometry_multidepth"]
|
||||
geo_obj.solid_geometry = []
|
||||
|
||||
# in case that the tool used has the same diameter with the hole, and since the maximum resolution
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue