- moved all Excellon Advanced Prefeences to Drilling Tool Preferences

- updated Drilling Tool to use the new settings
- updated the Excellon Editor: the default_data dict is populated now on Editor entry
- Excellon Editor: added a new functionality: conversion of slots to drills
- Excellon UI: added a new feature that is grouped in Advanced Settings: a toggle tools table visibility checkbox
This commit is contained in:
Marius Stanciu 2020-07-11 01:42:44 +03:00
parent f53ffe54d9
commit 13bcc036df
10 changed files with 1177 additions and 1066 deletions

View File

@ -7,6 +7,14 @@ CHANGELOG for FlatCAM beta
=================================================
11.07.2020
- moved all Excellon Advanced Prefeences to Drilling Tool Preferences
- updated Drilling Tool to use the new settings
- updated the Excellon Editor: the default_data dict is populated now on Editor entry
- Excellon Editor: added a new functionality: conversion of slots to drills
- Excellon UI: added a new feature that is grouped in Advanced Settings: a toggle tools table visibility checkbox
10.07.2020
- Tool Drilling - moved some of the Excellon Preferences related to drilling operation to it's own group Drilling Tool Options

File diff suppressed because it is too large Load Diff

View File

@ -255,9 +255,7 @@ class GerberObjectUI(ObjectUI):
# Aperture Table Visibility CB
self.aperture_table_visibility_cb = FCCheckBox()
self.aperture_table_visibility_cb.setToolTip(
_("Toggle the display of the Gerber Apertures Table.\n"
"When unchecked, it will delete all mark shapes\n"
"that are drawn on canvas.")
_("Toggle the display of the Tools Table.")
)
# self.aperture_table_visibility_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
hlay_plot.addWidget(self.aperture_table_visibility_cb)
@ -507,7 +505,7 @@ class ExcellonObjectUI(ObjectUI):
grid_h.setColumnStretch(1, 1)
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
self.plot_options_label.setMinimumWidth(90)
# self.plot_options_label.setMinimumWidth(90)
grid_h.addWidget(self.plot_options_label, 0, 0)
@ -516,7 +514,7 @@ class ExcellonObjectUI(ObjectUI):
self.solid_cb.setToolTip(
_("Solid circles.")
)
self.solid_cb.setMinimumWidth(50)
# self.solid_cb.setMinimumWidth(50)
grid_h.addWidget(self.solid_cb, 0, 1)
# Multicolored CB
@ -524,12 +522,11 @@ class ExcellonObjectUI(ObjectUI):
self.multicolored_cb.setToolTip(
_("Draw polygons in different colors.")
)
self.multicolored_cb.setMinimumWidth(55)
# self.multicolored_cb.setMinimumWidth(55)
grid_h.addWidget(self.multicolored_cb, 0, 2)
# ## Object name
self.name_hlay = QtWidgets.QHBoxLayout()
grid_h.addLayout(self.name_hlay, 1, 0, 1, 3)
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
self.name_entry = FCEntry()
@ -537,6 +534,35 @@ class ExcellonObjectUI(ObjectUI):
self.name_hlay.addWidget(name_label)
self.name_hlay.addWidget(self.name_entry)
grid_h.addLayout(self.name_hlay, 1, 0, 1, 3)
# ### Tools Drills ####
self.tools_table_label = QtWidgets.QLabel('<b>%s</b>' % _('Tools Table'))
self.tools_table_label.setToolTip(
_("Tools in this Excellon object\n"
"when are used for drilling.")
)
# Table Visibility CB
self.table_visibility_cb = FCCheckBox()
self.table_visibility_cb.setToolTip(
_("Toggle the display of the Tools Table.")
)
# Plot CB
hlay_plot = QtWidgets.QHBoxLayout()
self.plot_cb = FCCheckBox(_('Plot'))
self.plot_cb.setToolTip(
_("Plot (show) this object.")
)
self.plot_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
hlay_plot.addStretch()
hlay_plot.addWidget(self.plot_cb)
grid_h.addWidget(self.tools_table_label, 2, 0)
grid_h.addWidget(self.table_visibility_cb, 2, 1)
grid_h.addLayout(hlay_plot, 2, 2)
# add a frame and inside add a vertical box layout. Inside this vbox layout I add all the Drills widgets
# this way I can hide/show the frame
self.drills_frame = QtWidgets.QFrame()
@ -546,26 +572,6 @@ class ExcellonObjectUI(ObjectUI):
self.tools_box.setContentsMargins(0, 0, 0, 0)
self.drills_frame.setLayout(self.tools_box)
hlay_plot = QtWidgets.QHBoxLayout()
self.tools_box.addLayout(hlay_plot)
# ### Tools Drills ####
self.tools_table_label = QtWidgets.QLabel('<b>%s:</b>' % _('Tools Table'))
self.tools_table_label.setToolTip(
_("Tools in this Excellon object\n"
"when are used for drilling.")
)
hlay_plot.addWidget(self.tools_table_label)
# Plot CB
self.plot_cb = FCCheckBox(_('Plot'))
self.plot_cb.setToolTip(
_("Plot (show) this object.")
)
self.plot_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
hlay_plot.addStretch()
hlay_plot.addWidget(self.plot_cb)
self.tools_table = FCTable()
self.tools_table.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.tools_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)

