- added the Preferences for Check Rules Tool and for Optimal Tool and also updated the Film Tool to use the default settings in Preferences

This commit is contained in:
Marius Stanciu 2019-10-14 02:19:48 +03:00 committed by Marius
parent b00c1018e4
commit 86d5d93495
6 changed files with 468 additions and 93 deletions

View File

@ -128,7 +128,7 @@ class App(QtCore.QObject):
# ################## Version and VERSION DATE ############################## # ################## Version and VERSION DATE ##############################
# ########################################################################## # ##########################################################################
version = 8.98 version = 8.98
version_date = "2019/10/13" version_date = "2019/10/16"
beta = True beta = True
engine = '3D' engine = '3D'
@ -753,8 +753,17 @@ class App(QtCore.QObject):
# Film Tool # Film Tool
"tools_film_type": self.ui.tools_defaults_form.tools_film_group.film_type_radio, "tools_film_type": self.ui.tools_defaults_form.tools_film_group.film_type_radio,
"tools_film_boundary": self.ui.tools_defaults_form.tools_film_group.film_boundary_entry, "tools_film_boundary": self.ui.tools_defaults_form.tools_film_group.film_boundary_entry,
"tools_film_scale": self.ui.tools_defaults_form.tools_film_group.film_scale_entry, "tools_film_scale_stroke": self.ui.tools_defaults_form.tools_film_group.film_scale_stroke_entry,
"tools_film_color": self.ui.tools_defaults_form.tools_film_group.film_color_entry, "tools_film_color": self.ui.tools_defaults_form.tools_film_group.film_color_entry,
"tools_film_scale_cb": self.ui.tools_defaults_form.tools_film_group.film_scale_cb,
"tools_film_scale_x_entry": self.ui.tools_defaults_form.tools_film_group.film_scalex_entry,
"tools_film_scale_y_entry": self.ui.tools_defaults_form.tools_film_group.film_scaley_entry,
"tools_film_skew_cb": self.ui.tools_defaults_form.tools_film_group.film_skew_cb,
"tools_film_skew_x_entry": self.ui.tools_defaults_form.tools_film_group.film_skewx_entry,
"tools_film_skew_y_entry": self.ui.tools_defaults_form.tools_film_group.film_skewy_entry,
"tools_film_skew_ref_radio": self.ui.tools_defaults_form.tools_film_group.film_skew_reference,
"tools_film_mirror_cb": self.ui.tools_defaults_form.tools_film_group.film_mirror_cb,
"tools_film_mirror_axis_radio": self.ui.tools_defaults_form.tools_film_group.film_mirror_axis,
# Panelize Tool # Panelize Tool
"tools_panelize_spacing_columns": self.ui.tools_defaults_form.tools_panelize_group.pspacing_columns, "tools_panelize_spacing_columns": self.ui.tools_defaults_form.tools_panelize_group.pspacing_columns,
@ -807,6 +816,35 @@ class App(QtCore.QObject):
"tools_solderpaste_pp": self.ui.tools_defaults_form.tools_solderpaste_group.pp_combo, "tools_solderpaste_pp": self.ui.tools_defaults_form.tools_solderpaste_group.pp_combo,
"tools_sub_close_paths": self.ui.tools_defaults_form.tools_sub_group.close_paths_cb, "tools_sub_close_paths": self.ui.tools_defaults_form.tools_sub_group.close_paths_cb,
# ###################################################################################
# ################################ TOOLS 2 ##########################################
# ###################################################################################
# Optimal Tool
"tools_opt_precision": self.ui.tools2_defaults_form.tools2_optimal_group.precision_sp,
# Check Rules Tool
"tools_cr_trace_size": self.ui.tools2_defaults_form.tools2_checkrules_group.trace_size_cb,
"tools_cr_trace_size_val": self.ui.tools2_defaults_form.tools2_checkrules_group.trace_size_entry,
"tools_cr_c2c": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_copper2copper_cb,
"tools_cr_c2c_val": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_copper2copper_entry,
"tools_cr_c2o": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_copper2ol_cb,
"tools_cr_c2o_val": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_copper2ol_entry,
"tools_cr_s2s": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_silk2silk_cb,
"tools_cr_s2s_val": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_silk2silk_entry,
"tools_cr_s2sm": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_silk2sm_cb,
"tools_cr_s2sm_val": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_silk2sm_entry,
"tools_cr_s2o": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_silk2ol_cb,
"tools_cr_s2o_val": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_silk2ol_entry,
"tools_cr_sm2sm": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_sm2sm_cb,
"tools_cr_sm2sm_val": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_sm2sm_entry,
"tools_cr_ri": self.ui.tools2_defaults_form.tools2_checkrules_group.ring_integrity_cb,
"tools_cr_ri_val": self.ui.tools2_defaults_form.tools2_checkrules_group.ring_integrity_entry,
"tools_cr_h2h": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_d2d_cb,
"tools_cr_h2h_val": self.ui.tools2_defaults_form.tools2_checkrules_group.clearance_d2d_entry,
"tools_cr_dh": self.ui.tools2_defaults_form.tools2_checkrules_group.drill_size_cb,
"tools_cr_dh_val": self.ui.tools2_defaults_form.tools2_checkrules_group.drill_size_entry,
# Utilities # Utilities
# File associations # File associations
"fa_excellon": self.ui.util_defaults_form.fa_excellon_group.exc_list_text, "fa_excellon": self.ui.util_defaults_form.fa_excellon_group.exc_list_text,
@ -1172,8 +1210,17 @@ class App(QtCore.QObject):
# Film Tool # Film Tool
"tools_film_type": 'neg', "tools_film_type": 'neg',
"tools_film_boundary": 0.0393701, "tools_film_boundary": 0.0393701,
"tools_film_scale": 0, "tools_film_scale_stroke": 0,
"tools_film_color": '#000000', "tools_film_color": '#000000',
"tools_film_scale_cb": False,
"tools_film_scale_x_entry": 1.0,
"tools_film_scale_y_entry": 1.0,
"tools_film_skew_cb": False,
"tools_film_skew_x_entry": 0.0,
"tools_film_skew_y_entry": 0.0,
"tools_film_skew_ref_radio": 'bottomleft',
"tools_film_mirror_cb": False,
"tools_film_mirror_axis_radio": 'none',
# Panel Tool # Panel Tool
"tools_panelize_spacing_columns": 0, "tools_panelize_spacing_columns": 0,
@ -1228,6 +1275,35 @@ class App(QtCore.QObject):
# Subtract Tool # Subtract Tool
"tools_sub_close_paths": True, "tools_sub_close_paths": True,
# ###################################################################################
# ################################ TOOLS 2 ##########################################
# ###################################################################################
# Optimal Tool
"tools_opt_precision": 4,
# Check Rules Tool
"tools_cr_trace_size": True,
"tools_cr_trace_size_val": 0.01,
"tools_cr_c2c": True,
"tools_cr_c2c_val": 0.01,
"tools_cr_c2o": True,
"tools_cr_c2o_val": 0.03937,
"tools_cr_s2s": True,
"tools_cr_s2s_val": 0.01,
"tools_cr_s2sm": True,
"tools_cr_s2sm_val": 0.01,
"tools_cr_s2o": True,
"tools_cr_s2o_val": 0.03937,
"tools_cr_sm2sm": True,
"tools_cr_sm2sm_val": 0.01,
"tools_cr_ri": True,
"tools_cr_ri_val": 0.015,
"tools_cr_h2h": True,
"tools_cr_h2h_val": 0.015,
"tools_cr_dh": True,
"tools_cr_dh_val": 0.011811,
# Utilities # Utilities
# file associations # file associations
"fa_excellon": 'drd, drl, exc, ncd, tap, xln', "fa_excellon": 'drd, drl, exc, ncd, tap, xln',
@ -1413,7 +1489,7 @@ class App(QtCore.QObject):
"tools_film_type": self.ui.tools_options_form.tools_film_group.film_type_radio, "tools_film_type": self.ui.tools_options_form.tools_film_group.film_type_radio,
"tools_film_boundary": self.ui.tools_options_form.tools_film_group.film_boundary_entry, "tools_film_boundary": self.ui.tools_options_form.tools_film_group.film_boundary_entry,
"tools_film_scale": self.ui.tools_options_form.tools_film_group.film_scale_entry, "tools_film_scale_stroke": self.ui.tools_options_form.tools_film_group.film_scale_stroke_entry,
"tools_panelize_spacing_columns": self.ui.tools_options_form.tools_panelize_group.pspacing_columns, "tools_panelize_spacing_columns": self.ui.tools_options_form.tools_panelize_group.pspacing_columns,
"tools_panelize_spacing_rows": self.ui.tools_options_form.tools_panelize_group.pspacing_rows, "tools_panelize_spacing_rows": self.ui.tools_options_form.tools_panelize_group.pspacing_rows,
@ -1535,7 +1611,7 @@ class App(QtCore.QObject):
"tools_film_type": 'neg', "tools_film_type": 'neg',
"tools_film_boundary": 1, "tools_film_boundary": 1,
"tools_film_scale": 0, "tools_film_scale_stroke": 0,
"tools_panelize_spacing_columns": 0, "tools_panelize_spacing_columns": 0,
"tools_panelize_spacing_rows": 0, "tools_panelize_spacing_rows": 0,
@ -2194,8 +2270,8 @@ class App(QtCore.QObject):
'outname', 'overlap', 'passes', 'postamble', 'pp', 'ppname_e', 'ppname_g', 'outname', 'overlap', 'passes', 'postamble', 'pp', 'ppname_e', 'ppname_g',
'preamble', 'radius', 'ref', 'rest', 'rows', 'shellvar_', 'scale_factor', 'preamble', 'radius', 'ref', 'rest', 'rows', 'shellvar_', 'scale_factor',
'spacing_columns', 'spacing_columns',
'spacing_rows', 'spindlespeed', 'toolchange_xy','tooldia', 'use_threads', 'value', 'x', 'spacing_rows', 'spindlespeed', 'toolchange_xy', 'tooldia', 'use_threads', 'value',
'x0', 'x1', 'y', 'y0', 'y1', 'z_cut', 'z_move' 'x', 'x0', 'x1', 'y', 'y0', 'y1', 'z_cut', 'z_move'
] ]
self.tcl_keywords = [ self.tcl_keywords = [

View File

@ -17,6 +17,7 @@ CAD program, and create G-Code for Isolation routing.
- changed the grid colors for 3D graphic engine when in Dark mode - changed the grid colors for 3D graphic engine when in Dark mode
- enhanced the Tool Film adding the Film adjustments and added the GUI in Preferences - enhanced the Tool Film adding the Film adjustments and added the GUI in Preferences
- set the GUI layout in Preferences for a new category named Tools 2 - set the GUI layout in Preferences for a new category named Tools 2
- added the Preferences for Check Rules Tool and for Optimal Tool and also updated the Film Tool to use the default settings in Preferences
12.10.2019 12.10.2019

View File

@ -213,15 +213,15 @@ class Tools2PreferencesUI(QtWidgets.QWidget):
self.layout = QtWidgets.QHBoxLayout() self.layout = QtWidgets.QHBoxLayout()
self.setLayout(self.layout) self.setLayout(self.layout)
self.tools2_checkrules = Tools2RulesCheckPrefGroupUI() self.tools2_checkrules_group = Tools2RulesCheckPrefGroupUI()
self.tools2_checkrules.setMinimumWidth(220) self.tools2_checkrules_group.setMinimumWidth(220)
self.tools2_optimal = Tools2OptimalPrefGroupUI() self.tools2_optimal_group = Tools2OptimalPrefGroupUI()
self.tools2_optimal.setMinimumWidth(220) self.tools2_optimal_group.setMinimumWidth(220)
self.vlay = QtWidgets.QVBoxLayout() self.vlay = QtWidgets.QVBoxLayout()
self.vlay.addWidget(self.tools2_checkrules) self.vlay.addWidget(self.tools2_checkrules_group)
self.vlay.addWidget(self.tools2_optimal) self.vlay.addWidget(self.tools2_optimal_group)
self.vlay1 = QtWidgets.QVBoxLayout() self.vlay1 = QtWidgets.QVBoxLayout()
@ -4322,7 +4322,12 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.film_color_label, 1, 0) grid0.addWidget(self.film_color_label, 1, 0)
grid0.addWidget(film_color_widget, 1, 1) grid0.addWidget(film_color_widget, 1, 1)
self.film_boundary_entry = FCEntry() # Film Border
self.film_boundary_entry = FCDoubleSpinner()
self.film_boundary_entry.set_precision(self.decimals)
self.film_boundary_entry.set_range(0, 9999.9999)
self.film_boundary_entry.setSingleStep(0.1)
self.film_boundary_label = QtWidgets.QLabel('%s:' % _("Border")) self.film_boundary_label = QtWidgets.QLabel('%s:' % _("Border"))
self.film_boundary_label.setToolTip( self.film_boundary_label.setToolTip(
_("Specify a border around the object.\n" _("Specify a border around the object.\n"
@ -4337,15 +4342,19 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.film_boundary_label, 2, 0) grid0.addWidget(self.film_boundary_label, 2, 0)
grid0.addWidget(self.film_boundary_entry, 2, 1) grid0.addWidget(self.film_boundary_entry, 2, 1)
self.film_scale_entry = FCEntry() self.film_scale_stroke_entry = FCDoubleSpinner()
self.film_scale_label = QtWidgets.QLabel('%s:' % _("Scale Stroke")) self.film_scale_stroke_entry.set_precision(self.decimals)
self.film_scale_label.setToolTip( self.film_scale_stroke_entry.set_range(0, 9999.9999)
self.film_scale_stroke_entry.setSingleStep(0.1)
self.film_scale_stroke_label = QtWidgets.QLabel('%s:' % _("Scale Stroke"))
self.film_scale_stroke_label.setToolTip(
_("Scale the line stroke thickness of each feature in the SVG file.\n" _("Scale the line stroke thickness of each feature in the SVG file.\n"
"It means that the line that envelope each SVG feature will be thicker or thinner,\n" "It means that the line that envelope each SVG feature will be thicker or thinner,\n"
"therefore the fine features may be more affected by this parameter.") "therefore the fine features may be more affected by this parameter.")
) )
grid0.addWidget(self.film_scale_label, 3, 0) grid0.addWidget(self.film_scale_stroke_label, 3, 0)
grid0.addWidget(self.film_scale_entry, 3, 1) grid0.addWidget(self.film_scale_stroke_entry, 3, 1)
self.film_adj_label = QtWidgets.QLabel('<b>%s</b>' % _("Film Adjustments")) self.film_adj_label = QtWidgets.QLabel('<b>%s</b>' % _("Film Adjustments"))
self.film_adj_label.setToolTip( self.film_adj_label.setToolTip(
@ -4454,7 +4463,6 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.film_mirror_axis_label, 13, 0) grid0.addWidget(self.film_mirror_axis_label, 13, 0)
grid0.addWidget(self.film_mirror_axis, 13, 1) grid0.addWidget(self.film_mirror_axis, 13, 1)
self.layout.addStretch() self.layout.addStretch()
@ -4969,7 +4977,7 @@ class ToolsSubPrefGroupUI(OptionsGroupUI):
self.setTitle(str(_("Substractor Tool Options"))) self.setTitle(str(_("Substractor Tool Options")))
# ## Solder Paste Dispensing # ## Subtractor Tool Parameters
self.sublabel = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters")) self.sublabel = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters"))
self.sublabel.setToolTip( self.sublabel.setToolTip(
_("A tool to substract one Gerber or Geometry object\n" _("A tool to substract one Gerber or Geometry object\n"
@ -4989,19 +4997,220 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
super(Tools2RulesCheckPrefGroupUI, self).__init__(self) super(Tools2RulesCheckPrefGroupUI, self).__init__(self)
self.setTitle(str(_("Substractor Tool Options"))) self.setTitle(str(_("Check Rules Tool Options")))
self.decimals = 4
# ## Solder Paste Dispensing self.crlabel = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters"))
self.sublabel = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters")) self.crlabel.setToolTip(
self.sublabel.setToolTip( _("A tool to check if Gerber files fir within a set\n"
_("A tool to substract one Gerber or Geometry object\n" "of Manufacturing Rules.")
"from another of the same type.")
) )
self.layout.addWidget(self.sublabel) self.layout.addWidget(self.crlabel)
self.close_paths_cb = FCCheckBox(_("Close paths")) # Form Layout
self.close_paths_cb.setToolTip(_("Checking this will close the paths cut by the Geometry substractor object.")) self.form_layout_1 = QtWidgets.QFormLayout()
self.layout.addWidget(self.close_paths_cb) self.layout.addLayout(self.form_layout_1)
# Trace size
self.trace_size_cb = FCCheckBox('%s:' % _("Trace Size"))
self.trace_size_cb.setToolTip(
_("This checks if the minimum size for traces is met.")
)
self.form_layout_1.addRow(self.trace_size_cb)
# Trace size value
self.trace_size_entry = FCDoubleSpinner()
self.trace_size_entry.set_range(0.00001, 999.99999)
self.trace_size_entry.set_precision(self.decimals)
self.trace_size_entry.setSingleStep(0.1)
self.trace_size_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.trace_size_lbl.setToolTip(
_("Minimum acceptable trace size.")
)
self.form_layout_1.addRow(self.trace_size_lbl, self.trace_size_entry)
# Copper2copper clearance
self.clearance_copper2copper_cb = FCCheckBox('%s:' % _("Copper to Copper clearance"))
self.clearance_copper2copper_cb.setToolTip(
_("This checks if the minimum clearance between copper\n"
"features is met.")
)
self.form_layout_1.addRow(self.clearance_copper2copper_cb)
# Copper2copper clearance value
self.clearance_copper2copper_entry = FCDoubleSpinner()
self.clearance_copper2copper_entry.set_range(0.00001, 999.99999)
self.clearance_copper2copper_entry.set_precision(self.decimals)
self.clearance_copper2copper_entry.setSingleStep(0.1)
self.clearance_copper2copper_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_copper2copper_lbl.setToolTip(
_("Minimum acceptable clearance value.")
)
self.form_layout_1.addRow(self.clearance_copper2copper_lbl, self.clearance_copper2copper_entry)
# Copper2outline clearance
self.clearance_copper2ol_cb = FCCheckBox('%s:' % _("Copper to Outline clearance"))
self.clearance_copper2ol_cb.setToolTip(
_("This checks if the minimum clearance between copper\n"
"features and the outline is met.")
)
self.form_layout_1.addRow(self.clearance_copper2ol_cb)
# Copper2outline clearance value
self.clearance_copper2ol_entry = FCDoubleSpinner()
self.clearance_copper2ol_entry.set_range(0.00001, 999.99999)
self.clearance_copper2ol_entry.set_precision(self.decimals)
self.clearance_copper2ol_entry.setSingleStep(0.1)
self.clearance_copper2ol_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_copper2ol_lbl.setToolTip(
_("Minimum acceptable clearance value.")
)
self.form_layout_1.addRow(self.clearance_copper2ol_lbl, self.clearance_copper2ol_entry)
# Silkscreen2silkscreen clearance
self.clearance_silk2silk_cb = FCCheckBox('%s:' % _("Silk to Silk Clearance"))
self.clearance_silk2silk_cb.setToolTip(
_("This checks if the minimum clearance between silkscreen\n"
"features and silkscreen features is met.")
)
self.form_layout_1.addRow(self.clearance_silk2silk_cb)
# Copper2silkscreen clearance value
self.clearance_silk2silk_entry = FCDoubleSpinner()
self.clearance_silk2silk_entry.set_range(0.00001, 999.99999)
self.clearance_silk2silk_entry.set_precision(self.decimals)
self.clearance_silk2silk_entry.setSingleStep(0.1)
self.clearance_silk2silk_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_silk2silk_lbl.setToolTip(
_("Minimum acceptable clearance value.")
)
self.form_layout_1.addRow(self.clearance_silk2silk_lbl, self.clearance_silk2silk_entry)
# Silkscreen2soldermask clearance
self.clearance_silk2sm_cb = FCCheckBox('%s:' % _("Silk to Solder Mask Clearance"))
self.clearance_silk2sm_cb.setToolTip(
_("This checks if the minimum clearance between silkscreen\n"
"features and soldermask features is met.")
)
self.form_layout_1.addRow(self.clearance_silk2sm_cb)
# Silkscreen2soldermask clearance value
self.clearance_silk2sm_entry = FCDoubleSpinner()
self.clearance_silk2sm_entry.set_range(0.00001, 999.99999)
self.clearance_silk2sm_entry.set_precision(self.decimals)
self.clearance_silk2sm_entry.setSingleStep(0.1)
self.clearance_silk2sm_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_silk2sm_lbl.setToolTip(
_("Minimum acceptable clearance value.")
)
self.form_layout_1.addRow(self.clearance_silk2sm_lbl, self.clearance_silk2sm_entry)
# Silk2outline clearance
self.clearance_silk2ol_cb = FCCheckBox('%s:' % _("Silk to Outline Clearance"))
self.clearance_silk2ol_cb.setToolTip(
_("This checks if the minimum clearance between silk\n"
"features and the outline is met.")
)
self.form_layout_1.addRow(self.clearance_silk2ol_cb)
# Silk2outline clearance value
self.clearance_silk2ol_entry = FCDoubleSpinner()
self.clearance_silk2ol_entry.set_range(0.00001, 999.99999)
self.clearance_silk2ol_entry.set_precision(self.decimals)
self.clearance_silk2ol_entry.setSingleStep(0.1)
self.clearance_silk2ol_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_silk2ol_lbl.setToolTip(
_("Minimum acceptable clearance value.")
)
self.form_layout_1.addRow(self.clearance_silk2ol_lbl, self.clearance_silk2ol_entry)
# Soldermask2soldermask clearance
self.clearance_sm2sm_cb = FCCheckBox('%s:' % _("Minimum Solder Mask Sliver"))
self.clearance_sm2sm_cb.setToolTip(
_("This checks if the minimum clearance between soldermask\n"
"features and soldermask features is met.")
)
self.form_layout_1.addRow(self.clearance_sm2sm_cb)
# Soldermask2soldermask clearance value
self.clearance_sm2sm_entry = FCDoubleSpinner()
self.clearance_sm2sm_entry.set_range(0.00001, 999.99999)
self.clearance_sm2sm_entry.set_precision(self.decimals)
self.clearance_sm2sm_entry.setSingleStep(0.1)
self.clearance_sm2sm_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_sm2sm_lbl.setToolTip(
_("Minimum acceptable clearance value.")
)
self.form_layout_1.addRow(self.clearance_sm2sm_lbl, self.clearance_sm2sm_entry)
# Ring integrity check
self.ring_integrity_cb = FCCheckBox('%s:' % _("Minimum Annular Ring"))
self.ring_integrity_cb.setToolTip(
_("This checks if the minimum copper ring left by drilling\n"
"a hole into a pad is met.")
)
self.form_layout_1.addRow(self.ring_integrity_cb)
# Ring integrity value
self.ring_integrity_entry = FCDoubleSpinner()
self.ring_integrity_entry.set_range(0.00001, 999.99999)
self.ring_integrity_entry.set_precision(self.decimals)
self.ring_integrity_entry.setSingleStep(0.1)
self.ring_integrity_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.ring_integrity_lbl.setToolTip(
_("Minimum acceptable ring value.")
)
self.form_layout_1.addRow(self.ring_integrity_lbl, self.ring_integrity_entry)
self.form_layout_1.addRow(QtWidgets.QLabel(""))
# Hole2Hole clearance
self.clearance_d2d_cb = FCCheckBox('%s:' % _("Hole to Hole Clearance"))
self.clearance_d2d_cb.setToolTip(
_("This checks if the minimum clearance between a drill hole\n"
"and another drill hole is met.")
)
self.form_layout_1.addRow(self.clearance_d2d_cb)
# Hole2Hole clearance value
self.clearance_d2d_entry = FCDoubleSpinner()
self.clearance_d2d_entry.set_range(0.00001, 999.99999)
self.clearance_d2d_entry.set_precision(self.decimals)
self.clearance_d2d_entry.setSingleStep(0.1)
self.clearance_d2d_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_d2d_lbl.setToolTip(
_("Minimum acceptable drill size.")
)
self.form_layout_1.addRow(self.clearance_d2d_lbl, self.clearance_d2d_entry)
# Drill holes size check
self.drill_size_cb = FCCheckBox('%s:' % _("Hole Size"))
self.drill_size_cb.setToolTip(
_("This checks if the drill holes\n"
"sizes are above the threshold.")
)
self.form_layout_1.addRow(self.drill_size_cb)
# Drile holes value
self.drill_size_entry = FCDoubleSpinner()
self.drill_size_entry.set_range(0.00001, 999.99999)
self.drill_size_entry.set_precision(self.decimals)
self.drill_size_entry.setSingleStep(0.1)
self.drill_size_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.drill_size_lbl.setToolTip(
_("Minimum acceptable clearance value.")
)
self.form_layout_1.addRow(self.drill_size_lbl, self.drill_size_entry)
self.layout.addStretch() self.layout.addStretch()
@ -5011,19 +5220,34 @@ class Tools2OptimalPrefGroupUI(OptionsGroupUI):
super(Tools2OptimalPrefGroupUI, self).__init__(self) super(Tools2OptimalPrefGroupUI, self).__init__(self)
self.setTitle(str(_("Substractor Tool Options"))) self.setTitle(str(_("Optimal Tool Options")))
self.decimals = 4
# ## Solder Paste Dispensing # ## Parameters
self.sublabel = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters")) self.optlabel = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters"))
self.sublabel.setToolTip( self.optlabel.setToolTip(
_("A tool to substract one Gerber or Geometry object\n" _("A tool to find the minimum distance between\n"
"from another of the same type.") "every two Gerber geometric elements")
) )
self.layout.addWidget(self.sublabel) self.layout.addWidget(self.optlabel)
self.close_paths_cb = FCCheckBox(_("Close paths")) grid0 = QtWidgets.QGridLayout()
self.close_paths_cb.setToolTip(_("Checking this will close the paths cut by the Geometry substractor object.")) self.layout.addLayout(grid0)
self.layout.addWidget(self.close_paths_cb) grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.precision_sp = FCSpinner()
self.precision_sp.set_range(2, 10)
self.precision_sp.setSingleStep(1)
self.precision_sp.setWrapping(True)
self.precision_lbl = QtWidgets.QLabel('%s:' % _("Precision"))
self.precision_lbl.setToolTip(
_("Number of decimals for the distances and coordinates in this tool.")
)
grid0.addWidget(self.precision_lbl, 0, 0)
grid0.addWidget(self.precision_sp, 0, 1)
self.layout.addStretch() self.layout.addStretch()

View File

@ -430,12 +430,23 @@ class Film(FlatCAMTool):
b_entry = self.app.defaults["tools_film_boundary"] if self.app.defaults["tools_film_boundary"] else 0.0 b_entry = self.app.defaults["tools_film_boundary"] if self.app.defaults["tools_film_boundary"] else 0.0
self.boundary_entry.set_value(float(b_entry)) self.boundary_entry.set_value(float(b_entry))
scale_stroke_width = self.app.defaults["tools_film_scale"] if self.app.defaults["tools_film_scale"] else 0.0 scale_stroke_width = self.app.defaults["tools_film_scale_stroke"] if \
self.app.defaults["tools_film_scale_stroke"] else 0.0
self.film_scale_stroke_entry.set_value(int(scale_stroke_width)) self.film_scale_stroke_entry.set_value(int(scale_stroke_width))
self.punch_cb.set_value(False) self.punch_cb.set_value(False)
self.source_punch.set_value('exc') self.source_punch.set_value('exc')
self.film_scale_cb.set_value(self.app.defaults["tools_film_scale_cb"])
self.film_scalex_entry.set_value(float(self.app.defaults["tools_film_scale_x_entry"]))
self.film_scaley_entry.set_value(float(self.app.defaults["tools_film_scale_y_entry"]))
self.film_skew_cb.set_value(self.app.defaults["tools_film_skew_cb"])
self.film_skewx_entry.set_value(float(self.app.defaults["tools_film_skew_x_entry"]))
self.film_skewy_entry.set_value(float(self.app.defaults["tools_film_skew_y_entry"]))
self.film_skew_reference.set_value(self.app.defaults["tools_film_skew_ref_radio"])
self.film_mirror_cb.set_value(self.app.defaults["tools_film_mirror_cb"])
self.film_mirror_axis.set_value(self.app.defaults["tools_film_mirror_axis_radio"])
def on_film_type(self, val): def on_film_type(self, val):
type_of_film = val type_of_film = val

View File

@ -270,7 +270,7 @@ class ToolOptimal(FlatCAMTool):
self.app.ui.notebook.setTabText(2, _("Optimal Tool")) self.app.ui.notebook.setTabText(2, _("Optimal Tool"))
def set_tool_ui(self): def set_tool_ui(self):
self.precision_spinner.set_value(int(self.decimals)) self.precision_spinner.set_value(int(self.app.defaults["tools_opt_precision"]))
self.locations_textb.clear() self.locations_textb.clear()
# new cursor - select all document # new cursor - select all document
cursor = self.locations_textb.textCursor() cursor = self.locations_textb.textCursor()

View File

@ -32,6 +32,7 @@ class RulesCheck(FlatCAMTool):
def __init__(self, app): def __init__(self, app):
super(RulesCheck, self).__init__(self) super(RulesCheck, self).__init__(self)
self.app = app self.app = app
self.decimals = 4
# ## Title # ## Title
title_label = QtWidgets.QLabel("%s" % self.toolName) title_label = QtWidgets.QLabel("%s" % self.toolName)
@ -48,6 +49,10 @@ class RulesCheck(FlatCAMTool):
self.grid_layout = QtWidgets.QGridLayout() self.grid_layout = QtWidgets.QGridLayout()
self.layout.addLayout(self.grid_layout) self.layout.addLayout(self.grid_layout)
self.grid_layout.setColumnStretch(0, 0)
self.grid_layout.setColumnStretch(1, 3)
self.grid_layout.setColumnStretch(2, 0)
self.gerber_title_lbl = QtWidgets.QLabel('<b>%s</b>:' % _("Gerber Files")) self.gerber_title_lbl = QtWidgets.QLabel('<b>%s</b>:' % _("Gerber Files"))
self.gerber_title_lbl.setToolTip( self.gerber_title_lbl.setToolTip(
_("Gerber objects for which to check rules.") _("Gerber objects for which to check rules.")
@ -55,6 +60,9 @@ class RulesCheck(FlatCAMTool):
self.all_obj_cb = FCCheckBox() self.all_obj_cb = FCCheckBox()
self.grid_layout.addWidget(self.gerber_title_lbl, 0, 0, 1, 2)
self.grid_layout.addWidget(self.all_obj_cb, 0, 2)
# Copper Top object # Copper Top object
self.copper_t_object = QtWidgets.QComboBox() self.copper_t_object = QtWidgets.QComboBox()
self.copper_t_object.setModel(self.app.collection) self.copper_t_object.setModel(self.app.collection)
@ -68,6 +76,10 @@ class RulesCheck(FlatCAMTool):
self.copper_t_cb = FCCheckBox() self.copper_t_cb = FCCheckBox()
self.grid_layout.addWidget(self.copper_t_object_lbl, 1, 0)
self.grid_layout.addWidget(self.copper_t_object, 1, 1)
self.grid_layout.addWidget(self.copper_t_cb, 1, 2)
# Copper Bottom object # Copper Bottom object
self.copper_b_object = QtWidgets.QComboBox() self.copper_b_object = QtWidgets.QComboBox()
self.copper_b_object.setModel(self.app.collection) self.copper_b_object.setModel(self.app.collection)
@ -81,6 +93,10 @@ class RulesCheck(FlatCAMTool):
self.copper_b_cb = FCCheckBox() self.copper_b_cb = FCCheckBox()
self.grid_layout.addWidget(self.copper_b_object_lbl, 2, 0)
self.grid_layout.addWidget(self.copper_b_object, 2, 1)
self.grid_layout.addWidget(self.copper_b_cb, 2, 2)
# SolderMask Top object # SolderMask Top object
self.sm_t_object = QtWidgets.QComboBox() self.sm_t_object = QtWidgets.QComboBox()
self.sm_t_object.setModel(self.app.collection) self.sm_t_object.setModel(self.app.collection)
@ -94,6 +110,10 @@ class RulesCheck(FlatCAMTool):
self.sm_t_cb = FCCheckBox() self.sm_t_cb = FCCheckBox()
self.grid_layout.addWidget(self.sm_t_object_lbl, 3, 0)
self.grid_layout.addWidget(self.sm_t_object, 3, 1)
self.grid_layout.addWidget(self.sm_t_cb, 3, 2)
# SolderMask Bottom object # SolderMask Bottom object
self.sm_b_object = QtWidgets.QComboBox() self.sm_b_object = QtWidgets.QComboBox()
self.sm_b_object.setModel(self.app.collection) self.sm_b_object.setModel(self.app.collection)
@ -107,6 +127,10 @@ class RulesCheck(FlatCAMTool):
self.sm_b_cb = FCCheckBox() self.sm_b_cb = FCCheckBox()
self.grid_layout.addWidget(self.sm_b_object_lbl, 4, 0)
self.grid_layout.addWidget(self.sm_b_object, 4, 1)
self.grid_layout.addWidget(self.sm_b_cb, 4, 2)
# SilkScreen Top object # SilkScreen Top object
self.ss_t_object = QtWidgets.QComboBox() self.ss_t_object = QtWidgets.QComboBox()
self.ss_t_object.setModel(self.app.collection) self.ss_t_object.setModel(self.app.collection)
@ -120,6 +144,10 @@ class RulesCheck(FlatCAMTool):
self.ss_t_cb = FCCheckBox() self.ss_t_cb = FCCheckBox()
self.grid_layout.addWidget(self.ss_t_object_lbl, 5, 0)
self.grid_layout.addWidget(self.ss_t_object, 5, 1)
self.grid_layout.addWidget(self.ss_t_cb, 5, 2)
# SilkScreen Bottom object # SilkScreen Bottom object
self.ss_b_object = QtWidgets.QComboBox() self.ss_b_object = QtWidgets.QComboBox()
self.ss_b_object.setModel(self.app.collection) self.ss_b_object.setModel(self.app.collection)
@ -133,6 +161,10 @@ class RulesCheck(FlatCAMTool):
self.ss_b_cb = FCCheckBox() self.ss_b_cb = FCCheckBox()
self.grid_layout.addWidget(self.ss_b_object_lbl, 6, 0)
self.grid_layout.addWidget(self.ss_b_object, 6, 1)
self.grid_layout.addWidget(self.ss_b_cb, 6, 2)
# Outline object # Outline object
self.outline_object = QtWidgets.QComboBox() self.outline_object = QtWidgets.QComboBox()
self.outline_object.setModel(self.app.collection) self.outline_object.setModel(self.app.collection)
@ -146,33 +178,6 @@ class RulesCheck(FlatCAMTool):
self.out_cb = FCCheckBox() self.out_cb = FCCheckBox()
self.grid_layout.addWidget(self.gerber_title_lbl, 0, 0, 1, 2)
self.grid_layout.addWidget(self.all_obj_cb, 0, 2)
self.grid_layout.addWidget(self.copper_t_object_lbl, 1, 0)
self.grid_layout.addWidget(self.copper_t_object, 1, 1)
self.grid_layout.addWidget(self.copper_t_cb, 1, 2)
self.grid_layout.addWidget(self.copper_b_object_lbl, 2, 0)
self.grid_layout.addWidget(self.copper_b_object, 2, 1)
self.grid_layout.addWidget(self.copper_b_cb, 2, 2)
self.grid_layout.addWidget(self.sm_t_object_lbl, 3, 0)
self.grid_layout.addWidget(self.sm_t_object, 3, 1)
self.grid_layout.addWidget(self.sm_t_cb, 3, 2)
self.grid_layout.addWidget(self.sm_b_object_lbl, 4, 0)
self.grid_layout.addWidget(self.sm_b_object, 4, 1)
self.grid_layout.addWidget(self.sm_b_cb, 4, 2)
self.grid_layout.addWidget(self.ss_t_object_lbl, 5, 0)
self.grid_layout.addWidget(self.ss_t_object, 5, 1)
self.grid_layout.addWidget(self.ss_t_cb, 5, 2)
self.grid_layout.addWidget(self.ss_b_object_lbl, 6, 0)
self.grid_layout.addWidget(self.ss_b_object, 6, 1)
self.grid_layout.addWidget(self.ss_b_cb, 6, 2)
self.grid_layout.addWidget(self.outline_object_lbl, 7, 0) self.grid_layout.addWidget(self.outline_object_lbl, 7, 0)
self.grid_layout.addWidget(self.outline_object, 7, 1) self.grid_layout.addWidget(self.outline_object, 7, 1)
self.grid_layout.addWidget(self.out_cb, 7, 2) self.grid_layout.addWidget(self.out_cb, 7, 2)
@ -184,6 +189,8 @@ class RulesCheck(FlatCAMTool):
_("Excellon objects for which to check rules.") _("Excellon objects for which to check rules.")
) )
self.grid_layout.addWidget(self.excellon_title_lbl, 9, 0, 1, 3)
# Excellon 1 object # Excellon 1 object
self.e1_object = QtWidgets.QComboBox() self.e1_object = QtWidgets.QComboBox()
self.e1_object.setModel(self.app.collection) self.e1_object.setModel(self.app.collection)
@ -198,6 +205,10 @@ class RulesCheck(FlatCAMTool):
self.e1_cb = FCCheckBox() self.e1_cb = FCCheckBox()
self.grid_layout.addWidget(self.e1_object_lbl, 10, 0)
self.grid_layout.addWidget(self.e1_object, 10, 1)
self.grid_layout.addWidget(self.e1_cb, 10, 2)
# Excellon 2 object # Excellon 2 object
self.e2_object = QtWidgets.QComboBox() self.e2_object = QtWidgets.QComboBox()
self.e2_object.setModel(self.app.collection) self.e2_object.setModel(self.app.collection)
@ -212,22 +223,12 @@ class RulesCheck(FlatCAMTool):
self.e2_cb = FCCheckBox() self.e2_cb = FCCheckBox()
self.grid_layout.addWidget(self.excellon_title_lbl, 9, 0, 1, 3)
self.grid_layout.addWidget(self.e1_object_lbl, 10, 0)
self.grid_layout.addWidget(self.e1_object, 10, 1)
self.grid_layout.addWidget(self.e1_cb, 10, 2)
self.grid_layout.addWidget(self.e2_object_lbl, 11, 0) self.grid_layout.addWidget(self.e2_object_lbl, 11, 0)
self.grid_layout.addWidget(self.e2_object, 11, 1) self.grid_layout.addWidget(self.e2_object, 11, 1)
self.grid_layout.addWidget(self.e2_cb, 11, 2) self.grid_layout.addWidget(self.e2_cb, 11, 2)
self.grid_layout.addWidget(QtWidgets.QLabel(""), 12, 0, 1, 3) self.grid_layout.addWidget(QtWidgets.QLabel(""), 12, 0, 1, 3)
self.grid_layout.setColumnStretch(0, 0)
self.grid_layout.setColumnStretch(1, 3)
self.grid_layout.setColumnStretch(2, 0)
# Control All # Control All
self.all_cb = FCCheckBox('%s' % _("All Rules")) self.all_cb = FCCheckBox('%s' % _("All Rules"))
self.all_cb.setToolTip( self.all_cb.setToolTip(
@ -253,11 +254,15 @@ class RulesCheck(FlatCAMTool):
) )
self.form_layout_1.addRow(self.trace_size_cb) self.form_layout_1.addRow(self.trace_size_cb)
# Copper2copper clearance value # Trace size value
self.trace_size_entry = FCEntry() self.trace_size_entry = FCDoubleSpinner()
self.trace_size_entry.set_range(0.00001, 999.99999)
self.trace_size_entry.set_precision(self.decimals)
self.trace_size_entry.setSingleStep(0.1)
self.trace_size_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.trace_size_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.trace_size_lbl.setToolTip( self.trace_size_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable trace size.")
) )
self.form_layout_1.addRow(self.trace_size_lbl, self.trace_size_entry) self.form_layout_1.addRow(self.trace_size_lbl, self.trace_size_entry)
@ -272,7 +277,11 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.clearance_copper2copper_cb) self.form_layout_1.addRow(self.clearance_copper2copper_cb)
# Copper2copper clearance value # Copper2copper clearance value
self.clearance_copper2copper_entry = FCEntry() self.clearance_copper2copper_entry = FCDoubleSpinner()
self.clearance_copper2copper_entry.set_range(0.00001, 999.99999)
self.clearance_copper2copper_entry.set_precision(self.decimals)
self.clearance_copper2copper_entry.setSingleStep(0.1)
self.clearance_copper2copper_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.clearance_copper2copper_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_copper2copper_lbl.setToolTip( self.clearance_copper2copper_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable clearance value.")
@ -291,7 +300,11 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.clearance_copper2ol_cb) self.form_layout_1.addRow(self.clearance_copper2ol_cb)
# Copper2outline clearance value # Copper2outline clearance value
self.clearance_copper2ol_entry = FCEntry() self.clearance_copper2ol_entry = FCDoubleSpinner()
self.clearance_copper2ol_entry.set_range(0.00001, 999.99999)
self.clearance_copper2ol_entry.set_precision(self.decimals)
self.clearance_copper2ol_entry.setSingleStep(0.1)
self.clearance_copper2ol_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.clearance_copper2ol_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_copper2ol_lbl.setToolTip( self.clearance_copper2ol_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable clearance value.")
@ -310,7 +323,11 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.clearance_silk2silk_cb) self.form_layout_1.addRow(self.clearance_silk2silk_cb)
# Copper2silkscreen clearance value # Copper2silkscreen clearance value
self.clearance_silk2silk_entry = FCEntry() self.clearance_silk2silk_entry = FCDoubleSpinner()
self.clearance_silk2silk_entry.set_range(0.00001, 999.99999)
self.clearance_silk2silk_entry.set_precision(self.decimals)
self.clearance_silk2silk_entry.setSingleStep(0.1)
self.clearance_silk2silk_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.clearance_silk2silk_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_silk2silk_lbl.setToolTip( self.clearance_silk2silk_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable clearance value.")
@ -329,7 +346,11 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.clearance_silk2sm_cb) self.form_layout_1.addRow(self.clearance_silk2sm_cb)
# Silkscreen2soldermask clearance value # Silkscreen2soldermask clearance value
self.clearance_silk2sm_entry = FCEntry() self.clearance_silk2sm_entry = FCDoubleSpinner()
self.clearance_silk2sm_entry.set_range(0.00001, 999.99999)
self.clearance_silk2sm_entry.set_precision(self.decimals)
self.clearance_silk2sm_entry.setSingleStep(0.1)
self.clearance_silk2sm_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.clearance_silk2sm_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_silk2sm_lbl.setToolTip( self.clearance_silk2sm_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable clearance value.")
@ -348,7 +369,11 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.clearance_silk2ol_cb) self.form_layout_1.addRow(self.clearance_silk2ol_cb)
# Silk2outline clearance value # Silk2outline clearance value
self.clearance_silk2ol_entry = FCEntry() self.clearance_silk2ol_entry = FCDoubleSpinner()
self.clearance_silk2ol_entry.set_range(0.00001, 999.99999)
self.clearance_silk2ol_entry.set_precision(self.decimals)
self.clearance_silk2ol_entry.setSingleStep(0.1)
self.clearance_silk2ol_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.clearance_silk2ol_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_silk2ol_lbl.setToolTip( self.clearance_silk2ol_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable clearance value.")
@ -367,7 +392,11 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.clearance_sm2sm_cb) self.form_layout_1.addRow(self.clearance_sm2sm_cb)
# Soldermask2soldermask clearance value # Soldermask2soldermask clearance value
self.clearance_sm2sm_entry = FCEntry() self.clearance_sm2sm_entry = FCDoubleSpinner()
self.clearance_sm2sm_entry.set_range(0.00001, 999.99999)
self.clearance_sm2sm_entry.set_precision(self.decimals)
self.clearance_sm2sm_entry.setSingleStep(0.1)
self.clearance_sm2sm_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.clearance_sm2sm_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_sm2sm_lbl.setToolTip( self.clearance_sm2sm_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable clearance value.")
@ -386,7 +415,11 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.ring_integrity_cb) self.form_layout_1.addRow(self.ring_integrity_cb)
# Ring integrity value # Ring integrity value
self.ring_integrity_entry = FCEntry() self.ring_integrity_entry = FCDoubleSpinner()
self.ring_integrity_entry.set_range(0.00001, 999.99999)
self.ring_integrity_entry.set_precision(self.decimals)
self.ring_integrity_entry.setSingleStep(0.1)
self.ring_integrity_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.ring_integrity_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.ring_integrity_lbl.setToolTip( self.ring_integrity_lbl.setToolTip(
_("Minimum acceptable ring value.") _("Minimum acceptable ring value.")
@ -407,7 +440,11 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.clearance_d2d_cb) self.form_layout_1.addRow(self.clearance_d2d_cb)
# Hole2Hole clearance value # Hole2Hole clearance value
self.clearance_d2d_entry = FCEntry() self.clearance_d2d_entry = FCDoubleSpinner()
self.clearance_d2d_entry.set_range(0.00001, 999.99999)
self.clearance_d2d_entry.set_precision(self.decimals)
self.clearance_d2d_entry.setSingleStep(0.1)
self.clearance_d2d_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.clearance_d2d_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.clearance_d2d_lbl.setToolTip( self.clearance_d2d_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable clearance value.")
@ -426,10 +463,14 @@ class RulesCheck(FlatCAMTool):
self.form_layout_1.addRow(self.drill_size_cb) self.form_layout_1.addRow(self.drill_size_cb)
# Drile holes value # Drile holes value
self.drill_size_entry = FCEntry() self.drill_size_entry = FCDoubleSpinner()
self.drill_size_entry.set_range(0.00001, 999.99999)
self.drill_size_entry.set_precision(self.decimals)
self.drill_size_entry.setSingleStep(0.1)
self.drill_size_lbl = QtWidgets.QLabel('%s:' % _("Min value")) self.drill_size_lbl = QtWidgets.QLabel('%s:' % _("Min value"))
self.drill_size_lbl.setToolTip( self.drill_size_lbl.setToolTip(
_("Minimum acceptable clearance value.") _("Minimum acceptable drill size.")
) )
self.form_layout_1.addRow(self.drill_size_lbl, self.drill_size_entry) self.form_layout_1.addRow(self.drill_size_lbl, self.drill_size_entry)
@ -559,6 +600,28 @@ class RulesCheck(FlatCAMTool):
self.e1_object.setDisabled(True) self.e1_object.setDisabled(True)
self.e2_object.setDisabled(True) self.e2_object.setDisabled(True)
self.trace_size_cb.set_value(self.app.defaults["tools_cr_trace_size"])
self.trace_size_entry.set_value(float(self.app.defaults["tools_cr_trace_size_val"]))
self.clearance_copper2copper_cb.set_value(self.app.defaults["tools_cr_c2c"])
self.clearance_copper2copper_entry.set_value(float(self.app.defaults["tools_cr_c2c_val"]))
self.clearance_copper2ol_cb.set_value(self.app.defaults["tools_cr_c2o"])
self.clearance_copper2ol_entry.set_value(float(self.app.defaults["tools_cr_c2o_val"]))
self.clearance_silk2silk_cb.set_value(self.app.defaults["tools_cr_s2s"])
self.clearance_silk2silk_entry.set_value(float(self.app.defaults["tools_cr_s2s_val"]))
self.clearance_silk2sm_cb.set_value(self.app.defaults["tools_cr_s2sm"])
self.clearance_silk2sm_entry.set_value(float(self.app.defaults["tools_cr_s2sm_val"]))
self.clearance_silk2ol_cb.set_value(self.app.defaults["tools_cr_s2o"])
self.clearance_silk2ol_entry.set_value(float(self.app.defaults["tools_cr_s2o_val"]))
self.clearance_sm2sm_cb.set_value(self.app.defaults["tools_cr_sm2sm"])
self.clearance_sm2sm_entry.set_value(float(self.app.defaults["tools_cr_sm2sm_val"]))
self.ring_integrity_cb.set_value(self.app.defaults["tools_cr_ri"])
self.ring_integrity_entry.set_value(float(self.app.defaults["tools_cr_ri_val"]))
self.clearance_d2d_cb.set_value(self.app.defaults["tools_cr_h2h"])
self.clearance_d2d_entry.set_value(float(self.app.defaults["tools_cr_h2h_val"]))
self.drill_size_cb.set_value(self.app.defaults["tools_cr_dh"])
self.drill_size_entry.set_value(float(self.app.defaults["tools_cr_dh_val"]))
self.reset_fields() self.reset_fields()
@staticmethod @staticmethod