View File

@ -198,15 +198,7 @@ class PreferencesUIManager:
"excellon_slot_tooldia": self.ui.excellon_defaults_form.excellon_opt_group.slot_tooldia_entry,
# Excellon Advanced Options
"excellon_offset": self.ui.excellon_defaults_form.excellon_adv_opt_group.offset_entry,
"excellon_toolchangexy": self.ui.excellon_defaults_form.excellon_adv_opt_group.toolchangexy_entry,
"excellon_startz": self.ui.excellon_defaults_form.excellon_adv_opt_group.estartz_entry,
"excellon_feedrate_rapid": self.ui.excellon_defaults_form.excellon_adv_opt_group.feedrate_rapid_entry,
"excellon_z_pdepth": self.ui.excellon_defaults_form.excellon_adv_opt_group.pdepth_entry,
"excellon_feedrate_probe": self.ui.excellon_defaults_form.excellon_adv_opt_group.feedrate_probe_entry,
"excellon_spindledir": self.ui.excellon_defaults_form.excellon_adv_opt_group.spindledir_radio,
"excellon_f_plunge": self.ui.excellon_defaults_form.excellon_adv_opt_group.fplunge_cb,
"excellon_f_retract": self.ui.excellon_defaults_form.excellon_adv_opt_group.fretract_cb,
"excellon_tools_table_display": self.ui.excellon_defaults_form.excellon_adv_opt_group.table_visibility_cb,
# Excellon Export
"excellon_exp_units": self.ui.excellon_defaults_form.excellon_exp_group.excellon_units_radio,
@ -358,9 +350,20 @@ class PreferencesUIManager:
"tools_drill_toolchangez": self.ui.tools_defaults_form.tools_drill_group.toolchangez_entry,
"tools_drill_ppname_e": self.ui.tools_defaults_form.tools_drill_group.pp_excellon_name_cb,
"tools_drill_drill_slots": self.ui.tools_defaults_form.tools_drill_group.drill_slots_cb,
"tools_drill_drill_overlap": self.ui.tools_defaults_form.tools_drill_group.drill_overlap_entry,
"tools_drill_last_drill": self.ui.tools_defaults_form.tools_drill_group.last_drill_cb,
"tools_drill_drill_slots": self.ui.tools_defaults_form.tools_drill_group.drill_slots_cb,
"tools_drill_drill_overlap": self.ui.tools_defaults_form.tools_drill_group.drill_overlap_entry,
"tools_drill_last_drill": self.ui.tools_defaults_form.tools_drill_group.last_drill_cb,
# Advanced Options
"tools_drill_offset": self.ui.tools_defaults_form.tools_drill_group.offset_entry,
"tools_drill_toolchangexy": self.ui.tools_defaults_form.tools_drill_group.toolchangexy_entry,
"tools_drill_startz": self.ui.tools_defaults_form.tools_drill_group.estartz_entry,
"tools_drill_feedrate_rapid": self.ui.tools_defaults_form.tools_drill_group.feedrate_rapid_entry,
"tools_drill_z_pdepth": self.ui.tools_defaults_form.tools_drill_group.pdepth_entry,
"tools_drill_feedrate_probe": self.ui.tools_defaults_form.tools_drill_group.feedrate_probe_entry,
"tools_drill_spindledir": self.ui.tools_defaults_form.tools_drill_group.spindledir_radio,
"tools_drill_f_plunge": self.ui.tools_defaults_form.tools_drill_group.fplunge_cb,
"tools_drill_f_retract": self.ui.tools_defaults_form.tools_drill_group.fretract_cb,
# NCC Tool
"tools_ncctools": self.ui.tools_defaults_form.tools_ncc_group.ncc_tool_dia_entry,

View File

@ -39,117 +39,16 @@ class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.exc_label)
grid1 = QtWidgets.QGridLayout()
self.layout.addLayout(grid1)
grid0 = QtWidgets.QGridLayout()
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.layout.addLayout(grid0)
# Offset Z
offsetlabel = QtWidgets.QLabel('%s:' % _('Offset Z'))
offsetlabel.setToolTip(
_("Some drill bits (the larger ones) need to drill deeper\n"
"to create the desired exit hole diameter due of the tip shape.\n"
"The value here can compensate the Cut Z parameter."))
self.offset_entry = FCDoubleSpinner()
self.offset_entry.set_precision(self.decimals)
self.offset_entry.set_range(-999.9999, 999.9999)
grid1.addWidget(offsetlabel, 0, 0)
grid1.addWidget(self.offset_entry, 0, 1)
# ToolChange X,Y
toolchange_xy_label = QtWidgets.QLabel('%s:' % _('Toolchange X,Y'))
toolchange_xy_label.setToolTip(
_("Toolchange X,Y position.")
# Table Visibility CB
self.table_visibility_cb = FCCheckBox(label=_('Table Show/Hide'))
self.table_visibility_cb.setToolTip(
_("Toggle the display of the Tools Table.")
)
self.toolchangexy_entry = NumericalEvalTupleEntry(border_color='#0069A9')
grid1.addWidget(toolchange_xy_label, 1, 0)
grid1.addWidget(self.toolchangexy_entry, 1, 1)
# Start Z
startzlabel = QtWidgets.QLabel('%s:' % _('Start Z'))
startzlabel.setToolTip(
_("Height of the tool just after start.\n"
"Delete the value if you don't need this feature.")
)
self.estartz_entry = NumericalEvalEntry(border_color='#0069A9')
grid1.addWidget(startzlabel, 2, 0)
grid1.addWidget(self.estartz_entry, 2, 1)
# Feedrate Rapids
fr_rapid_label = QtWidgets.QLabel('%s:' % _('Feedrate Rapids'))
fr_rapid_label.setToolTip(
_("Tool speed while drilling\n"
"(in units per minute).\n"
"This is for the rapid move G00.\n"
"It is useful only for Marlin,\n"
"ignore for any other cases.")
)
self.feedrate_rapid_entry = FCDoubleSpinner()
self.feedrate_rapid_entry.set_precision(self.decimals)
self.feedrate_rapid_entry.set_range(0, 99999.9999)
grid1.addWidget(fr_rapid_label, 3, 0)
grid1.addWidget(self.feedrate_rapid_entry, 3, 1)
# Probe depth
self.pdepth_label = QtWidgets.QLabel('%s:' % _("Probe Z depth"))
self.pdepth_label.setToolTip(
_("The maximum depth that the probe is allowed\n"
"to probe. Negative value, in current units.")
)
self.pdepth_entry = FCDoubleSpinner()
self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-99999.9999, 0.0000)
grid1.addWidget(self.pdepth_label, 4, 0)
grid1.addWidget(self.pdepth_entry, 4, 1)
# Probe feedrate
self.feedrate_probe_label = QtWidgets.QLabel('%s:' % _("Feedrate Probe"))
self.feedrate_probe_label.setToolTip(
_("The feedrate used while the probe is probing.")
)
self.feedrate_probe_entry = FCDoubleSpinner()
self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0, 99999.9999)
grid1.addWidget(self.feedrate_probe_label, 5, 0)
grid1.addWidget(self.feedrate_probe_entry, 5, 1)
# Spindle direction
spindle_dir_label = QtWidgets.QLabel('%s:' % _('Spindle direction'))
spindle_dir_label.setToolTip(
_("This sets the direction that the spindle is rotating.\n"
"It can be either:\n"
"- CW = clockwise or\n"
"- CCW = counter clockwise")
)
self.spindledir_radio = RadioSet([{'label': _('CW'), 'value': 'CW'},
{'label': _('CCW'), 'value': 'CCW'}])
grid1.addWidget(spindle_dir_label, 6, 0)
grid1.addWidget(self.spindledir_radio, 6, 1)
self.fplunge_cb = FCCheckBox('%s' % _('Fast Plunge'))
self.fplunge_cb.setToolTip(
_("By checking this, the vertical move from\n"
"Z_Toolchange to Z_move is done with G0,\n"
"meaning the fastest speed available.\n"
"WARNING: the move is done at Toolchange X,Y coords.")
)
grid1.addWidget(self.fplunge_cb, 7, 0, 1, 2)
self.fretract_cb = FCCheckBox('%s' % _('Fast Retract'))
self.fretract_cb.setToolTip(
_("Exit hole strategy.\n"
" - When uncheked, while exiting the drilled hole the drill bit\n"
"will travel slow, with set feedrate (G1), up to zero depth and then\n"
"travel as fast as possible (G0) to the Z Move (travel height).\n"
" - When checked the travel from Z cut (cut depth) to Z_move\n"
"(travel height) is done as fast as possible (G0) in one move.")
)
grid1.addWidget(self.fretract_cb, 8, 0, 1, 2)
grid0.addWidget(self.table_visibility_cb, 0, 0, 1, 2)
self.layout.addStretch()

View File

@ -51,10 +51,7 @@ class GerberAdvOptPrefGroupUI(OptionsGroupUI):
# Aperture Table Visibility CB
self.aperture_table_visibility_cb = FCCheckBox(label=_('Table Show/Hide'))
self.aperture_table_visibility_cb.setToolTip(
_("Toggle the display of the Gerber Apertures Table.\n"
"Also, on hide, it will delete all mark shapes\n"
"that are drawn on canvas.")
_("Toggle the display of the Tools Table.")
)
grid0.addWidget(self.aperture_table_visibility_cb, 1, 0, 1, 2)

View File

@ -2,7 +2,7 @@ from PyQt5 import QtWidgets
from PyQt5.QtCore import QSettings, Qt
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, FCSpinner, NumericalEvalTupleEntry, \
OptionalInputSection
OptionalInputSection, NumericalEvalEntry
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@ -268,4 +268,125 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
)
grid0.addWidget(self.last_drill_cb, 24, 0, 1, 3)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 26, 0, 1, 3)
self.exc_label = QtWidgets.QLabel('<b>%s:</b>' % _('Advanced Options'))
self.exc_label.setToolTip(
_("A list of advanced parameters.")
)
grid0.addWidget(self.exc_label, 28, 0, 1, 3)
# Offset Z
offsetlabel = QtWidgets.QLabel('%s:' % _('Offset Z'))
offsetlabel.setToolTip(
_("Some drill bits (the larger ones) need to drill deeper\n"
"to create the desired exit hole diameter due of the tip shape.\n"
"The value here can compensate the Cut Z parameter."))
self.offset_entry = FCDoubleSpinner()
self.offset_entry.set_precision(self.decimals)
self.offset_entry.set_range(-999.9999, 999.9999)
grid0.addWidget(offsetlabel, 29, 0)
grid0.addWidget(self.offset_entry, 29, 1, 1, 2)
# ToolChange X,Y
toolchange_xy_label = QtWidgets.QLabel('%s:' % _('Toolchange X,Y'))
toolchange_xy_label.setToolTip(
_("Toolchange X,Y position.")
)
self.toolchangexy_entry = NumericalEvalTupleEntry(border_color='#0069A9')
grid0.addWidget(toolchange_xy_label, 31, 0)
grid0.addWidget(self.toolchangexy_entry, 31, 1, 1, 2)
# Start Z
startzlabel = QtWidgets.QLabel('%s:' % _('Start Z'))
startzlabel.setToolTip(
_("Height of the tool just after start.\n"
"Delete the value if you don't need this feature.")
)
self.estartz_entry = NumericalEvalEntry(border_color='#0069A9')
grid0.addWidget(startzlabel, 33, 0)
grid0.addWidget(self.estartz_entry, 33, 1, 1, 2)
# Feedrate Rapids
fr_rapid_label = QtWidgets.QLabel('%s:' % _('Feedrate Rapids'))
fr_rapid_label.setToolTip(
_("Tool speed while drilling\n"
"(in units per minute).\n"
"This is for the rapid move G00.\n"
"It is useful only for Marlin,\n"
"ignore for any other cases.")
)
self.feedrate_rapid_entry = FCDoubleSpinner()
self.feedrate_rapid_entry.set_precision(self.decimals)
self.feedrate_rapid_entry.set_range(0, 99999.9999)
grid0.addWidget(fr_rapid_label, 35, 0)
grid0.addWidget(self.feedrate_rapid_entry, 35, 1, 1, 2)
# Probe depth
self.pdepth_label = QtWidgets.QLabel('%s:' % _("Probe Z depth"))
self.pdepth_label.setToolTip(
_("The maximum depth that the probe is allowed\n"
"to probe. Negative value, in current units.")
)
self.pdepth_entry = FCDoubleSpinner()
self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-99999.9999, 0.0000)
grid0.addWidget(self.pdepth_label, 37, 0)
grid0.addWidget(self.pdepth_entry, 37, 1, 1, 2)
# Probe feedrate
self.feedrate_probe_label = QtWidgets.QLabel('%s:' % _("Feedrate Probe"))
self.feedrate_probe_label.setToolTip(
_("The feedrate used while the probe is probing.")
)
self.feedrate_probe_entry = FCDoubleSpinner()
self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0, 99999.9999)
grid0.addWidget(self.feedrate_probe_label, 38, 0)
grid0.addWidget(self.feedrate_probe_entry, 38, 1, 1, 2)
# Spindle direction
spindle_dir_label = QtWidgets.QLabel('%s:' % _('Spindle direction'))
spindle_dir_label.setToolTip(
_("This sets the direction that the spindle is rotating.\n"
"It can be either:\n"
"- CW = clockwise or\n"
"- CCW = counter clockwise")
)
self.spindledir_radio = RadioSet([{'label': _('CW'), 'value': 'CW'},
{'label': _('CCW'), 'value': 'CCW'}])
grid0.addWidget(spindle_dir_label, 40, 0)
grid0.addWidget(self.spindledir_radio, 40, 1, 1, 2)
self.fplunge_cb = FCCheckBox('%s' % _('Fast Plunge'))
self.fplunge_cb.setToolTip(
_("By checking this, the vertical move from\n"
"Z_Toolchange to Z_move is done with G0,\n"
"meaning the fastest speed available.\n"
"WARNING: the move is done at Toolchange X,Y coords.")
)
grid0.addWidget(self.fplunge_cb, 42, 0, 1, 3)
self.fretract_cb = FCCheckBox('%s' % _('Fast Retract'))
self.fretract_cb.setToolTip(
_("Exit hole strategy.\n"
" - When uncheked, while exiting the drilled hole the drill bit\n"
"will travel slow, with set feedrate (G1), up to zero depth and then\n"
"travel as fast as possible (G0) to the Z Move (travel height).\n"
" - When checked the travel from Z cut (cut depth) to Z_move\n"
"(travel height) is done as fast as possible (G0) in one move.")
)
grid0.addWidget(self.fretract_cb, 45, 0, 1, 3)
self.layout.addStretch()

View File

@ -241,13 +241,18 @@ class ExcellonObject(FlatCAMObj, Excellon):
self.units = self.app.defaults['units'].upper()
self.form_fields.update({
"plot": self.ui.plot_cb,
"solid": self.ui.solid_cb,
"multicolored": self.ui.multicolored_cb,
# fill in self.options values for the Drilling Tool from self.app.options
for opt_key, opt_val in self.app.options.items():
if opt_key.find('tools_drill_') == 0:
self.options[opt_key] = deepcopy(opt_val)
"tooldia": self.ui.tooldia_entry,
"slot_tooldia": self.ui.slot_tooldia_entry,
self.form_fields.update({
"plot": self.ui.plot_cb,
"solid": self.ui.solid_cb,
"multicolored": self.ui.multicolored_cb,
"tooldia": self.ui.tooldia_entry,
"slot_tooldia": self.ui.slot_tooldia_entry,
})
self.to_form()
@ -258,8 +263,13 @@ class ExcellonObject(FlatCAMObj, Excellon):
self.ui.tools_table.setColumnHidden(4, True)
self.ui.tools_table.setColumnHidden(5, True)
self.ui.table_visibility_cb.set_value(True)
self.ui.table_visibility_cb.hide()
else:
self.ui.level.setText('<span style="color:red;"><b>%s</b></span>' % _('Advanced'))
self.ui.table_visibility_cb.show()
self.ui.table_visibility_cb.set_value(self.app.defaults["excellon_tools_table_display"])
self.on_table_visibility_toggle(state=self.app.defaults["excellon_tools_table_display"])
assert isinstance(self.ui, ExcellonObjectUI), \
"Expected a ExcellonObjectUI, got %s" % type(self.ui)
@ -278,6 +288,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
self.ui.generate_milling_slots_button.clicked.connect(self.on_generate_milling_slots_button_click)
self.ui.tools_table.horizontalHeader().sectionClicked.connect(self.on_toggle_rows)
self.ui.table_visibility_cb.stateChanged.connect(self.on_table_visibility_toggle)
self.units_found = self.app.defaults['units']
@ -526,7 +537,6 @@ class ExcellonObject(FlatCAMObj, Excellon):
# rows selected
self.ui.tools_table.clicked.connect(self.on_row_selection_change)
def ui_disconnect(self):
"""
Will disconnect all signals in the Excellon UI that needs to be disconnected
@ -671,6 +681,9 @@ class ExcellonObject(FlatCAMObj, Excellon):
item[0] = str(item[0])
return table_tools_items
def on_table_visibility_toggle(self, state):
self.ui.tools_table.show() if state else self.ui.tools_table.hide()
def export_excellon(self, whole, fract, e_zeros=None, form='dec', factor=1, slot_type='routing'):
"""
Returns two values, first is a boolean , if 1 then the file has slots and second contain the Excellon code

View File

@ -26,8 +26,6 @@ import appTranslation as fcTranslate
import builtins
import platform
from Common import GracefulException as grace
fcTranslate.apply_language('strings')
if '_' not in builtins.__dict__:
_ = gettext.gettext
@ -303,36 +301,6 @@ class ToolDrilling(AppTool, Excellon):
"format_upper_mm": self.app.defaults["excellon_format_upper_mm"],
"lower_mm": self.app.defaults["excellon_format_lower_mm"],
"zeros": self.app.defaults["excellon_zeros"],
"excellon_units": self.app.defaults["excellon_units"],
"excellon_update": self.app.defaults["excellon_update"],
"excellon_optimization_type": self.app.defaults["excellon_optimization_type"],
"excellon_search_time": self.app.defaults["excellon_search_time"],
"excellon_plot_fill": self.app.defaults["excellon_plot_fill"],
"excellon_plot_line": self.app.defaults["excellon_plot_line"],
# Excellon Options
"tooldia": self.app.defaults["excellon_tooldia"],
"slot_tooldia": self.app.defaults["excellon_slot_tooldia"],
# Excellon Advanced Options
"offset": self.app.defaults["excellon_offset"],
"toolchangexy": self.app.defaults["excellon_toolchangexy"],
"startz": self.app.defaults["excellon_startz"],
"feedrate_rapid": self.app.defaults["excellon_feedrate_rapid"],
"z_pdepth": self.app.defaults["excellon_z_pdepth"],
"feedrate_probe": self.app.defaults["excellon_feedrate_probe"],
"spindledir": self.app.defaults["excellon_spindledir"],
"f_plunge": self.app.defaults["excellon_f_plunge"],
"f_retract": self.app.defaults["excellon_f_retract"],
"excellon_area_exclusion": self.app.defaults["excellon_area_exclusion"],
"excellon_area_shape": self.app.defaults["excellon_area_shape"],
"excellon_area_strategy": self.app.defaults["excellon_area_strategy"],
"excellon_area_overz": self.app.defaults["excellon_area_overz"],
"tools_drill_tool_order": self.app.defaults["tools_drill_tool_order"],
"tools_drill_cutz": self.app.defaults["tools_drill_cutz"],
@ -357,6 +325,21 @@ class ToolDrilling(AppTool, Excellon):
"tools_drill_drill_overlap": self.app.defaults["tools_drill_drill_overlap"],
"tools_drill_last_drill": self.app.defaults["tools_drill_last_drill"],
# Advanced Options
"tools_drill_offset": self.app.defaults["tools_drill_offset"],
"tools_drill_toolchangexy": self.app.defaults["tools_drill_toolchangexy"],
"tools_drill_startz": self.app.defaults["tools_drill_startz"],
"tools_drill_feedrate_rapid": self.app.defaults["tools_drill_feedrate_rapid"],
"tools_drill_z_pdepth": self.app.defaults["tools_drill_z_pdepth"],
"tools_drill_feedrate_probe": self.app.defaults["tools_drill_feedrate_probe"],
"tools_drill_spindledir": self.app.defaults["tools_drill_spindledir"],
"tools_drill_f_plunge": self.app.defaults["tools_drill_f_plunge"],
"tools_drill_f_retract": self.app.defaults["tools_drill_f_retract"],
"tools_drill_area_exclusion": self.app.defaults["tools_drill_area_exclusion"],
"tools_drill_area_shape": self.app.defaults["tools_drill_area_shape"],
"tools_drill_area_strategy": self.app.defaults["tools_drill_area_strategy"],
"tools_drill_area_overz": self.app.defaults["tools_drill_area_overz"],
}
# fill in self.default_data values from self.options
@ -396,22 +379,23 @@ class ToolDrilling(AppTool, Excellon):
self.t_ui.maxdepth_entry.set_value(self.app.defaults["tools_drill_depthperpass"])
self.t_ui.travelz_entry.set_value(self.app.defaults["tools_drill_travelz"])
self.t_ui.feedrate_z_entry.set_value(self.app.defaults["tools_drill_feedrate_z"])
self.t_ui.feedrate_rapid_entry.set_value(self.app.defaults["excellon_feedrate_rapid"])
self.t_ui.feedrate_rapid_entry.set_value(self.app.defaults["tools_drill_feedrate_rapid"])
self.t_ui.spindlespeed_entry.set_value(self.app.defaults["tools_drill_spindlespeed"])
self.t_ui.dwell_cb.set_value(self.app.defaults["tools_drill_dwell"])
self.t_ui.dwelltime_entry.set_value(self.app.defaults["tools_drill_dwelltime"])
self.t_ui.offset_entry.set_value(self.app.defaults["excellon_offset"])
self.t_ui.offset_entry.set_value(self.app.defaults["tools_drill_offset"])
self.t_ui.toolchange_cb.set_value(self.app.defaults["tools_drill_toolchange"])
self.t_ui.toolchangez_entry.set_value(self.app.defaults["tools_drill_toolchangez"])
self.t_ui.estartz_entry.set_value(self.app.defaults["excellon_startz"])
self.t_ui.estartz_entry.set_value(self.app.defaults["tools_drill_startz"])
self.t_ui.endz_entry.set_value(self.app.defaults["tools_drill_endz"])
self.t_ui.endxy_entry.set_value(self.app.defaults["tools_drill_endxy"])
self.t_ui.pdepth_entry.set_value(self.app.defaults["excellon_z_pdepth"])
self.t_ui.feedrate_probe_entry.set_value(self.app.defaults["excellon_feedrate_probe"])
self.t_ui.exclusion_cb.set_value(self.app.defaults["excellon_area_exclusion"])
self.t_ui.strategy_radio.set_value(self.app.defaults["excellon_area_strategy"])
self.t_ui.over_z_entry.set_value(self.app.defaults["excellon_area_overz"])
self.t_ui.area_shape_radio.set_value(self.app.defaults["excellon_area_shape"])
self.t_ui.pdepth_entry.set_value(self.app.defaults["tools_drill_z_pdepth"])
self.t_ui.feedrate_probe_entry.set_value(self.app.defaults["tools_drill_feedrate_probe"])
self.t_ui.exclusion_cb.set_value(self.app.defaults["tools_drill_area_exclusion"])
self.t_ui.strategy_radio.set_value(self.app.defaults["tools_drill_area_shape"])
self.t_ui.over_z_entry.set_value(self.app.defaults["tools_drill_area_strategy"])
self.t_ui.area_shape_radio.set_value(self.app.defaults["tools_drill_area_overz"])
# Drill slots - part of the Advanced Excellon params
self.t_ui.drill_slots_cb.set_value(self.app.defaults["tools_drill_drill_slots"])

View File

@ -258,21 +258,8 @@ class FlatCAMDefaults:
"excellon_tooldia": 0.8,
"excellon_slot_tooldia": 1.8,
# Excellon Advanced Options
"excellon_offset": 0.0,
"excellon_toolchangexy": "0.0, 0.0",
"excellon_startz": None,
"excellon_feedrate_rapid": 1500,
"excellon_z_pdepth": -0.02,
"excellon_feedrate_probe": 75,
"excellon_spindledir": 'CW',
"excellon_f_plunge": False,
"excellon_f_retract": False,
"excellon_area_exclusion": False,
"excellon_area_shape": "polygon",
"excellon_area_strategy": "over",
"excellon_area_overz": 1.0,
# Excellon Advanced options
"excellon_tools_table_display": True,
# Excellon Export
"excellon_exp_units": 'INCH',
@ -432,6 +419,22 @@ class FlatCAMDefaults:
"tools_drill_drill_overlap": 0.0,
"tools_drill_last_drill": True,
# Advanced Options
"tools_drill_offset": 0.0,
"tools_drill_toolchangexy": "0.0, 0.0",
"tools_drill_startz": None,
"tools_drill_feedrate_rapid": 1500,
"tools_drill_z_pdepth": -0.02,
"tools_drill_feedrate_probe": 75,
"tools_drill_spindledir": 'CW',
"tools_drill_f_plunge": False,
"tools_drill_f_retract": False,
"tools_drill_area_exclusion": False,
"tools_drill_area_shape": "polygon",
"tools_drill_area_strategy": "over",
"tools_drill_area_overz": 1.0,
# NCC Tool
"tools_ncctools": "1.0, 0.5",
"tools_nccorder": 'rev',