- in Copper Thieving Tool added a new parameter to filter areas too small to be desired in the copper thieving; added it to Preferences too

- Copper Thieving Tool added a new parameter to select what extra geometry to include in the Pattern Plating Mask; added it to the Preferences
- made a wide change on the spinners GUI ranges: from 9999.9999 all values to 10000.0000
- fixed some late issues in Corner Markers Tool new feature (messages)
- upgraded Calculator Tool and added the new parameter is the Preferences
- updated translation strings
This commit is contained in:
Marius Stanciu 2020-11-02 18:03:13 +02:00 committed by Marius
parent 84ef0f8a03
commit 4f9bb918d5
70 changed files with 4150 additions and 3371 deletions

View File

@ -19,6 +19,11 @@ CHANGELOG for FlatCAM beta
- in Corner Markers Tool - the new Gerber object will have also follow_geometry - in Corner Markers Tool - the new Gerber object will have also follow_geometry
- upgraded the Fiducials Tool to create new objects instead of updating in place the source objects - upgraded the Fiducials Tool to create new objects instead of updating in place the source objects
- upgraded the Copper Thieving Tool to create new objects instead of updating in place the source objects - upgraded the Copper Thieving Tool to create new objects instead of updating in place the source objects
- in Copper Thieving Tool added a new parameter to filter areas too small to be desired in the copper thieving; added it to Preferences too
- Copper Thieving Tool added a new parameter to select what extra geometry to include in the Pattern Plating Mask; added it to the Preferences
- made a wide change on the spinners GUI ranges: from 9999.9999 all values to 10000.0000
- fixed some late issues in Corner Markers Tool new feature (messages)
- upgraded Calculator Tool and added the new parameter is the Preferences
- updated translation strings - updated translation strings
1.11.2020 1.11.2020

View File

@ -225,7 +225,7 @@ class ToolsDB2UI:
_("Tool Diameter.")) _("Tool Diameter."))
self.dia_entry = FCDoubleSpinner() self.dia_entry = FCDoubleSpinner()
self.dia_entry.set_range(-9999.9999, 9999.9999) self.dia_entry.set_range(-10000.0000, 10000.0000)
self.dia_entry.set_precision(self.decimals) self.dia_entry.set_precision(self.decimals)
self.dia_entry.setObjectName('gdb_dia') self.dia_entry.setObjectName('gdb_dia')
@ -247,7 +247,7 @@ class ToolsDB2UI:
) )
self.tol_min_entry = FCDoubleSpinner(callback=self.confirmation_message) self.tol_min_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.tol_min_entry.set_precision(self.decimals) self.tol_min_entry.set_precision(self.decimals)
self.tol_min_entry.set_range(0, 9999.9999) self.tol_min_entry.set_range(0, 10000.0000)
self.tol_min_entry.setSingleStep(0.1) self.tol_min_entry.setSingleStep(0.1)
self.tol_min_entry.setObjectName("gdb_tol_min") self.tol_min_entry.setObjectName("gdb_tol_min")
@ -261,7 +261,7 @@ class ToolsDB2UI:
) )
self.tol_max_entry = FCDoubleSpinner(callback=self.confirmation_message) self.tol_max_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.tol_max_entry.set_precision(self.decimals) self.tol_max_entry.set_precision(self.decimals)
self.tol_max_entry.set_range(0, 9999.9999) self.tol_max_entry.set_range(0, 10000.0000)
self.tol_max_entry.setSingleStep(0.1) self.tol_max_entry.setSingleStep(0.1)
self.tol_max_entry.setObjectName("gdb_tol_max") self.tol_max_entry.setObjectName("gdb_tol_max")
@ -313,7 +313,7 @@ class ToolsDB2UI:
"Diameter of the tip for V-Shape Tools.")) "Diameter of the tip for V-Shape Tools."))
self.mill_vdia_entry = FCDoubleSpinner() self.mill_vdia_entry = FCDoubleSpinner()
self.mill_vdia_entry.set_range(0.0000, 9999.9999) self.mill_vdia_entry.set_range(0.0000, 10000.0000)
self.mill_vdia_entry.set_precision(self.decimals) self.mill_vdia_entry.set_precision(self.decimals)
self.mill_vdia_entry.setObjectName('gdb_vdia') self.mill_vdia_entry.setObjectName('gdb_vdia')
@ -379,7 +379,7 @@ class ToolsDB2UI:
"A value to be used as offset from the current path.")) "A value to be used as offset from the current path."))
self.mill_custom_offset_entry = FCDoubleSpinner() self.mill_custom_offset_entry = FCDoubleSpinner()
self.mill_custom_offset_entry.set_range(-9999.9999, 9999.9999) self.mill_custom_offset_entry.set_range(-10000.0000, 10000.0000)
self.mill_custom_offset_entry.set_precision(self.decimals) self.mill_custom_offset_entry.set_precision(self.decimals)
self.mill_custom_offset_entry.setObjectName('gdb_custom_offset') self.mill_custom_offset_entry.setObjectName('gdb_custom_offset')
@ -398,7 +398,7 @@ class ToolsDB2UI:
"The depth at which to cut into material.")) "The depth at which to cut into material."))
self.mill_cutz_entry = FCDoubleSpinner() self.mill_cutz_entry = FCDoubleSpinner()
self.mill_cutz_entry.set_range(-9999.9999, 9999.9999) self.mill_cutz_entry.set_range(-10000.0000, 10000.0000)
self.mill_cutz_entry.set_precision(self.decimals) self.mill_cutz_entry.set_precision(self.decimals)
self.mill_cutz_entry.setObjectName('gdb_cutz') self.mill_cutz_entry.setObjectName('gdb_cutz')
@ -425,7 +425,7 @@ class ToolsDB2UI:
"The value used to cut into material on each pass.")) "The value used to cut into material on each pass."))
self.mill_multidepth_entry = FCDoubleSpinner() self.mill_multidepth_entry = FCDoubleSpinner()
self.mill_multidepth_entry.set_range(-9999.9999, 9999.9999) self.mill_multidepth_entry.set_range(-10000.0000, 10000.0000)
self.mill_multidepth_entry.set_precision(self.decimals) self.mill_multidepth_entry.set_precision(self.decimals)
self.mill_multidepth_entry.setObjectName('gdb_multidepth_entry') self.mill_multidepth_entry.setObjectName('gdb_multidepth_entry')
@ -440,7 +440,7 @@ class ToolsDB2UI:
"above the surface of the material, avoiding all fixtures.")) "above the surface of the material, avoiding all fixtures."))
self.mill_travelz_entry = FCDoubleSpinner() self.mill_travelz_entry = FCDoubleSpinner()
self.mill_travelz_entry.set_range(-9999.9999, 9999.9999) self.mill_travelz_entry.set_range(-10000.0000, 10000.0000)
self.mill_travelz_entry.set_precision(self.decimals) self.mill_travelz_entry.set_precision(self.decimals)
self.mill_travelz_entry.setObjectName('gdb_travelz') self.mill_travelz_entry.setObjectName('gdb_travelz')
@ -473,7 +473,7 @@ class ToolsDB2UI:
"the extra cut.")) "the extra cut."))
self.mill_ecut_length_entry = FCDoubleSpinner() self.mill_ecut_length_entry = FCDoubleSpinner()
self.mill_ecut_length_entry.set_range(0.0000, 9999.9999) self.mill_ecut_length_entry.set_range(0.0000, 10000.0000)
self.mill_ecut_length_entry.set_precision(self.decimals) self.mill_ecut_length_entry.set_precision(self.decimals)
self.mill_ecut_length_entry.setObjectName('gdb_ecut_length') self.mill_ecut_length_entry.setObjectName('gdb_ecut_length')
@ -492,7 +492,7 @@ class ToolsDB2UI:
"The speed on XY plane used while cutting into material.")) "The speed on XY plane used while cutting into material."))
self.mill_frxy_entry = FCDoubleSpinner() self.mill_frxy_entry = FCDoubleSpinner()
self.mill_frxy_entry.set_range(-999999.9999, 999999.9999) self.mill_frxy_entry.set_range(-9910000.0000, 9910000.0000)
self.mill_frxy_entry.set_precision(self.decimals) self.mill_frxy_entry.set_precision(self.decimals)
self.mill_frxy_entry.setObjectName('gdb_frxy') self.mill_frxy_entry.setObjectName('gdb_frxy')
@ -506,7 +506,7 @@ class ToolsDB2UI:
"The speed on Z plane.")) "The speed on Z plane."))
self.mill_frz_entry = FCDoubleSpinner() self.mill_frz_entry = FCDoubleSpinner()
self.mill_frz_entry.set_range(-999999.9999, 999999.9999) self.mill_frz_entry.set_range(-9910000.0000, 9910000.0000)
self.mill_frz_entry.set_precision(self.decimals) self.mill_frz_entry.set_precision(self.decimals)
self.mill_frz_entry.setObjectName('gdb_frz') self.mill_frz_entry.setObjectName('gdb_frz')
@ -522,7 +522,7 @@ class ToolsDB2UI:
"the G0 g-code command. Mostly 3D printers.")) "the G0 g-code command. Mostly 3D printers."))
self.mill_frapids_entry = FCDoubleSpinner() self.mill_frapids_entry = FCDoubleSpinner()
self.mill_frapids_entry.set_range(0.0000, 9999.9999) self.mill_frapids_entry.set_range(0.0000, 10000.0000)
self.mill_frapids_entry.set_precision(self.decimals) self.mill_frapids_entry.set_precision(self.decimals)
self.mill_frapids_entry.setObjectName('gdb_frapids') self.mill_frapids_entry.setObjectName('gdb_frapids')
@ -542,7 +542,7 @@ class ToolsDB2UI:
"The speed of the spindle in RPM.")) "The speed of the spindle in RPM."))
self.mill_spindle_entry = FCDoubleSpinner() self.mill_spindle_entry = FCDoubleSpinner()
self.mill_spindle_entry.set_range(-999999.9999, 999999.9999) self.mill_spindle_entry.set_range(-9910000.0000, 9910000.0000)
self.mill_spindle_entry.set_precision(self.decimals) self.mill_spindle_entry.set_precision(self.decimals)
self.mill_spindle_entry.setObjectName('gdb_spindle') self.mill_spindle_entry.setObjectName('gdb_spindle')
@ -569,7 +569,7 @@ class ToolsDB2UI:
"A delay used to allow the motor spindle reach its set speed.")) "A delay used to allow the motor spindle reach its set speed."))
self.mill_dwelltime_entry = FCDoubleSpinner() self.mill_dwelltime_entry = FCDoubleSpinner()
self.mill_dwelltime_entry.set_range(0.0000, 9999.9999) self.mill_dwelltime_entry.set_range(0.0000, 10000.0000)
self.mill_dwelltime_entry.set_precision(self.decimals) self.mill_dwelltime_entry.set_precision(self.decimals)
self.mill_dwelltime_entry.setObjectName('gdb_dwelltime') self.mill_dwelltime_entry.setObjectName('gdb_dwelltime')
@ -652,7 +652,7 @@ class ToolsDB2UI:
) )
self.ncc_margin_entry = FCDoubleSpinner() self.ncc_margin_entry = FCDoubleSpinner()
self.ncc_margin_entry.set_precision(self.decimals) self.ncc_margin_entry.set_precision(self.decimals)
self.ncc_margin_entry.set_range(-9999.9999, 9999.9999) self.ncc_margin_entry.set_range(-10000.0000, 10000.0000)
self.ncc_margin_entry.setObjectName("gdb_n_margin") self.ncc_margin_entry.setObjectName("gdb_n_margin")
self.grid2.addWidget(nccmarginlabel, 16, 0) self.grid2.addWidget(nccmarginlabel, 16, 0)
@ -763,7 +763,7 @@ class ToolsDB2UI:
) )
self.paint_offset_entry = FCDoubleSpinner() self.paint_offset_entry = FCDoubleSpinner()
self.paint_offset_entry.set_precision(self.decimals) self.paint_offset_entry.set_precision(self.decimals)
self.paint_offset_entry.set_range(-9999.9999, 9999.9999) self.paint_offset_entry.set_range(-10000.0000, 10000.0000)
self.paint_offset_entry.setObjectName('gdb_p_offset') self.paint_offset_entry.setObjectName('gdb_p_offset')
self.grid3.addWidget(marginlabel, 2, 0) self.grid3.addWidget(marginlabel, 2, 0)
@ -927,9 +927,9 @@ class ToolsDB2UI:
self.drill_cutz_entry.set_precision(self.decimals) self.drill_cutz_entry.set_precision(self.decimals)
if self.machinist_setting == 0: if self.machinist_setting == 0:
self.drill_cutz_entry.set_range(-9999.9999, 0.0000) self.drill_cutz_entry.set_range(-10000.0000, 0.0000)
else: else:
self.drill_cutz_entry.set_range(-9999.9999, 9999.9999) self.drill_cutz_entry.set_range(-10000.0000, 10000.0000)
self.drill_cutz_entry.setSingleStep(0.1) self.drill_cutz_entry.setSingleStep(0.1)
self.drill_cutz_entry.setObjectName("gdb_e_cutz") self.drill_cutz_entry.setObjectName("gdb_e_cutz")
@ -947,7 +947,7 @@ class ToolsDB2UI:
self.drill_offset_entry = FCDoubleSpinner(callback=self.confirmation_message) self.drill_offset_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.drill_offset_entry.set_precision(self.decimals) self.drill_offset_entry.set_precision(self.decimals)
self.drill_offset_entry.set_range(-9999.9999, 9999.9999) self.drill_offset_entry.set_range(-10000.0000, 10000.0000)
self.drill_offset_entry.setObjectName("gdb_e_offset") self.drill_offset_entry.setObjectName("gdb_e_offset")
self.grid5.addWidget(self.tool_offset_label, 6, 0) self.grid5.addWidget(self.tool_offset_label, 6, 0)
@ -976,7 +976,7 @@ class ToolsDB2UI:
"The value used to cut into material on each pass.")) "The value used to cut into material on each pass."))
self.drill_maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.drill_maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.drill_maxdepth_entry.set_precision(self.decimals) self.drill_maxdepth_entry.set_precision(self.decimals)
self.drill_maxdepth_entry.set_range(0, 9999.9999) self.drill_maxdepth_entry.set_range(0, 10000.0000)
self.drill_maxdepth_entry.setSingleStep(0.1) self.drill_maxdepth_entry.setSingleStep(0.1)
self.drill_maxdepth_entry.setToolTip(_("Depth of each pass (positive).")) self.drill_maxdepth_entry.setToolTip(_("Depth of each pass (positive)."))
@ -996,9 +996,9 @@ class ToolsDB2UI:
self.drill_travelz_entry.set_precision(self.decimals) self.drill_travelz_entry.set_precision(self.decimals)
if self.machinist_setting == 0: if self.machinist_setting == 0:
self.drill_travelz_entry.set_range(0.00001, 9999.9999) self.drill_travelz_entry.set_range(0.00001, 10000.0000)
else: else:
self.drill_travelz_entry.set_range(-9999.9999, 9999.9999) self.drill_travelz_entry.set_range(-10000.0000, 10000.0000)
self.drill_travelz_entry.setSingleStep(0.1) self.drill_travelz_entry.setSingleStep(0.1)
self.drill_travelz_entry.setObjectName("gdb_e_travelz") self.drill_travelz_entry.setObjectName("gdb_e_travelz")
@ -1021,7 +1021,7 @@ class ToolsDB2UI:
) )
self.drill_feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message) self.drill_feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.drill_feedrate_z_entry.set_precision(self.decimals) self.drill_feedrate_z_entry.set_precision(self.decimals)
self.drill_feedrate_z_entry.set_range(0.0, 99999.9999) self.drill_feedrate_z_entry.set_range(0.0, 910000.0000)
self.drill_feedrate_z_entry.setSingleStep(0.1) self.drill_feedrate_z_entry.setSingleStep(0.1)
self.drill_feedrate_z_entry.setObjectName("gdb_e_feedratez") self.drill_feedrate_z_entry.setObjectName("gdb_e_feedratez")
@ -1039,7 +1039,7 @@ class ToolsDB2UI:
) )
self.drill_feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message) self.drill_feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.drill_feedrate_rapid_entry.set_precision(self.decimals) self.drill_feedrate_rapid_entry.set_precision(self.decimals)
self.drill_feedrate_rapid_entry.set_range(0.0, 99999.9999) self.drill_feedrate_rapid_entry.set_range(0.0, 910000.0000)
self.drill_feedrate_rapid_entry.setSingleStep(0.1) self.drill_feedrate_rapid_entry.setSingleStep(0.1)
self.drill_feedrate_rapid_entry.setObjectName("gdb_e_fr_rapid") self.drill_feedrate_rapid_entry.setObjectName("gdb_e_fr_rapid")
@ -1086,7 +1086,7 @@ class ToolsDB2UI:
"A delay used to allow the motor spindle reach its set speed.")) "A delay used to allow the motor spindle reach its set speed."))
self.drill_dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message) self.drill_dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.drill_dwelltime_entry.set_precision(self.decimals) self.drill_dwelltime_entry.set_precision(self.decimals)
self.drill_dwelltime_entry.set_range(0.0, 9999.9999) self.drill_dwelltime_entry.set_range(0.0, 10000.0000)
self.drill_dwelltime_entry.setSingleStep(0.1) self.drill_dwelltime_entry.setSingleStep(0.1)
self.drill_dwelltime_entry.setObjectName("gdb_e_dwelltime") self.drill_dwelltime_entry.setObjectName("gdb_e_dwelltime")
@ -1149,7 +1149,7 @@ class ToolsDB2UI:
# Margin # Margin
self.cutout_margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.cutout_margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.cutout_margin_entry.set_range(-9999.9999, 9999.9999) self.cutout_margin_entry.set_range(-10000.0000, 10000.0000)
self.cutout_margin_entry.setSingleStep(0.1) self.cutout_margin_entry.setSingleStep(0.1)
self.cutout_margin_entry.set_precision(self.decimals) self.cutout_margin_entry.set_precision(self.decimals)
self.cutout_margin_entry.setObjectName('gdb_ct_margin') self.cutout_margin_entry.setObjectName('gdb_ct_margin')
@ -1211,9 +1211,9 @@ class ToolsDB2UI:
self.cutout_thin_depth_entry.setObjectName('gdb_ct_gap_depth') self.cutout_thin_depth_entry.setObjectName('gdb_ct_gap_depth')
if self.machinist_setting == 0: if self.machinist_setting == 0:
self.cutout_thin_depth_entry.setRange(-9999.9999, -0.00001) self.cutout_thin_depth_entry.setRange(-10000.0000, -0.00001)
else: else:
self.cutout_thin_depth_entry.setRange(-9999.9999, 9999.9999) self.cutout_thin_depth_entry.setRange(-10000.0000, 10000.0000)
self.cutout_thin_depth_entry.setSingleStep(0.1) self.cutout_thin_depth_entry.setSingleStep(0.1)
self.grid6.addWidget(self.thin_depth_label, 17, 0) self.grid6.addWidget(self.thin_depth_label, 17, 0)
@ -2976,7 +2976,7 @@ class ToolsDB2(QtWidgets.QWidget):
# dia_item = FCDoubleSpinner() # dia_item = FCDoubleSpinner()
# dia_item.set_precision(self.decimals) # dia_item.set_precision(self.decimals)
# dia_item.setSingleStep(0.1) # dia_item.setSingleStep(0.1)
# dia_item.set_range(0.0, 9999.9999) # dia_item.set_range(0.0, 10000.0000)
# dia_item.set_value(float(tooldict['tooldia'])) # dia_item.set_value(float(tooldict['tooldia']))
# widget.setCellWidget(row, 2, dia_item) # widget.setCellWidget(row, 2, dia_item)
# #
@ -2989,7 +2989,7 @@ class ToolsDB2(QtWidgets.QWidget):
# c_offset_item = FCDoubleSpinner() # c_offset_item = FCDoubleSpinner()
# c_offset_item.set_precision(self.decimals) # c_offset_item.set_precision(self.decimals)
# c_offset_item.setSingleStep(0.1) # c_offset_item.setSingleStep(0.1)
# c_offset_item.set_range(-9999.9999, 9999.9999) # c_offset_item.set_range(-10000.0000, 10000.0000)
# c_offset_item.set_value(float(tooldict['offset_value'])) # c_offset_item.set_value(float(tooldict['offset_value']))
# widget.setCellWidget(row, 4, c_offset_item) # widget.setCellWidget(row, 4, c_offset_item)
# #
@ -3009,9 +3009,9 @@ class ToolsDB2(QtWidgets.QWidget):
# cutz_item.set_precision(self.decimals) # cutz_item.set_precision(self.decimals)
# cutz_item.setSingleStep(0.1) # cutz_item.setSingleStep(0.1)
# if self.app.defaults['global_machinist_setting']: # if self.app.defaults['global_machinist_setting']:
# cutz_item.set_range(-9999.9999, 9999.9999) # cutz_item.set_range(-10000.0000, 10000.0000)
# else: # else:
# cutz_item.set_range(-9999.9999, -0.0000) # cutz_item.set_range(-10000.0000, -0.0000)
# #
# cutz_item.set_value(float(data['cutz'])) # cutz_item.set_value(float(data['cutz']))
# widget.setCellWidget(row, 7, cutz_item) # widget.setCellWidget(row, 7, cutz_item)
@ -3033,14 +3033,14 @@ class ToolsDB2(QtWidgets.QWidget):
# depth_per_pass_item = FCDoubleSpinner() # depth_per_pass_item = FCDoubleSpinner()
# depth_per_pass_item.set_precision(self.decimals) # depth_per_pass_item.set_precision(self.decimals)
# depth_per_pass_item.setSingleStep(0.1) # depth_per_pass_item.setSingleStep(0.1)
# depth_per_pass_item.set_range(0.0, 9999.9999) # depth_per_pass_item.set_range(0.0, 10000.0000)
# depth_per_pass_item.set_value(float(data['depthperpass'])) # depth_per_pass_item.set_value(float(data['depthperpass']))
# widget.setCellWidget(row, 9, depth_per_pass_item) # widget.setCellWidget(row, 9, depth_per_pass_item)
# #
# vtip_dia_item = FCDoubleSpinner() # vtip_dia_item = FCDoubleSpinner()
# vtip_dia_item.set_precision(self.decimals) # vtip_dia_item.set_precision(self.decimals)
# vtip_dia_item.setSingleStep(0.1) # vtip_dia_item.setSingleStep(0.1)
# vtip_dia_item.set_range(0.0, 9999.9999) # vtip_dia_item.set_range(0.0, 10000.0000)
# vtip_dia_item.set_value(float(data['vtipdia'])) # vtip_dia_item.set_value(float(data['vtipdia']))
# widget.setCellWidget(row, 10, vtip_dia_item) # widget.setCellWidget(row, 10, vtip_dia_item)
# #
@ -3055,28 +3055,28 @@ class ToolsDB2(QtWidgets.QWidget):
# travelz_item.set_precision(self.decimals) # travelz_item.set_precision(self.decimals)
# travelz_item.setSingleStep(0.1) # travelz_item.setSingleStep(0.1)
# if self.app.defaults['global_machinist_setting']: # if self.app.defaults['global_machinist_setting']:
# travelz_item.set_range(-9999.9999, 9999.9999) # travelz_item.set_range(-10000.0000, 10000.0000)
# else: # else:
# travelz_item.set_range(0.0000, 9999.9999) # travelz_item.set_range(0.0000, 10000.0000)
# #
# travelz_item.set_value(float(data['travelz'])) # travelz_item.set_value(float(data['travelz']))
# widget.setCellWidget(row, 12, travelz_item) # widget.setCellWidget(row, 12, travelz_item)
# #
# fr_item = FCDoubleSpinner() # fr_item = FCDoubleSpinner()
# fr_item.set_precision(self.decimals) # fr_item.set_precision(self.decimals)
# fr_item.set_range(0.0, 9999.9999) # fr_item.set_range(0.0, 10000.0000)
# fr_item.set_value(float(data['feedrate'])) # fr_item.set_value(float(data['feedrate']))
# widget.setCellWidget(row, 13, fr_item) # widget.setCellWidget(row, 13, fr_item)
# #
# frz_item = FCDoubleSpinner() # frz_item = FCDoubleSpinner()
# frz_item.set_precision(self.decimals) # frz_item.set_precision(self.decimals)
# frz_item.set_range(0.0, 9999.9999) # frz_item.set_range(0.0, 10000.0000)
# frz_item.set_value(float(data['feedrate_z'])) # frz_item.set_value(float(data['feedrate_z']))
# widget.setCellWidget(row, 14, frz_item) # widget.setCellWidget(row, 14, frz_item)
# #
# frrapids_item = FCDoubleSpinner() # frrapids_item = FCDoubleSpinner()
# frrapids_item.set_precision(self.decimals) # frrapids_item.set_precision(self.decimals)
# frrapids_item.set_range(0.0, 9999.9999) # frrapids_item.set_range(0.0, 10000.0000)
# frrapids_item.set_value(float(data['feedrate_rapid'])) # frrapids_item.set_value(float(data['feedrate_rapid']))
# widget.setCellWidget(row, 15, frrapids_item) # widget.setCellWidget(row, 15, frrapids_item)
# #
@ -3092,7 +3092,7 @@ class ToolsDB2(QtWidgets.QWidget):
# #
# dwelltime_item = FCDoubleSpinner() # dwelltime_item = FCDoubleSpinner()
# dwelltime_item.set_precision(self.decimals) # dwelltime_item.set_precision(self.decimals)
# dwelltime_item.set_range(0.0000, 9999.9999) # dwelltime_item.set_range(0.0000, 10000.0000)
# dwelltime_item.set_value(float(data['dwelltime'])) # dwelltime_item.set_value(float(data['dwelltime']))
# widget.setCellWidget(row, 18, dwelltime_item) # widget.setCellWidget(row, 18, dwelltime_item)
# #
@ -3108,7 +3108,7 @@ class ToolsDB2(QtWidgets.QWidget):
# #
# ecut_length_item = FCDoubleSpinner() # ecut_length_item = FCDoubleSpinner()
# ecut_length_item.set_precision(self.decimals) # ecut_length_item.set_precision(self.decimals)
# ecut_length_item.set_range(0.0000, 9999.9999) # ecut_length_item.set_range(0.0000, 10000.0000)
# ecut_length_item.set_value(data['extracut_length']) # ecut_length_item.set_value(data['extracut_length'])
# widget.setCellWidget(row, 21, ecut_length_item) # widget.setCellWidget(row, 21, ecut_length_item)
# #
@ -3123,9 +3123,9 @@ class ToolsDB2(QtWidgets.QWidget):
# toolchangez_item.set_precision(self.decimals) # toolchangez_item.set_precision(self.decimals)
# toolchangez_item.setSingleStep(0.1) # toolchangez_item.setSingleStep(0.1)
# if self.app.defaults['global_machinist_setting']: # if self.app.defaults['global_machinist_setting']:
# toolchangez_item.set_range(-9999.9999, 9999.9999) # toolchangez_item.set_range(-10000.0000, 10000.0000)
# else: # else:
# toolchangez_item.set_range(0.0000, 9999.9999) # toolchangez_item.set_range(0.0000, 10000.0000)
# #
# toolchangez_item.set_value(float(data['toolchangez'])) # toolchangez_item.set_value(float(data['toolchangez']))
# widget.setCellWidget(row, 24, toolchangez_item) # widget.setCellWidget(row, 24, toolchangez_item)
@ -3137,9 +3137,9 @@ class ToolsDB2(QtWidgets.QWidget):
# endz_item.set_precision(self.decimals) # endz_item.set_precision(self.decimals)
# endz_item.setSingleStep(0.1) # endz_item.setSingleStep(0.1)
# if self.app.defaults['global_machinist_setting']: # if self.app.defaults['global_machinist_setting']:
# endz_item.set_range(-9999.9999, 9999.9999) # endz_item.set_range(-10000.0000, 10000.0000)
# else: # else:
# endz_item.set_range(0.0000, 9999.9999) # endz_item.set_range(0.0000, 10000.0000)
# #
# endz_item.set_value(float(data['endz'])) # endz_item.set_value(float(data['endz']))
# widget.setCellWidget(row, 26, endz_item) # widget.setCellWidget(row, 26, endz_item)

View File

@ -3773,7 +3773,7 @@ class AppExcEditorUI:
hlay = QtWidgets.QHBoxLayout() hlay = QtWidgets.QHBoxLayout()
self.addtool_entry = FCDoubleSpinner() self.addtool_entry = FCDoubleSpinner()
self.addtool_entry.set_precision(self.decimals) self.addtool_entry.set_precision(self.decimals)
self.addtool_entry.set_range(0.0000, 9999.9999) self.addtool_entry.set_range(0.0000, 10000.0000)
hlay.addWidget(self.addtool_entry) hlay.addWidget(self.addtool_entry)
@ -3831,7 +3831,7 @@ class AppExcEditorUI:
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.resdrill_entry.setSizePolicy(sizePolicy) self.resdrill_entry.setSizePolicy(sizePolicy)
self.resdrill_entry.set_precision(self.decimals) self.resdrill_entry.set_precision(self.decimals)
self.resdrill_entry.set_range(0.0000, 9999.9999) self.resdrill_entry.set_range(0.0000, 10000.0000)
hlay2.addWidget(self.resdrill_entry) hlay2.addWidget(self.resdrill_entry)
@ -3924,7 +3924,7 @@ class AppExcEditorUI:
self.drill_pitch_entry = FCDoubleSpinner() self.drill_pitch_entry = FCDoubleSpinner()
self.drill_pitch_entry.set_precision(self.decimals) self.drill_pitch_entry.set_precision(self.decimals)
self.drill_pitch_entry.set_range(0.0000, 9999.9999) self.drill_pitch_entry.set_range(0.0000, 10000.0000)
self.linear_form.addRow(self.drill_pitch_label, self.drill_pitch_entry) self.linear_form.addRow(self.drill_pitch_label, self.drill_pitch_entry)
@ -4018,7 +4018,7 @@ class AppExcEditorUI:
self.slot_length_entry = FCDoubleSpinner() self.slot_length_entry = FCDoubleSpinner()
self.slot_length_entry.set_precision(self.decimals) self.slot_length_entry.set_precision(self.decimals)
self.slot_length_entry.setSingleStep(0.1) self.slot_length_entry.setSingleStep(0.1)
self.slot_length_entry.setRange(0.0000, 9999.9999) self.slot_length_entry.setRange(0.0000, 10000.0000)
self.slot_form.addRow(self.slot_length_label, self.slot_length_entry) self.slot_form.addRow(self.slot_length_label, self.slot_length_entry)
@ -4140,7 +4140,7 @@ class AppExcEditorUI:
self.slot_array_pitch_entry = FCDoubleSpinner() self.slot_array_pitch_entry = FCDoubleSpinner()
self.slot_array_pitch_entry.set_precision(self.decimals) self.slot_array_pitch_entry.set_precision(self.decimals)
self.slot_array_pitch_entry.setSingleStep(0.1) self.slot_array_pitch_entry.setSingleStep(0.1)
self.slot_array_pitch_entry.setRange(0.0000, 9999.9999) self.slot_array_pitch_entry.setRange(0.0000, 10000.0000)
self.slot_array_linear_form.addRow(self.slot_array_pitch_label, self.slot_array_pitch_entry) self.slot_array_linear_form.addRow(self.slot_array_pitch_label, self.slot_array_pitch_entry)

View File

@ -83,7 +83,7 @@ class BufferSelectionTool(AppTool):
# Buffer distance # Buffer distance
self.buffer_distance_entry = FCDoubleSpinner() self.buffer_distance_entry = FCDoubleSpinner()
self.buffer_distance_entry.set_precision(self.decimals) self.buffer_distance_entry.set_precision(self.decimals)
self.buffer_distance_entry.set_range(0.0000, 999999.9999) self.buffer_distance_entry.set_range(0.0000, 9910000.0000)
form_layout.addRow(_("Buffer distance:"), self.buffer_distance_entry) form_layout.addRow(_("Buffer distance:"), self.buffer_distance_entry)
self.buffer_corner_lbl = FCLabel(_("Buffer corner:")) self.buffer_corner_lbl = FCLabel(_("Buffer corner:"))
self.buffer_corner_lbl.setToolTip( self.buffer_corner_lbl.setToolTip(
@ -445,7 +445,7 @@ class PaintOptionsTool(AppTool):
grid.addWidget(ptdlabel, 0, 0) grid.addWidget(ptdlabel, 0, 0)
self.painttooldia_entry = FCDoubleSpinner() self.painttooldia_entry = FCDoubleSpinner()
self.painttooldia_entry.set_range(-9999.9999, 9999.9999) self.painttooldia_entry.set_range(-10000.0000, 10000.0000)
self.painttooldia_entry.set_precision(self.decimals) self.painttooldia_entry.set_precision(self.decimals)
grid.addWidget(self.painttooldia_entry, 0, 1) grid.addWidget(self.painttooldia_entry, 0, 1)
@ -477,7 +477,7 @@ class PaintOptionsTool(AppTool):
"be painted.") "be painted.")
) )
self.paintmargin_entry = FCDoubleSpinner() self.paintmargin_entry = FCDoubleSpinner()
self.paintmargin_entry.set_range(-9999.9999, 9999.9999) self.paintmargin_entry.set_range(-10000.0000, 10000.0000)
self.paintmargin_entry.set_precision(self.decimals) self.paintmargin_entry.set_precision(self.decimals)
grid.addWidget(marginlabel, 2, 0) grid.addWidget(marginlabel, 2, 0)
@ -942,7 +942,7 @@ class TransformEditorTool(AppTool):
self.buffer_entry.set_precision(self.decimals) self.buffer_entry.set_precision(self.decimals)
self.buffer_entry.setSingleStep(0.1) self.buffer_entry.setSingleStep(0.1)
self.buffer_entry.setWrapping(True) self.buffer_entry.setWrapping(True)
self.buffer_entry.set_range(-9999.9999, 9999.9999) self.buffer_entry.set_range(-10000.0000, 10000.0000)
self.buffer_button = FCButton(_("Buffer D")) self.buffer_button = FCButton(_("Buffer D"))
self.buffer_button.setToolTip( self.buffer_button.setToolTip(
@ -1465,7 +1465,7 @@ class TransformEditorTool(AppTool):
val_box = FCInputDialog(title=_("Offset on X axis ..."), val_box = FCInputDialog(title=_("Offset on X axis ..."),
text='%s: (%s)' % (_('Enter a distance Value'), str(units)), text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
min=-9999.9999, max=10000.0000, decimals=self.decimals, min=-10000.0000, max=10000.0000, decimals=self.decimals,
init_val=float(self.app.defaults['tools_transform_offset_x']), init_val=float(self.app.defaults['tools_transform_offset_x']),
parent=self.app.ui) parent=self.app.ui)
val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png')) val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
@ -1483,7 +1483,7 @@ class TransformEditorTool(AppTool):
val_box = FCInputDialog(title=_("Offset on Y axis ..."), val_box = FCInputDialog(title=_("Offset on Y axis ..."),
text='%s: (%s)' % (_('Enter a distance Value'), str(units)), text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
min=-9999.9999, max=10000.0000, decimals=self.decimals, min=-10000.0000, max=10000.0000, decimals=self.decimals,
init_val=float(self.app.defaults['tools_transform_offset_y']), init_val=float(self.app.defaults['tools_transform_offset_y']),
parent=self.app.ui) parent=self.app.ui)
val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png')) val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))

View File

@ -2620,7 +2620,7 @@ class AppGerberEditor(QtCore.QObject):
# Buffer distance # Buffer distance
self.buffer_distance_entry = FCDoubleSpinner() self.buffer_distance_entry = FCDoubleSpinner()
self.buffer_distance_entry.set_precision(self.decimals) self.buffer_distance_entry.set_precision(self.decimals)
self.buffer_distance_entry.set_range(-9999.9999, 9999.9999) self.buffer_distance_entry.set_range(-10000.0000, 10000.0000)
buf_form_layout.addRow('%s:' % _("Buffer distance"), self.buffer_distance_entry) buf_form_layout.addRow('%s:' % _("Buffer distance"), self.buffer_distance_entry)
self.buffer_corner_lbl = QtWidgets.QLabel('%s:' % _("Buffer corner")) self.buffer_corner_lbl = QtWidgets.QLabel('%s:' % _("Buffer corner"))
@ -2672,7 +2672,7 @@ class AppGerberEditor(QtCore.QObject):
) )
self.scale_factor_entry = FCDoubleSpinner() self.scale_factor_entry = FCDoubleSpinner()
self.scale_factor_entry.set_precision(self.decimals) self.scale_factor_entry.set_precision(self.decimals)
self.scale_factor_entry.set_range(0.0000, 9999.9999) self.scale_factor_entry.set_range(0.0000, 10000.0000)
scale_form_layout.addRow(self.scale_factor_lbl, self.scale_factor_entry) scale_form_layout.addRow(self.scale_factor_lbl, self.scale_factor_entry)
@ -2708,7 +2708,7 @@ class AppGerberEditor(QtCore.QObject):
self.ma_upper_threshold_lbl = QtWidgets.QLabel('%s:' % _("Area UPPER threshold")) self.ma_upper_threshold_lbl = QtWidgets.QLabel('%s:' % _("Area UPPER threshold"))
self.ma_upper_threshold_lbl.setToolTip( self.ma_upper_threshold_lbl.setToolTip(
_("The threshold value, all areas less than this are marked.\n" _("The threshold value, all areas less than this are marked.\n"
"Can have a value between 0.0000 and 9999.9999") "Can have a value between 0.0000 and 10000.0000")
) )
self.ma_upper_threshold_entry = FCDoubleSpinner() self.ma_upper_threshold_entry = FCDoubleSpinner()
self.ma_upper_threshold_entry.set_precision(self.decimals) self.ma_upper_threshold_entry.set_precision(self.decimals)
@ -2717,7 +2717,7 @@ class AppGerberEditor(QtCore.QObject):
self.ma_lower_threshold_lbl = QtWidgets.QLabel('%s:' % _("Area LOWER threshold")) self.ma_lower_threshold_lbl = QtWidgets.QLabel('%s:' % _("Area LOWER threshold"))
self.ma_lower_threshold_lbl.setToolTip( self.ma_lower_threshold_lbl.setToolTip(
_("The threshold value, all areas more than this are marked.\n" _("The threshold value, all areas more than this are marked.\n"
"Can have a value between 0.0000 and 9999.9999") "Can have a value between 0.0000 and 10000.0000")
) )
self.ma_lower_threshold_entry = FCDoubleSpinner() self.ma_lower_threshold_entry = FCDoubleSpinner()
self.ma_lower_threshold_entry.set_precision(self.decimals) self.ma_lower_threshold_entry.set_precision(self.decimals)
@ -2827,7 +2827,7 @@ class AppGerberEditor(QtCore.QObject):
self.pad_pitch_entry = FCDoubleSpinner() self.pad_pitch_entry = FCDoubleSpinner()
self.pad_pitch_entry.set_precision(self.decimals) self.pad_pitch_entry.set_precision(self.decimals)
self.pad_pitch_entry.set_range(0.0000, 9999.9999) self.pad_pitch_entry.set_range(0.0000, 10000.0000)
self.pad_pitch_entry.setSingleStep(0.1) self.pad_pitch_entry.setSingleStep(0.1)
self.linear_form.addRow(self.pad_pitch_label, self.pad_pitch_entry) self.linear_form.addRow(self.pad_pitch_label, self.pad_pitch_entry)
@ -5623,7 +5623,7 @@ class TransformEditorTool(AppTool):
self.buffer_entry.set_precision(self.decimals) self.buffer_entry.set_precision(self.decimals)
self.buffer_entry.setSingleStep(0.1) self.buffer_entry.setSingleStep(0.1)
self.buffer_entry.setWrapping(True) self.buffer_entry.setWrapping(True)
self.buffer_entry.set_range(-9999.9999, 9999.9999) self.buffer_entry.set_range(-10000.0000, 10000.0000)
self.buffer_button = FCButton(_("Buffer D")) self.buffer_button = FCButton(_("Buffer D"))
self.buffer_button.setToolTip( self.buffer_button.setToolTip(
@ -6198,7 +6198,7 @@ class TransformEditorTool(AppTool):
val_box = FCInputDialog(title=_("Offset on X axis ..."), val_box = FCInputDialog(title=_("Offset on X axis ..."),
text='%s: (%s)' % (_('Enter a distance Value'), str(units)), text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
min=-9999.9999, max=10000.0000, decimals=self.decimals, min=-10000.0000, max=10000.0000, decimals=self.decimals,
init_val=float(self.app.defaults['tools_transform_offset_x']), init_val=float(self.app.defaults['tools_transform_offset_x']),
parent=self.app.ui) parent=self.app.ui)
val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png')) val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
@ -6216,7 +6216,7 @@ class TransformEditorTool(AppTool):
val_box = FCInputDialog(title=_("Offset on Y axis ..."), val_box = FCInputDialog(title=_("Offset on Y axis ..."),
text='%s: (%s)' % (_('Enter a distance Value'), str(units)), text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
min=-9999.9999, max=10000.0000, decimals=self.decimals, min=-10000.0000, max=10000.0000, decimals=self.decimals,
init_val=float(self.app.defaults['tools_transform_offset_y']), init_val=float(self.app.defaults['tools_transform_offset_y']),
parent=self.app.ui) parent=self.app.ui)
val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png')) val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))

View File

@ -1160,7 +1160,7 @@ class FCDoubleSlider(QtWidgets.QSlider):
class FCSliderWithDoubleSpinner(QtWidgets.QFrame): class FCSliderWithDoubleSpinner(QtWidgets.QFrame):
def __init__(self, min=0, max=9999.9999, step=1, precision=4, orientation='horizontal', **kwargs): def __init__(self, min=0, max=10000.0000, step=1, precision=4, orientation='horizontal', **kwargs):
super().__init__(**kwargs) super().__init__(**kwargs)
self.slider = FCDoubleSlider(orientation=orientation) self.slider = FCDoubleSlider(orientation=orientation)

View File

@ -451,7 +451,7 @@ class GerberObjectUI(ObjectUI):
) )
self.noncopper_margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.noncopper_margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.noncopper_margin_entry.set_range(-9999.9999, 9999.9999) self.noncopper_margin_entry.set_range(-10000.0000, 10000.0000)
self.noncopper_margin_entry.set_precision(self.decimals) self.noncopper_margin_entry.set_precision(self.decimals)
self.noncopper_margin_entry.setSingleStep(0.1) self.noncopper_margin_entry.setSingleStep(0.1)
@ -489,7 +489,7 @@ class GerberObjectUI(ObjectUI):
"to the nearest polygon.") "to the nearest polygon.")
) )
self.bbmargin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.bbmargin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.bbmargin_entry.set_range(-9999.9999, 9999.9999) self.bbmargin_entry.set_range(-10000.0000, 10000.0000)
self.bbmargin_entry.set_precision(self.decimals) self.bbmargin_entry.set_precision(self.decimals)
self.bbmargin_entry.setSingleStep(0.1) self.bbmargin_entry.setSingleStep(0.1)
@ -796,7 +796,7 @@ class ExcellonObjectUI(ObjectUI):
self.tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.tooldia_entry.set_precision(self.decimals) self.tooldia_entry.set_precision(self.decimals)
self.tooldia_entry.set_range(0.0, 9999.9999) self.tooldia_entry.set_range(0.0, 10000.0000)
self.tooldia_entry.setSingleStep(0.1) self.tooldia_entry.setSingleStep(0.1)
self.generate_milling_button = QtWidgets.QPushButton(_('Mill Drills')) self.generate_milling_button = QtWidgets.QPushButton(_('Mill Drills'))
@ -816,7 +816,7 @@ class ExcellonObjectUI(ObjectUI):
self.slot_tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.slot_tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.slot_tooldia_entry.set_precision(self.decimals) self.slot_tooldia_entry.set_precision(self.decimals)
self.slot_tooldia_entry.set_range(0.0, 9999.9999) self.slot_tooldia_entry.set_range(0.0, 10000.0000)
self.slot_tooldia_entry.setSingleStep(0.1) self.slot_tooldia_entry.setSingleStep(0.1)
self.generate_milling_slots_button = QtWidgets.QPushButton(_('Mill Slots')) self.generate_milling_slots_button = QtWidgets.QPushButton(_('Mill Slots'))
@ -1065,7 +1065,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.tool_offset_entry = FCDoubleSpinner(callback=self.confirmation_message) self.tool_offset_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.tool_offset_entry.set_precision(self.decimals) self.tool_offset_entry.set_precision(self.decimals)
self.tool_offset_entry.set_range(-9999.9999, 9999.9999) self.tool_offset_entry.set_range(-10000.0000, 10000.0000)
self.tool_offset_entry.setSingleStep(0.1) self.tool_offset_entry.setSingleStep(0.1)
grid1.addWidget(self.tool_offset_lbl, 0, 0) grid1.addWidget(self.tool_offset_lbl, 0, 0)
@ -1085,7 +1085,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.addtool_entry = FCDoubleSpinner(callback=self.confirmation_message) self.addtool_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.addtool_entry.set_precision(self.decimals) self.addtool_entry.set_precision(self.decimals)
self.addtool_entry.set_range(0.00001, 9999.9999) self.addtool_entry.set_range(0.00001, 10000.0000)
self.addtool_entry.setSingleStep(0.1) self.addtool_entry.setSingleStep(0.1)
grid1.addWidget(self.addtool_entry_lbl, 3, 0) grid1.addWidget(self.addtool_entry_lbl, 3, 0)
@ -1176,7 +1176,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.tipdia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.tipdia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.tipdia_entry.set_precision(self.decimals) self.tipdia_entry.set_precision(self.decimals)
self.tipdia_entry.set_range(0.00001, 9999.9999) self.tipdia_entry.set_range(0.00001, 10000.0000)
self.tipdia_entry.setSingleStep(0.1) self.tipdia_entry.setSingleStep(0.1)
self.grid3.addWidget(self.tipdialabel, 1, 0) self.grid3.addWidget(self.tipdialabel, 1, 0)
@ -1210,9 +1210,9 @@ class GeometryObjectUI(ObjectUI):
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.cutz_entry.set_range(-9999.9999, 0.0000) self.cutz_entry.set_range(-10000.0000, 0.0000)
else: else:
self.cutz_entry.set_range(-9999.9999, 9999.9999) self.cutz_entry.set_range(-10000.0000, 10000.0000)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
@ -1232,7 +1232,7 @@ class GeometryObjectUI(ObjectUI):
self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.maxdepth_entry.set_precision(self.decimals) self.maxdepth_entry.set_precision(self.decimals)
self.maxdepth_entry.set_range(0, 9999.9999) self.maxdepth_entry.set_range(0, 10000.0000)
self.maxdepth_entry.setSingleStep(0.1) self.maxdepth_entry.setSingleStep(0.1)
self.maxdepth_entry.setToolTip( self.maxdepth_entry.setToolTip(
@ -1255,9 +1255,9 @@ class GeometryObjectUI(ObjectUI):
self.travelz_entry.set_precision(self.decimals) self.travelz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.travelz_entry.set_range(0.00001, 9999.9999) self.travelz_entry.set_range(0.00001, 10000.0000)
else: else:
self.travelz_entry.set_range(-9999.9999, 9999.9999) self.travelz_entry.set_range(-10000.0000, 10000.0000)
self.travelz_entry.setSingleStep(0.1) self.travelz_entry.setSingleStep(0.1)
@ -1272,7 +1272,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.cncfeedrate_entry = FCDoubleSpinner(callback=self.confirmation_message) self.cncfeedrate_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.cncfeedrate_entry.set_precision(self.decimals) self.cncfeedrate_entry.set_precision(self.decimals)
self.cncfeedrate_entry.set_range(0, 99999.9999) self.cncfeedrate_entry.set_range(0, 910000.0000)
self.cncfeedrate_entry.setSingleStep(0.1) self.cncfeedrate_entry.setSingleStep(0.1)
self.grid3.addWidget(self.frlabel, 10, 0) self.grid3.addWidget(self.frlabel, 10, 0)
@ -1287,7 +1287,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_z_entry.set_precision(self.decimals) self.feedrate_z_entry.set_precision(self.decimals)
self.feedrate_z_entry.set_range(0, 99999.9999) self.feedrate_z_entry.set_range(0, 910000.0000)
self.feedrate_z_entry.setSingleStep(0.1) self.feedrate_z_entry.setSingleStep(0.1)
self.grid3.addWidget(self.frzlabel, 11, 0) self.grid3.addWidget(self.frzlabel, 11, 0)
@ -1304,7 +1304,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_rapid_entry.set_precision(self.decimals) self.feedrate_rapid_entry.set_precision(self.decimals)
self.feedrate_rapid_entry.set_range(0, 99999.9999) self.feedrate_rapid_entry.set_range(0, 910000.0000)
self.feedrate_rapid_entry.setSingleStep(0.1) self.feedrate_rapid_entry.setSingleStep(0.1)
self.grid3.addWidget(self.fr_rapidlabel, 12, 0) self.grid3.addWidget(self.fr_rapidlabel, 12, 0)
@ -1362,7 +1362,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dwelltime_entry.set_precision(self.decimals) self.dwelltime_entry.set_precision(self.decimals)
self.dwelltime_entry.set_range(0, 9999.9999) self.dwelltime_entry.set_range(0, 10000.0000)
self.dwelltime_entry.setSingleStep(0.1) self.dwelltime_entry.setSingleStep(0.1)
self.dwelltime_entry.setToolTip( self.dwelltime_entry.setToolTip(
@ -1381,7 +1381,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.pdepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.pdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.pdepth_entry.set_precision(self.decimals) self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-9999.9999, 9999.9999) self.pdepth_entry.set_range(-10000.0000, 10000.0000)
self.pdepth_entry.setSingleStep(0.1) self.pdepth_entry.setSingleStep(0.1)
self.grid3.addWidget(self.pdepth_label, 17, 0) self.grid3.addWidget(self.pdepth_label, 17, 0)
@ -1397,7 +1397,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.feedrate_probe_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_probe_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_probe_entry.set_precision(self.decimals) self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0.0, 9999.9999) self.feedrate_probe_entry.set_range(0.0, 10000.0000)
self.feedrate_probe_entry.setSingleStep(0.1) self.feedrate_probe_entry.setSingleStep(0.1)
self.grid3.addWidget(self.feedrate_probe_label, 18, 0) self.grid3.addWidget(self.feedrate_probe_label, 18, 0)
@ -1458,9 +1458,9 @@ class GeometryObjectUI(ObjectUI):
) )
if machinist_setting == 0: if machinist_setting == 0:
self.toolchangez_entry.set_range(0, 9999.9999) self.toolchangez_entry.set_range(0, 10000.0000)
else: else:
self.toolchangez_entry.set_range(-9999.9999, 9999.9999) self.toolchangez_entry.set_range(-10000.0000, 10000.0000)
self.toolchangez_entry.setSingleStep(0.1) self.toolchangez_entry.setSingleStep(0.1)
self.ois_tcz_geo = OptionalInputSection(self.toolchangeg_cb, [self.toolchangez_entry]) self.ois_tcz_geo = OptionalInputSection(self.toolchangeg_cb, [self.toolchangez_entry])
@ -1489,9 +1489,9 @@ class GeometryObjectUI(ObjectUI):
self.endz_entry.set_precision(self.decimals) self.endz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.endz_entry.set_range(0, 9999.9999) self.endz_entry.set_range(0, 10000.0000)
else: else:
self.endz_entry.set_range(-9999.9999, 9999.9999) self.endz_entry.set_range(-10000.0000, 10000.0000)
self.endz_entry.setSingleStep(0.1) self.endz_entry.setSingleStep(0.1)
@ -1589,7 +1589,7 @@ class GeometryObjectUI(ObjectUI):
self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n" self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n"
"an interdiction area.")) "an interdiction area."))
self.over_z_entry = FCDoubleSpinner() self.over_z_entry = FCDoubleSpinner()
self.over_z_entry.set_range(0.000, 9999.9999) self.over_z_entry.set_range(0.000, 10000.0000)
self.over_z_entry.set_precision(self.decimals) self.over_z_entry.set_precision(self.decimals)
grid_a1.addWidget(self.over_z_label, 2, 0) grid_a1.addWidget(self.over_z_label, 2, 0)
@ -1642,7 +1642,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.polish_dia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.polish_dia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.polish_dia_entry.set_precision(self.decimals) self.polish_dia_entry.set_precision(self.decimals)
self.polish_dia_entry.set_range(0.000, 9999.9999) self.polish_dia_entry.set_range(0.000, 10000.0000)
self.polish_dia_entry.setObjectName("g_polish_dia") self.polish_dia_entry.setObjectName("g_polish_dia")
self.grid4.addWidget(self.polish_dia_lbl, 16, 0) self.grid4.addWidget(self.polish_dia_lbl, 16, 0)
@ -1671,7 +1671,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.polish_pressure_entry = FCDoubleSpinner(callback=self.confirmation_message) self.polish_pressure_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.polish_pressure_entry.set_precision(self.decimals) self.polish_pressure_entry.set_precision(self.decimals)
self.polish_pressure_entry.set_range(-9999.9999, 9999.9999) self.polish_pressure_entry.set_range(-10000.0000, 10000.0000)
self.polish_pressure_entry.setObjectName("g_polish_pressure") self.polish_pressure_entry.setObjectName("g_polish_pressure")
self.grid4.addWidget(self.polish_pressure_lbl, 18, 0) self.grid4.addWidget(self.polish_pressure_lbl, 18, 0)
@ -1684,7 +1684,7 @@ class GeometryObjectUI(ObjectUI):
) )
self.polish_margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.polish_margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.polish_margin_entry.set_precision(self.decimals) self.polish_margin_entry.set_precision(self.decimals)
self.polish_margin_entry.set_range(-9999.9999, 9999.9999) self.polish_margin_entry.set_range(-10000.0000, 10000.0000)
self.polish_margin_entry.setObjectName("g_polish_margin") self.polish_margin_entry.setObjectName("g_polish_margin")
self.grid4.addWidget(self.polish_margin_lbl, 20, 0) self.grid4.addWidget(self.polish_margin_lbl, 20, 0)
@ -2046,7 +2046,7 @@ class CNCObjectUI(ObjectUI):
self.exc_cnc_tools_table.setColumnHidden(4, True) self.exc_cnc_tools_table.setColumnHidden(4, True)
self.tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.tooldia_entry.set_range(0, 9999.9999) self.tooldia_entry.set_range(0, 10000.0000)
self.tooldia_entry.set_precision(self.decimals) self.tooldia_entry.set_precision(self.decimals)
self.tooldia_entry.setSingleStep(0.1) self.tooldia_entry.setSingleStep(0.1)
self.custom_box.addWidget(self.tooldia_entry) self.custom_box.addWidget(self.tooldia_entry)
@ -2156,7 +2156,7 @@ class CNCObjectUI(ObjectUI):
) )
self.ptravelz_entry = FCDoubleSpinner() self.ptravelz_entry = FCDoubleSpinner()
self.ptravelz_entry.set_precision(self.decimals) self.ptravelz_entry.set_precision(self.decimals)
self.ptravelz_entry.set_range(0.0000, 9999.9999) self.ptravelz_entry.set_range(0.0000, 10000.0000)
grid0.addWidget(self.ptravelz_label, 9, 0) grid0.addWidget(self.ptravelz_label, 9, 0)
grid0.addWidget(self.ptravelz_entry, 9, 1) grid0.addWidget(self.ptravelz_entry, 9, 1)
@ -2169,7 +2169,7 @@ class CNCObjectUI(ObjectUI):
) )
self.pdepth_entry = FCDoubleSpinner() self.pdepth_entry = FCDoubleSpinner()
self.pdepth_entry.set_precision(self.decimals) self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-99999.9999, 0.0000) self.pdepth_entry.set_range(-910000.0000, 0.0000)
grid0.addWidget(self.pdepth_label, 11, 0) grid0.addWidget(self.pdepth_label, 11, 0)
grid0.addWidget(self.pdepth_entry, 11, 1) grid0.addWidget(self.pdepth_entry, 11, 1)
@ -2181,7 +2181,7 @@ class CNCObjectUI(ObjectUI):
) )
self.feedrate_probe_entry = FCDoubleSpinner() self.feedrate_probe_entry = FCDoubleSpinner()
self.feedrate_probe_entry.set_precision(self.decimals) self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0, 99999.9999) self.feedrate_probe_entry.set_range(0, 910000.0000)
grid0.addWidget(self.feedrate_probe_label, 13, 0) grid0.addWidget(self.feedrate_probe_label, 13, 0)
grid0.addWidget(self.feedrate_probe_entry, 13, 1) grid0.addWidget(self.feedrate_probe_entry, 13, 1)

View File

@ -498,6 +498,7 @@ class PreferencesUIManager:
"tools_calc_vshape_cut_z": self.ui.tools_defaults_form.tools_calculators_group.cut_z_entry, "tools_calc_vshape_cut_z": self.ui.tools_defaults_form.tools_calculators_group.cut_z_entry,
"tools_calc_electro_length": self.ui.tools_defaults_form.tools_calculators_group.pcblength_entry, "tools_calc_electro_length": self.ui.tools_defaults_form.tools_calculators_group.pcblength_entry,
"tools_calc_electro_width": self.ui.tools_defaults_form.tools_calculators_group.pcbwidth_entry, "tools_calc_electro_width": self.ui.tools_defaults_form.tools_calculators_group.pcbwidth_entry,
"tools_calc_electro_area": self.ui.tools_defaults_form.tools_calculators_group.area_entry,
"tools_calc_electro_cdensity": self.ui.tools_defaults_form.tools_calculators_group.cdensity_entry, "tools_calc_electro_cdensity": self.ui.tools_defaults_form.tools_calculators_group.cdensity_entry,
"tools_calc_electro_growth": self.ui.tools_defaults_form.tools_calculators_group.growth_entry, "tools_calc_electro_growth": self.ui.tools_defaults_form.tools_calculators_group.growth_entry,
@ -596,6 +597,7 @@ class PreferencesUIManager:
# Copper Thieving Tool # Copper Thieving Tool
"tools_copper_thieving_clearance": self.ui.tools2_defaults_form.tools2_cfill_group.clearance_entry, "tools_copper_thieving_clearance": self.ui.tools2_defaults_form.tools2_cfill_group.clearance_entry,
"tools_copper_thieving_margin": self.ui.tools2_defaults_form.tools2_cfill_group.margin_entry, "tools_copper_thieving_margin": self.ui.tools2_defaults_form.tools2_cfill_group.margin_entry,
"tools_copper_thieving_area": self.ui.tools2_defaults_form.tools2_cfill_group.area_entry,
"tools_copper_thieving_reference": self.ui.tools2_defaults_form.tools2_cfill_group.reference_radio, "tools_copper_thieving_reference": self.ui.tools2_defaults_form.tools2_cfill_group.reference_radio,
"tools_copper_thieving_box_type": self.ui.tools2_defaults_form.tools2_cfill_group.bbox_type_radio, "tools_copper_thieving_box_type": self.ui.tools2_defaults_form.tools2_cfill_group.bbox_type_radio,
"tools_copper_thieving_circle_steps": self.ui.tools2_defaults_form.tools2_cfill_group.circlesteps_entry, "tools_copper_thieving_circle_steps": self.ui.tools2_defaults_form.tools2_cfill_group.circlesteps_entry,
@ -610,6 +612,7 @@ class PreferencesUIManager:
"tools_copper_thieving_rb_margin": self.ui.tools2_defaults_form.tools2_cfill_group.rb_margin_entry, "tools_copper_thieving_rb_margin": self.ui.tools2_defaults_form.tools2_cfill_group.rb_margin_entry,
"tools_copper_thieving_rb_thickness": self.ui.tools2_defaults_form.tools2_cfill_group.rb_thickness_entry, "tools_copper_thieving_rb_thickness": self.ui.tools2_defaults_form.tools2_cfill_group.rb_thickness_entry,
"tools_copper_thieving_mask_clearance": self.ui.tools2_defaults_form.tools2_cfill_group.clearance_ppm_entry, "tools_copper_thieving_mask_clearance": self.ui.tools2_defaults_form.tools2_cfill_group.clearance_ppm_entry,
"tools_copper_thieving_geo_choice": self.ui.tools2_defaults_form.tools2_cfill_group.ppm_choice_radio,
# Fiducials Tool # Fiducials Tool
"tools_fiducials_dia": self.ui.tools2_defaults_form.tools2_fiducials_group.dia_entry, "tools_fiducials_dia": self.ui.tools2_defaults_form.tools2_fiducials_group.dia_entry,

View File

@ -122,7 +122,7 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
) )
self.ptravelz_entry = FCDoubleSpinner() self.ptravelz_entry = FCDoubleSpinner()
self.ptravelz_entry.set_precision(self.decimals) self.ptravelz_entry.set_precision(self.decimals)
self.ptravelz_entry.set_range(0.0000, 9999.9999) self.ptravelz_entry.set_range(0.0000, 10000.0000)
grid0.addWidget(self.ptravelz_label, 14, 0) grid0.addWidget(self.ptravelz_label, 14, 0)
grid0.addWidget(self.ptravelz_entry, 14, 1) grid0.addWidget(self.ptravelz_entry, 14, 1)
@ -135,7 +135,7 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
) )
self.pdepth_entry = FCDoubleSpinner() self.pdepth_entry = FCDoubleSpinner()
self.pdepth_entry.set_precision(self.decimals) self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-99999.9999, 0.0000) self.pdepth_entry.set_range(-910000.0000, 0.0000)
grid0.addWidget(self.pdepth_label, 16, 0) grid0.addWidget(self.pdepth_label, 16, 0)
grid0.addWidget(self.pdepth_entry, 16, 1) grid0.addWidget(self.pdepth_entry, 16, 1)
@ -147,7 +147,7 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
) )
self.feedrate_probe_entry = FCDoubleSpinner() self.feedrate_probe_entry = FCDoubleSpinner()
self.feedrate_probe_entry.set_precision(self.decimals) self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0, 99999.9999) self.feedrate_probe_entry.set_range(0, 910000.0000)
grid0.addWidget(self.feedrate_probe_label, 18, 0) grid0.addWidget(self.feedrate_probe_label, 18, 0)
grid0.addWidget(self.feedrate_probe_entry, 18, 1) grid0.addWidget(self.feedrate_probe_entry, 18, 1)
@ -176,7 +176,7 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
self.jog_step_entry = FCDoubleSpinner() self.jog_step_entry = FCDoubleSpinner()
self.jog_step_entry.set_precision(self.decimals) self.jog_step_entry.set_precision(self.decimals)
self.jog_step_entry.set_range(0, 99999.9999) self.jog_step_entry.set_range(0, 910000.0000)
grid0.addWidget(self.jog_step_label, 24, 0) grid0.addWidget(self.jog_step_label, 24, 0)
grid0.addWidget(self.jog_step_entry, 24, 1) grid0.addWidget(self.jog_step_entry, 24, 1)
@ -189,7 +189,7 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
self.jog_fr_entry = FCDoubleSpinner() self.jog_fr_entry = FCDoubleSpinner()
self.jog_fr_entry.set_precision(self.decimals) self.jog_fr_entry.set_precision(self.decimals)
self.jog_fr_entry.set_range(0, 99999.9999) self.jog_fr_entry.set_range(0, 910000.0000)
grid0.addWidget(self.jog_fr_label, 26, 0) grid0.addWidget(self.jog_fr_label, 26, 0)
grid0.addWidget(self.jog_fr_entry, 26, 1) grid0.addWidget(self.jog_fr_entry, 26, 1)
@ -202,7 +202,7 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
self.jog_travelz_entry = FCDoubleSpinner() self.jog_travelz_entry = FCDoubleSpinner()
self.jog_travelz_entry.set_precision(self.decimals) self.jog_travelz_entry.set_precision(self.decimals)
self.jog_travelz_entry.set_range(0, 99999.9999) self.jog_travelz_entry.set_range(0, 910000.0000)
grid0.addWidget(self.jog_travelz_label, 28, 0) grid0.addWidget(self.jog_travelz_label, 28, 0)
grid0.addWidget(self.jog_travelz_entry, 28, 1) grid0.addWidget(self.jog_travelz_entry, 28, 1)

View File

@ -103,7 +103,7 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
) )
# self.drill_pitch_label.setMinimumWidth(100) # self.drill_pitch_label.setMinimumWidth(100)
self.drill_pitch_entry = FCDoubleSpinner() self.drill_pitch_entry = FCDoubleSpinner()
self.drill_pitch_entry.set_range(0, 99999.9999) self.drill_pitch_entry.set_range(0, 910000.0000)
self.drill_pitch_entry.set_precision(self.decimals) self.drill_pitch_entry.set_precision(self.decimals)
grid0.addWidget(self.drill_pitch_label, 5, 0) grid0.addWidget(self.drill_pitch_label, 5, 0)

View File

@ -84,7 +84,7 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI):
self.mill_dia_entry = FCDoubleSpinner() self.mill_dia_entry = FCDoubleSpinner()
self.mill_dia_entry.set_precision(self.decimals) self.mill_dia_entry.set_precision(self.decimals)
self.mill_dia_entry.set_range(0.0000, 9999.9999) self.mill_dia_entry.set_range(0.0000, 10000.0000)
grid2.addWidget(self.mill_dia_label, 2, 0) grid2.addWidget(self.mill_dia_label, 2, 0)
grid2.addWidget(self.mill_dia_entry, 2, 1) grid2.addWidget(self.mill_dia_entry, 2, 1)

View File

@ -316,7 +316,7 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
# Top Margin value # Top Margin value
self.tmargin_entry = FCDoubleSpinner() self.tmargin_entry = FCDoubleSpinner()
self.tmargin_entry.set_precision(self.decimals) self.tmargin_entry.set_precision(self.decimals)
self.tmargin_entry.set_range(0.0000, 9999.9999) self.tmargin_entry.set_range(0.0000, 10000.0000)
self.tmargin_label = QtWidgets.QLabel('%s:' % _("Top Margin")) self.tmargin_label = QtWidgets.QLabel('%s:' % _("Top Margin"))
self.tmargin_label.setToolTip( self.tmargin_label.setToolTip(
@ -329,7 +329,7 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
# Bottom Margin value # Bottom Margin value
self.bmargin_entry = FCDoubleSpinner() self.bmargin_entry = FCDoubleSpinner()
self.bmargin_entry.set_precision(self.decimals) self.bmargin_entry.set_precision(self.decimals)
self.bmargin_entry.set_range(0.0000, 9999.9999) self.bmargin_entry.set_range(0.0000, 10000.0000)
self.bmargin_label = QtWidgets.QLabel('%s:' % _("Bottom Margin")) self.bmargin_label = QtWidgets.QLabel('%s:' % _("Bottom Margin"))
self.bmargin_label.setToolTip( self.bmargin_label.setToolTip(
@ -342,7 +342,7 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
# Left Margin value # Left Margin value
self.lmargin_entry = FCDoubleSpinner() self.lmargin_entry = FCDoubleSpinner()
self.lmargin_entry.set_precision(self.decimals) self.lmargin_entry.set_precision(self.decimals)
self.lmargin_entry.set_range(0.0000, 9999.9999) self.lmargin_entry.set_range(0.0000, 10000.0000)
self.lmargin_label = QtWidgets.QLabel('%s:' % _("Left Margin")) self.lmargin_label = QtWidgets.QLabel('%s:' % _("Left Margin"))
self.lmargin_label.setToolTip( self.lmargin_label.setToolTip(
@ -355,7 +355,7 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
# Right Margin value # Right Margin value
self.rmargin_entry = FCDoubleSpinner() self.rmargin_entry = FCDoubleSpinner()
self.rmargin_entry.set_precision(self.decimals) self.rmargin_entry.set_precision(self.decimals)
self.rmargin_entry.set_range(0.0000, 9999.9999) self.rmargin_entry.set_range(0.0000, 10000.0000)
self.rmargin_label = QtWidgets.QLabel('%s:' % _("Right Margin")) self.rmargin_label = QtWidgets.QLabel('%s:' % _("Right Margin"))
self.rmargin_label.setToolTip( self.rmargin_label.setToolTip(

View File

@ -73,7 +73,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
"ignore for any other cases.") "ignore for any other cases.")
) )
self.feedrate_rapid_entry = FCDoubleSpinner() self.feedrate_rapid_entry = FCDoubleSpinner()
self.feedrate_rapid_entry.set_range(0, 99999.9999) self.feedrate_rapid_entry.set_range(0, 910000.0000)
self.feedrate_rapid_entry.set_precision(self.decimals) self.feedrate_rapid_entry.set_precision(self.decimals)
self.feedrate_rapid_entry.setSingleStep(0.1) self.feedrate_rapid_entry.setSingleStep(0.1)
self.feedrate_rapid_entry.setWrapping(True) self.feedrate_rapid_entry.setWrapping(True)
@ -125,7 +125,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
_("The feedrate used while the probe is probing.") _("The feedrate used while the probe is probing.")
) )
self.feedrate_probe_entry = FCDoubleSpinner() self.feedrate_probe_entry = FCDoubleSpinner()
self.feedrate_probe_entry.set_range(0, 99999.9999) self.feedrate_probe_entry.set_range(0, 910000.0000)
self.feedrate_probe_entry.set_precision(self.decimals) self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.setSingleStep(0.1) self.feedrate_probe_entry.setSingleStep(0.1)
self.feedrate_probe_entry.setWrapping(True) self.feedrate_probe_entry.setWrapping(True)
@ -243,7 +243,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n" self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n"
"an interdiction area.")) "an interdiction area."))
self.over_z_entry = FCDoubleSpinner() self.over_z_entry = FCDoubleSpinner()
self.over_z_entry.set_range(0.000, 9999.9999) self.over_z_entry.set_range(0.000, 10000.0000)
self.over_z_entry.set_precision(self.decimals) self.over_z_entry.set_precision(self.decimals)
grid1.addWidget(self.over_z_label, 18, 0) grid1.addWidget(self.over_z_label, 18, 0)
@ -271,7 +271,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
) )
self.polish_dia_entry = FCDoubleSpinner() self.polish_dia_entry = FCDoubleSpinner()
self.polish_dia_entry.set_precision(self.decimals) self.polish_dia_entry.set_precision(self.decimals)
self.polish_dia_entry.set_range(0.000, 9999.9999) self.polish_dia_entry.set_range(0.000, 10000.0000)
grid1.addWidget(self.polish_dia_lbl, 24, 0) grid1.addWidget(self.polish_dia_lbl, 24, 0)
grid1.addWidget(self.polish_dia_entry, 24, 1) grid1.addWidget(self.polish_dia_entry, 24, 1)
@ -298,7 +298,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
) )
self.polish_pressure_entry = FCDoubleSpinner() self.polish_pressure_entry = FCDoubleSpinner()
self.polish_pressure_entry.set_precision(self.decimals) self.polish_pressure_entry.set_precision(self.decimals)
self.polish_pressure_entry.set_range(-9999.9999, 9999.9999) self.polish_pressure_entry.set_range(-10000.0000, 10000.0000)
grid1.addWidget(self.polish_pressure_lbl, 28, 0) grid1.addWidget(self.polish_pressure_lbl, 28, 0)
grid1.addWidget(self.polish_pressure_entry, 28, 1) grid1.addWidget(self.polish_pressure_entry, 28, 1)
@ -310,7 +310,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
) )
self.polish_margin_entry = FCDoubleSpinner() self.polish_margin_entry = FCDoubleSpinner()
self.polish_margin_entry.set_precision(self.decimals) self.polish_margin_entry.set_precision(self.decimals)
self.polish_margin_entry.set_range(-9999.9999, 9999.9999) self.polish_margin_entry.set_range(-10000.0000, 10000.0000)
grid1.addWidget(self.polish_margin_lbl, 30, 0) grid1.addWidget(self.polish_margin_lbl, 30, 0)
grid1.addWidget(self.polish_margin_entry, 30, 1) grid1.addWidget(self.polish_margin_entry, 30, 1)

View File

@ -54,9 +54,9 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
self.cutz_entry = FCDoubleSpinner() self.cutz_entry = FCDoubleSpinner()
if machinist_setting == 0: if machinist_setting == 0:
self.cutz_entry.set_range(-9999.9999, 0.0000) self.cutz_entry.set_range(-10000.0000, 0.0000)
else: else:
self.cutz_entry.set_range(-9999.9999, 9999.9999) self.cutz_entry.set_range(-10000.0000, 10000.0000)
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
@ -107,9 +107,9 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
self.travelz_entry = FCDoubleSpinner() self.travelz_entry = FCDoubleSpinner()
if machinist_setting == 0: if machinist_setting == 0:
self.travelz_entry.set_range(0.0001, 9999.9999) self.travelz_entry.set_range(0.0001, 10000.0000)
else: else:
self.travelz_entry.set_range(-9999.9999, 9999.9999) self.travelz_entry.set_range(-10000.0000, 10000.0000)
self.travelz_entry.set_precision(self.decimals) self.travelz_entry.set_precision(self.decimals)
self.travelz_entry.setSingleStep(0.1) self.travelz_entry.setSingleStep(0.1)
@ -139,9 +139,9 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
self.toolchangez_entry = FCDoubleSpinner() self.toolchangez_entry = FCDoubleSpinner()
if machinist_setting == 0: if machinist_setting == 0:
self.toolchangez_entry.set_range(0.000, 9999.9999) self.toolchangez_entry.set_range(0.000, 10000.0000)
else: else:
self.toolchangez_entry.set_range(-9999.9999, 9999.9999) self.toolchangez_entry.set_range(-10000.0000, 10000.0000)
self.toolchangez_entry.set_precision(self.decimals) self.toolchangez_entry.set_precision(self.decimals)
self.toolchangez_entry.setSingleStep(0.1) self.toolchangez_entry.setSingleStep(0.1)
@ -159,9 +159,9 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
self.endz_entry = FCDoubleSpinner() self.endz_entry = FCDoubleSpinner()
if machinist_setting == 0: if machinist_setting == 0:
self.endz_entry.set_range(0.000, 9999.9999) self.endz_entry.set_range(0.000, 10000.0000)
else: else:
self.endz_entry.set_range(-9999.9999, 9999.9999) self.endz_entry.set_range(-10000.0000, 10000.0000)
self.endz_entry.set_precision(self.decimals) self.endz_entry.set_precision(self.decimals)
self.endz_entry.setSingleStep(0.1) self.endz_entry.setSingleStep(0.1)
@ -189,7 +189,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
"plane in units per minute") "plane in units per minute")
) )
self.cncfeedrate_entry = FCDoubleSpinner() self.cncfeedrate_entry = FCDoubleSpinner()
self.cncfeedrate_entry.set_range(0, 99999.9999) self.cncfeedrate_entry.set_range(0, 910000.0000)
self.cncfeedrate_entry.set_precision(self.decimals) self.cncfeedrate_entry.set_precision(self.decimals)
self.cncfeedrate_entry.setSingleStep(0.1) self.cncfeedrate_entry.setSingleStep(0.1)
self.cncfeedrate_entry.setWrapping(True) self.cncfeedrate_entry.setWrapping(True)
@ -205,7 +205,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
"It is called also Plunge.") "It is called also Plunge.")
) )
self.feedrate_z_entry = FCDoubleSpinner() self.feedrate_z_entry = FCDoubleSpinner()
self.feedrate_z_entry.set_range(0, 99999.9999) self.feedrate_z_entry.set_range(0, 910000.0000)
self.feedrate_z_entry.set_precision(self.decimals) self.feedrate_z_entry.set_precision(self.decimals)
self.feedrate_z_entry.setSingleStep(0.1) self.feedrate_z_entry.setSingleStep(0.1)
self.feedrate_z_entry.setWrapping(True) self.feedrate_z_entry.setWrapping(True)

View File

@ -1,7 +1,7 @@
from PyQt5 import QtWidgets from PyQt5 import QtWidgets
from PyQt5.QtCore import QSettings from PyQt5.QtCore import QSettings
from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext import gettext
@ -34,7 +34,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
grid_lay.setColumnStretch(1, 1) grid_lay.setColumnStretch(1, 1)
# ## Parameters # ## Parameters
self.cflabel = QtWidgets.QLabel('<b>%s</b>' % _('Parameters')) self.cflabel = FCLabel('<b>%s</b>' % _('Parameters'))
self.cflabel.setToolTip( self.cflabel.setToolTip(
_("A tool to generate a Copper Thieving that can be added\n" _("A tool to generate a Copper Thieving that can be added\n"
"to a selected Gerber file.") "to a selected Gerber file.")
@ -42,7 +42,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.cflabel, 0, 0, 1, 2) grid_lay.addWidget(self.cflabel, 0, 0, 1, 2)
# CIRCLE STEPS - to be used when buffering # CIRCLE STEPS - to be used when buffering
self.circle_steps_lbl = QtWidgets.QLabel('%s:' % _("Circle Steps")) self.circle_steps_lbl = FCLabel('%s:' % _("Circle Steps"))
self.circle_steps_lbl.setToolTip( self.circle_steps_lbl.setToolTip(
_("Number of steps (lines) used to interpolate circles.") _("Number of steps (lines) used to interpolate circles.")
) )
@ -50,11 +50,11 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
self.circlesteps_entry = FCSpinner() self.circlesteps_entry = FCSpinner()
self.circlesteps_entry.set_range(1, 9999) self.circlesteps_entry.set_range(1, 9999)
grid_lay.addWidget(self.circle_steps_lbl, 1, 0) grid_lay.addWidget(self.circle_steps_lbl, 2, 0)
grid_lay.addWidget(self.circlesteps_entry, 1, 1) grid_lay.addWidget(self.circlesteps_entry, 2, 1)
# CLEARANCE # # CLEARANCE #
self.clearance_label = QtWidgets.QLabel('%s:' % _("Clearance")) self.clearance_label = FCLabel('%s:' % _("Clearance"))
self.clearance_label.setToolTip( self.clearance_label.setToolTip(
_("This set the distance between the copper Thieving components\n" _("This set the distance between the copper Thieving components\n"
"(the polygon fill may be split in multiple polygons)\n" "(the polygon fill may be split in multiple polygons)\n"
@ -65,11 +65,11 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
self.clearance_entry.set_precision(self.decimals) self.clearance_entry.set_precision(self.decimals)
self.clearance_entry.setSingleStep(0.1) self.clearance_entry.setSingleStep(0.1)
grid_lay.addWidget(self.clearance_label, 2, 0) grid_lay.addWidget(self.clearance_label, 4, 0)
grid_lay.addWidget(self.clearance_entry, 2, 1) grid_lay.addWidget(self.clearance_entry, 4, 1)
# MARGIN # # MARGIN #
self.margin_label = QtWidgets.QLabel('%s:' % _("Margin")) self.margin_label = FCLabel('%s:' % _("Margin"))
self.margin_label.setToolTip( self.margin_label.setToolTip(
_("Bounding box margin.") _("Bounding box margin.")
) )
@ -78,41 +78,54 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
self.margin_entry.set_precision(self.decimals) self.margin_entry.set_precision(self.decimals)
self.margin_entry.setSingleStep(0.1) self.margin_entry.setSingleStep(0.1)
grid_lay.addWidget(self.margin_label, 3, 0) grid_lay.addWidget(self.margin_label, 6, 0)
grid_lay.addWidget(self.margin_entry, 3, 1) grid_lay.addWidget(self.margin_entry, 6, 1)
# Area #
self.area_label = FCLabel('%s:' % _("Area"))
self.area_label.setToolTip(
_("Thieving areas with area less then this value will not be added.")
)
self.area_entry = FCDoubleSpinner()
self.area_entry.set_range(0.0, 10000.0000)
self.area_entry.set_precision(self.decimals)
self.area_entry.setSingleStep(0.1)
grid_lay.addWidget(self.area_label, 8, 0)
grid_lay.addWidget(self.area_entry, 8, 1)
# Reference # # Reference #
self.reference_radio = RadioSet([ self.reference_radio = RadioSet([
{'label': _('Itself'), 'value': 'itself'}, {'label': _('Itself'), 'value': 'itself'},
{"label": _("Area Selection"), "value": "area"}, {"label": _("Area Selection"), "value": "area"},
{'label': _("Reference Object"), 'value': 'box'} {'label': _("Reference Object"), 'value': 'box'}
], orientation='vertical', stretch=False) ], orientation='vertical', stretch=False)
self.reference_label = QtWidgets.QLabel(_("Reference:")) self.reference_label = FCLabel(_("Reference:"))
self.reference_label.setToolTip( self.reference_label.setToolTip(
_("- 'Itself' - the copper Thieving extent is based on the object extent.\n" _("- 'Itself' - the copper Thieving extent is based on the object extent.\n"
"- 'Area Selection' - left mouse click to start selection of the area to be filled.\n" "- 'Area Selection' - left mouse click to start selection of the area to be filled.\n"
"- 'Reference Object' - will do copper thieving within the area specified by another object.") "- 'Reference Object' - will do copper thieving within the area specified by another object.")
) )
grid_lay.addWidget(self.reference_label, 4, 0) grid_lay.addWidget(self.reference_label, 10, 0)
grid_lay.addWidget(self.reference_radio, 4, 1) grid_lay.addWidget(self.reference_radio, 10, 1)
# Bounding Box Type # # Bounding Box Type #
self.bbox_type_radio = RadioSet([ self.bbox_type_radio = RadioSet([
{'label': _('Rectangular'), 'value': 'rect'}, {'label': _('Rectangular'), 'value': 'rect'},
{"label": _("Minimal"), "value": "min"} {"label": _("Minimal"), "value": "min"}
], stretch=False) ], stretch=False)
self.bbox_type_label = QtWidgets.QLabel(_("Box Type:")) self.bbox_type_label = FCLabel(_("Box Type:"))
self.bbox_type_label.setToolTip( self.bbox_type_label.setToolTip(
_("- 'Rectangular' - the bounding box will be of rectangular shape.\n" _("- 'Rectangular' - the bounding box will be of rectangular shape.\n"
"- 'Minimal' - the bounding box will be the convex hull shape.") "- 'Minimal' - the bounding box will be the convex hull shape.")
) )
grid_lay.addWidget(self.bbox_type_label, 5, 0) grid_lay.addWidget(self.bbox_type_label, 12, 0)
grid_lay.addWidget(self.bbox_type_radio, 5, 1) grid_lay.addWidget(self.bbox_type_radio, 12, 1)
separator_line = QtWidgets.QFrame() separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine) separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken) separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid_lay.addWidget(separator_line, 6, 0, 1, 2) grid_lay.addWidget(separator_line, 14, 0, 1, 2)
# Fill Type # Fill Type
self.fill_type_radio = RadioSet([ self.fill_type_radio = RadioSet([
@ -121,154 +134,168 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
{"label": _("Squares Grid"), "value": "square"}, {"label": _("Squares Grid"), "value": "square"},
{"label": _("Lines Grid"), "value": "line"} {"label": _("Lines Grid"), "value": "line"}
], orientation='vertical', stretch=False) ], orientation='vertical', stretch=False)
self.fill_type_label = QtWidgets.QLabel(_("Fill Type:")) self.fill_type_label = FCLabel(_("Fill Type:"))
self.fill_type_label.setToolTip( self.fill_type_label.setToolTip(
_("- 'Solid' - copper thieving will be a solid polygon.\n" _("- 'Solid' - copper thieving will be a solid polygon.\n"
"- 'Dots Grid' - the empty area will be filled with a pattern of dots.\n" "- 'Dots Grid' - the empty area will be filled with a pattern of dots.\n"
"- 'Squares Grid' - the empty area will be filled with a pattern of squares.\n" "- 'Squares Grid' - the empty area will be filled with a pattern of squares.\n"
"- 'Lines Grid' - the empty area will be filled with a pattern of lines.") "- 'Lines Grid' - the empty area will be filled with a pattern of lines.")
) )
grid_lay.addWidget(self.fill_type_label, 7, 0) grid_lay.addWidget(self.fill_type_label, 16, 0)
grid_lay.addWidget(self.fill_type_radio, 7, 1) grid_lay.addWidget(self.fill_type_radio, 16, 1)
self.dots_label = QtWidgets.QLabel('<b>%s</b>:' % _("Dots Grid Parameters")) self.dots_label = FCLabel('<b>%s</b>:' % _("Dots Grid Parameters"))
grid_lay.addWidget(self.dots_label, 8, 0, 1, 2) grid_lay.addWidget(self.dots_label, 18, 0, 1, 2)
# Dot diameter # # Dot diameter #
self.dotdia_label = QtWidgets.QLabel('%s:' % _("Dia")) self.dotdia_label = FCLabel('%s:' % _("Dia"))
self.dotdia_label.setToolTip( self.dotdia_label.setToolTip(
_("Dot diameter in Dots Grid.") _("Dot diameter in Dots Grid.")
) )
self.dot_dia_entry = FCDoubleSpinner() self.dot_dia_entry = FCDoubleSpinner()
self.dot_dia_entry.set_range(0.0, 9999.9999) self.dot_dia_entry.set_range(0.0, 10000.0000)
self.dot_dia_entry.set_precision(self.decimals) self.dot_dia_entry.set_precision(self.decimals)
self.dot_dia_entry.setSingleStep(0.1) self.dot_dia_entry.setSingleStep(0.1)
grid_lay.addWidget(self.dotdia_label, 9, 0) grid_lay.addWidget(self.dotdia_label, 20, 0)
grid_lay.addWidget(self.dot_dia_entry, 9, 1) grid_lay.addWidget(self.dot_dia_entry, 20, 1)
# Dot spacing # # Dot spacing #
self.dotspacing_label = QtWidgets.QLabel('%s:' % _("Spacing")) self.dotspacing_label = FCLabel('%s:' % _("Spacing"))
self.dotspacing_label.setToolTip( self.dotspacing_label.setToolTip(
_("Distance between each two dots in Dots Grid.") _("Distance between each two dots in Dots Grid.")
) )
self.dot_spacing_entry = FCDoubleSpinner() self.dot_spacing_entry = FCDoubleSpinner()
self.dot_spacing_entry.set_range(0.0, 9999.9999) self.dot_spacing_entry.set_range(0.0, 10000.0000)
self.dot_spacing_entry.set_precision(self.decimals) self.dot_spacing_entry.set_precision(self.decimals)
self.dot_spacing_entry.setSingleStep(0.1) self.dot_spacing_entry.setSingleStep(0.1)
grid_lay.addWidget(self.dotspacing_label, 10, 0) grid_lay.addWidget(self.dotspacing_label, 22, 0)
grid_lay.addWidget(self.dot_spacing_entry, 10, 1) grid_lay.addWidget(self.dot_spacing_entry, 22, 1)
self.squares_label = QtWidgets.QLabel('<b>%s</b>:' % _("Squares Grid Parameters")) self.squares_label = FCLabel('<b>%s</b>:' % _("Squares Grid Parameters"))
grid_lay.addWidget(self.squares_label, 11, 0, 1, 2) grid_lay.addWidget(self.squares_label, 24, 0, 1, 2)
# Square Size # # Square Size #
self.square_size_label = QtWidgets.QLabel('%s:' % _("Size")) self.square_size_label = FCLabel('%s:' % _("Size"))
self.square_size_label.setToolTip( self.square_size_label.setToolTip(
_("Square side size in Squares Grid.") _("Square side size in Squares Grid.")
) )
self.square_size_entry = FCDoubleSpinner() self.square_size_entry = FCDoubleSpinner()
self.square_size_entry.set_range(0.0, 9999.9999) self.square_size_entry.set_range(0.0, 10000.0000)
self.square_size_entry.set_precision(self.decimals) self.square_size_entry.set_precision(self.decimals)
self.square_size_entry.setSingleStep(0.1) self.square_size_entry.setSingleStep(0.1)
grid_lay.addWidget(self.square_size_label, 12, 0) grid_lay.addWidget(self.square_size_label, 26, 0)
grid_lay.addWidget(self.square_size_entry, 12, 1) grid_lay.addWidget(self.square_size_entry, 26, 1)
# Squares spacing # # Squares spacing #
self.squares_spacing_label = QtWidgets.QLabel('%s:' % _("Spacing")) self.squares_spacing_label = FCLabel('%s:' % _("Spacing"))
self.squares_spacing_label.setToolTip( self.squares_spacing_label.setToolTip(
_("Distance between each two squares in Squares Grid.") _("Distance between each two squares in Squares Grid.")
) )
self.squares_spacing_entry = FCDoubleSpinner() self.squares_spacing_entry = FCDoubleSpinner()
self.squares_spacing_entry.set_range(0.0, 9999.9999) self.squares_spacing_entry.set_range(0.0, 10000.0000)
self.squares_spacing_entry.set_precision(self.decimals) self.squares_spacing_entry.set_precision(self.decimals)
self.squares_spacing_entry.setSingleStep(0.1) self.squares_spacing_entry.setSingleStep(0.1)
grid_lay.addWidget(self.squares_spacing_label, 13, 0) grid_lay.addWidget(self.squares_spacing_label, 28, 0)
grid_lay.addWidget(self.squares_spacing_entry, 13, 1) grid_lay.addWidget(self.squares_spacing_entry, 28, 1)
self.lines_label = QtWidgets.QLabel('<b>%s</b>:' % _("Lines Grid Parameters")) self.lines_label = FCLabel('<b>%s</b>:' % _("Lines Grid Parameters"))
grid_lay.addWidget(self.lines_label, 14, 0, 1, 2) grid_lay.addWidget(self.lines_label, 30, 0, 1, 2)
# Square Size # # Square Size #
self.line_size_label = QtWidgets.QLabel('%s:' % _("Size")) self.line_size_label = FCLabel('%s:' % _("Size"))
self.line_size_label.setToolTip( self.line_size_label.setToolTip(
_("Line thickness size in Lines Grid.") _("Line thickness size in Lines Grid.")
) )
self.line_size_entry = FCDoubleSpinner() self.line_size_entry = FCDoubleSpinner()
self.line_size_entry.set_range(0.0, 9999.9999) self.line_size_entry.set_range(0.0, 10000.0000)
self.line_size_entry.set_precision(self.decimals) self.line_size_entry.set_precision(self.decimals)
self.line_size_entry.setSingleStep(0.1) self.line_size_entry.setSingleStep(0.1)
grid_lay.addWidget(self.line_size_label, 15, 0) grid_lay.addWidget(self.line_size_label, 32, 0)
grid_lay.addWidget(self.line_size_entry, 15, 1) grid_lay.addWidget(self.line_size_entry, 32, 1)
# Lines spacing # # Lines spacing #
self.lines_spacing_label = QtWidgets.QLabel('%s:' % _("Spacing")) self.lines_spacing_label = FCLabel('%s:' % _("Spacing"))
self.lines_spacing_label.setToolTip( self.lines_spacing_label.setToolTip(
_("Distance between each two lines in Lines Grid.") _("Distance between each two lines in Lines Grid.")
) )
self.lines_spacing_entry = FCDoubleSpinner() self.lines_spacing_entry = FCDoubleSpinner()
self.lines_spacing_entry.set_range(0.0, 9999.9999) self.lines_spacing_entry.set_range(0.0, 10000.0000)
self.lines_spacing_entry.set_precision(self.decimals) self.lines_spacing_entry.set_precision(self.decimals)
self.lines_spacing_entry.setSingleStep(0.1) self.lines_spacing_entry.setSingleStep(0.1)
grid_lay.addWidget(self.lines_spacing_label, 16, 0) grid_lay.addWidget(self.lines_spacing_label, 34, 0)
grid_lay.addWidget(self.lines_spacing_entry, 16, 1) grid_lay.addWidget(self.lines_spacing_entry, 34, 1)
self.robber_bar_label = QtWidgets.QLabel('<b>%s</b>' % _('Robber Bar Parameters')) self.robber_bar_label = FCLabel('<b>%s</b>' % _('Robber Bar Parameters'))
self.robber_bar_label.setToolTip( self.robber_bar_label.setToolTip(
_("Parameters used for the robber bar.\n" _("Parameters used for the robber bar.\n"
"Robber bar = copper border to help in pattern hole plating.") "Robber bar = copper border to help in pattern hole plating.")
) )
grid_lay.addWidget(self.robber_bar_label, 17, 0, 1, 2) grid_lay.addWidget(self.robber_bar_label, 36, 0, 1, 2)
# ROBBER BAR MARGIN # # ROBBER BAR MARGIN #
self.rb_margin_label = QtWidgets.QLabel('%s:' % _("Margin")) self.rb_margin_label = FCLabel('%s:' % _("Margin"))
self.rb_margin_label.setToolTip( self.rb_margin_label.setToolTip(
_("Bounding box margin for robber bar.") _("Bounding box margin for robber bar.")
) )
self.rb_margin_entry = FCDoubleSpinner() self.rb_margin_entry = FCDoubleSpinner()
self.rb_margin_entry.set_range(-9999.9999, 9999.9999) self.rb_margin_entry.set_range(-10000.0000, 10000.0000)
self.rb_margin_entry.set_precision(self.decimals) self.rb_margin_entry.set_precision(self.decimals)
self.rb_margin_entry.setSingleStep(0.1) self.rb_margin_entry.setSingleStep(0.1)
grid_lay.addWidget(self.rb_margin_label, 18, 0) grid_lay.addWidget(self.rb_margin_label, 38, 0)
grid_lay.addWidget(self.rb_margin_entry, 18, 1) grid_lay.addWidget(self.rb_margin_entry, 38, 1)
# THICKNESS # # THICKNESS #
self.rb_thickness_label = QtWidgets.QLabel('%s:' % _("Thickness")) self.rb_thickness_label = FCLabel('%s:' % _("Thickness"))
self.rb_thickness_label.setToolTip( self.rb_thickness_label.setToolTip(
_("The robber bar thickness.") _("The robber bar thickness.")
) )
self.rb_thickness_entry = FCDoubleSpinner() self.rb_thickness_entry = FCDoubleSpinner()
self.rb_thickness_entry.set_range(0.0000, 9999.9999) self.rb_thickness_entry.set_range(0.0000, 10000.0000)
self.rb_thickness_entry.set_precision(self.decimals) self.rb_thickness_entry.set_precision(self.decimals)
self.rb_thickness_entry.setSingleStep(0.1) self.rb_thickness_entry.setSingleStep(0.1)
grid_lay.addWidget(self.rb_thickness_label, 19, 0) grid_lay.addWidget(self.rb_thickness_label, 40, 0)
grid_lay.addWidget(self.rb_thickness_entry, 19, 1) grid_lay.addWidget(self.rb_thickness_entry, 40, 1)
self.patern_mask_label = QtWidgets.QLabel('<b>%s</b>' % _('Pattern Plating Mask')) self.patern_mask_label = FCLabel('<b>%s</b>' % _('Pattern Plating Mask'))
self.patern_mask_label.setToolTip( self.patern_mask_label.setToolTip(
_("Generate a mask for pattern plating.") _("Generate a mask for pattern plating.")
) )
grid_lay.addWidget(self.patern_mask_label, 20, 0, 1, 2) grid_lay.addWidget(self.patern_mask_label, 42, 0, 1, 2)
# Openings CLEARANCE # # Openings CLEARANCE #
self.clearance_ppm_label = QtWidgets.QLabel('%s:' % _("Clearance")) self.clearance_ppm_label = FCLabel('%s:' % _("Clearance"))
self.clearance_ppm_label.setToolTip( self.clearance_ppm_label.setToolTip(
_("The distance between the possible copper thieving elements\n" _("The distance between the possible copper thieving elements\n"
"and/or robber bar and the actual openings in the mask.") "and/or robber bar and the actual openings in the mask.")
) )
self.clearance_ppm_entry = FCDoubleSpinner() self.clearance_ppm_entry = FCDoubleSpinner()
self.clearance_ppm_entry.set_range(-9999.9999, 9999.9999) self.clearance_ppm_entry.set_range(-10000.0000, 10000.0000)
self.clearance_ppm_entry.set_precision(self.decimals) self.clearance_ppm_entry.set_precision(self.decimals)
self.clearance_ppm_entry.setSingleStep(0.1) self.clearance_ppm_entry.setSingleStep(0.1)
grid_lay.addWidget(self.clearance_ppm_label, 21, 0) grid_lay.addWidget(self.clearance_ppm_label, 44, 0)
grid_lay.addWidget(self.clearance_ppm_entry, 21, 1) grid_lay.addWidget(self.clearance_ppm_entry, 44, 1)
# Include geometry
self.ppm_choice_label = FCLabel('%s:' % _("Add"))
self.ppm_choice_label.setToolTip(
_("Choose which additional geometry to include, if available.")
)
self.ppm_choice_radio = RadioSet([
{"label": _("Both"), "value": "b"},
{'label': _('Thieving'), 'value': 't'},
{"label": _("Robber bar"), "value": "r"},
{"label": _("None"), "value": "n"}
], orientation='vertical', stretch=False)
grid_lay.addWidget(self.ppm_choice_label, 46, 0)
grid_lay.addWidget(self.ppm_choice_radio, 46, 1)
self.layout.addStretch() self.layout.addStretch()

View File

@ -64,7 +64,7 @@ class Tools2CalPrefGroupUI(OptionsGroupUI):
) )
self.travelz_entry = FCDoubleSpinner() self.travelz_entry = FCDoubleSpinner()
self.travelz_entry.set_range(-9999.9999, 9999.9999) self.travelz_entry.set_range(-10000.0000, 10000.0000)
self.travelz_entry.set_precision(self.decimals) self.travelz_entry.set_precision(self.decimals)
self.travelz_entry.setSingleStep(0.1) self.travelz_entry.setSingleStep(0.1)
@ -78,7 +78,7 @@ class Tools2CalPrefGroupUI(OptionsGroupUI):
) )
self.verz_entry = FCDoubleSpinner() self.verz_entry = FCDoubleSpinner()
self.verz_entry.set_range(-9999.9999, 9999.9999) self.verz_entry.set_range(-10000.0000, 10000.0000)
self.verz_entry.set_precision(self.decimals) self.verz_entry.set_precision(self.decimals)
self.verz_entry.setSingleStep(0.1) self.verz_entry.setSingleStep(0.1)
@ -101,7 +101,7 @@ class Tools2CalPrefGroupUI(OptionsGroupUI):
) )
self.toolchangez_entry = FCDoubleSpinner() self.toolchangez_entry = FCDoubleSpinner()
self.toolchangez_entry.set_range(0.0000, 9999.9999) self.toolchangez_entry.set_range(0.0000, 10000.0000)
self.toolchangez_entry.set_precision(self.decimals) self.toolchangez_entry.set_precision(self.decimals)
self.toolchangez_entry.setSingleStep(0.1) self.toolchangez_entry.setSingleStep(0.1)

View File

@ -126,7 +126,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
# Diameter value # Diameter value
self.dia_entry = FCDoubleSpinner() self.dia_entry = FCDoubleSpinner()
self.dia_entry.set_precision(self.decimals) self.dia_entry.set_precision(self.decimals)
self.dia_entry.set_range(0.0000, 9999.9999) self.dia_entry.set_range(0.0000, 10000.0000)
self.dia_label = QtWidgets.QLabel('%s:' % _("Value")) self.dia_label = QtWidgets.QLabel('%s:' % _("Value"))
self.dia_label.setToolTip( self.dia_label.setToolTip(
@ -153,7 +153,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
self.circular_ring_entry = FCDoubleSpinner() self.circular_ring_entry = FCDoubleSpinner()
self.circular_ring_entry.set_precision(self.decimals) self.circular_ring_entry.set_precision(self.decimals)
self.circular_ring_entry.set_range(0.0000, 9999.9999) self.circular_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.circular_ring_label, 14, 0) grid_lay.addWidget(self.circular_ring_label, 14, 0)
grid_lay.addWidget(self.circular_ring_entry, 14, 1) grid_lay.addWidget(self.circular_ring_entry, 14, 1)
@ -166,7 +166,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
self.oblong_ring_entry = FCDoubleSpinner() self.oblong_ring_entry = FCDoubleSpinner()
self.oblong_ring_entry.set_precision(self.decimals) self.oblong_ring_entry.set_precision(self.decimals)
self.oblong_ring_entry.set_range(0.0000, 9999.9999) self.oblong_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.oblong_ring_label, 15, 0) grid_lay.addWidget(self.oblong_ring_label, 15, 0)
grid_lay.addWidget(self.oblong_ring_entry, 15, 1) grid_lay.addWidget(self.oblong_ring_entry, 15, 1)
@ -179,7 +179,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
self.square_ring_entry = FCDoubleSpinner() self.square_ring_entry = FCDoubleSpinner()
self.square_ring_entry.set_precision(self.decimals) self.square_ring_entry.set_precision(self.decimals)
self.square_ring_entry.set_range(0.0000, 9999.9999) self.square_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.square_ring_label, 16, 0) grid_lay.addWidget(self.square_ring_label, 16, 0)
grid_lay.addWidget(self.square_ring_entry, 16, 1) grid_lay.addWidget(self.square_ring_entry, 16, 1)
@ -192,7 +192,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
self.rectangular_ring_entry = FCDoubleSpinner() self.rectangular_ring_entry = FCDoubleSpinner()
self.rectangular_ring_entry.set_precision(self.decimals) self.rectangular_ring_entry.set_precision(self.decimals)
self.rectangular_ring_entry.set_range(0.0000, 9999.9999) self.rectangular_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.rectangular_ring_label, 17, 0) grid_lay.addWidget(self.rectangular_ring_label, 17, 0)
grid_lay.addWidget(self.rectangular_ring_entry, 17, 1) grid_lay.addWidget(self.rectangular_ring_entry, 17, 1)
@ -205,7 +205,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
self.other_ring_entry = FCDoubleSpinner() self.other_ring_entry = FCDoubleSpinner()
self.other_ring_entry.set_precision(self.decimals) self.other_ring_entry.set_precision(self.decimals)
self.other_ring_entry.set_range(0.0000, 9999.9999) self.other_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.other_ring_label, 18, 0) grid_lay.addWidget(self.other_ring_label, 18, 0)
grid_lay.addWidget(self.other_ring_entry, 18, 1) grid_lay.addWidget(self.other_ring_entry, 18, 1)

View File

@ -61,7 +61,7 @@ class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
_("Bounding box margin.") _("Bounding box margin.")
) )
self.margin_entry = FCDoubleSpinner() self.margin_entry = FCDoubleSpinner()
self.margin_entry.set_range(-9999.9999, 9999.9999) self.margin_entry.set_range(-10000.0000, 10000.0000)
self.margin_entry.set_precision(self.decimals) self.margin_entry.set_precision(self.decimals)
self.margin_entry.setSingleStep(0.1) self.margin_entry.setSingleStep(0.1)
@ -125,7 +125,7 @@ class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
_("Bounding box margin.") _("Bounding box margin.")
) )
self.line_thickness_entry = FCDoubleSpinner() self.line_thickness_entry = FCDoubleSpinner()
self.line_thickness_entry.set_range(0.00001, 9999.9999) self.line_thickness_entry.set_range(0.00001, 10000.0000)
self.line_thickness_entry.set_precision(self.decimals) self.line_thickness_entry.set_precision(self.decimals)
self.line_thickness_entry.setSingleStep(0.1) self.line_thickness_entry.setSingleStep(0.1)

View File

@ -49,7 +49,7 @@ class Tools2InvertPrefGroupUI(OptionsGroupUI):
) )
self.margin_entry = FCDoubleSpinner() self.margin_entry = FCDoubleSpinner()
self.margin_entry.set_precision(self.decimals) self.margin_entry.set_precision(self.decimals)
self.margin_entry.set_range(0.0000, 9999.9999) self.margin_entry.set_range(0.0000, 10000.0000)
self.margin_entry.setObjectName(_("Margin")) self.margin_entry.setObjectName(_("Margin"))
grid0.addWidget(self.margin_label, 2, 0, 1, 2) grid0.addWidget(self.margin_label, 2, 0, 1, 2)

View File

@ -128,7 +128,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
# Diameter value # Diameter value
self.dia_entry = FCDoubleSpinner() self.dia_entry = FCDoubleSpinner()
self.dia_entry.set_precision(self.decimals) self.dia_entry.set_precision(self.decimals)
self.dia_entry.set_range(0.0000, 9999.9999) self.dia_entry.set_range(0.0000, 10000.0000)
self.dia_label = QtWidgets.QLabel('%s:' % _("Value")) self.dia_label = QtWidgets.QLabel('%s:' % _("Value"))
self.dia_label.setToolTip( self.dia_label.setToolTip(
@ -155,7 +155,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
self.circular_ring_entry = FCDoubleSpinner() self.circular_ring_entry = FCDoubleSpinner()
self.circular_ring_entry.set_precision(self.decimals) self.circular_ring_entry.set_precision(self.decimals)
self.circular_ring_entry.set_range(0.0000, 9999.9999) self.circular_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.circular_ring_label, 14, 0) grid_lay.addWidget(self.circular_ring_label, 14, 0)
grid_lay.addWidget(self.circular_ring_entry, 14, 1) grid_lay.addWidget(self.circular_ring_entry, 14, 1)
@ -168,7 +168,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
self.oblong_ring_entry = FCDoubleSpinner() self.oblong_ring_entry = FCDoubleSpinner()
self.oblong_ring_entry.set_precision(self.decimals) self.oblong_ring_entry.set_precision(self.decimals)
self.oblong_ring_entry.set_range(0.0000, 9999.9999) self.oblong_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.oblong_ring_label, 15, 0) grid_lay.addWidget(self.oblong_ring_label, 15, 0)
grid_lay.addWidget(self.oblong_ring_entry, 15, 1) grid_lay.addWidget(self.oblong_ring_entry, 15, 1)
@ -181,7 +181,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
self.square_ring_entry = FCDoubleSpinner() self.square_ring_entry = FCDoubleSpinner()
self.square_ring_entry.set_precision(self.decimals) self.square_ring_entry.set_precision(self.decimals)
self.square_ring_entry.set_range(0.0000, 9999.9999) self.square_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.square_ring_label, 16, 0) grid_lay.addWidget(self.square_ring_label, 16, 0)
grid_lay.addWidget(self.square_ring_entry, 16, 1) grid_lay.addWidget(self.square_ring_entry, 16, 1)
@ -194,7 +194,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
self.rectangular_ring_entry = FCDoubleSpinner() self.rectangular_ring_entry = FCDoubleSpinner()
self.rectangular_ring_entry.set_precision(self.decimals) self.rectangular_ring_entry.set_precision(self.decimals)
self.rectangular_ring_entry.set_range(0.0000, 9999.9999) self.rectangular_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.rectangular_ring_label, 17, 0) grid_lay.addWidget(self.rectangular_ring_label, 17, 0)
grid_lay.addWidget(self.rectangular_ring_entry, 17, 1) grid_lay.addWidget(self.rectangular_ring_entry, 17, 1)
@ -207,7 +207,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
self.other_ring_entry = FCDoubleSpinner() self.other_ring_entry = FCDoubleSpinner()
self.other_ring_entry.set_precision(self.decimals) self.other_ring_entry.set_precision(self.decimals)
self.other_ring_entry.set_range(0.0000, 9999.9999) self.other_ring_entry.set_range(0.0000, 10000.0000)
grid_lay.addWidget(self.other_ring_label, 18, 0) grid_lay.addWidget(self.other_ring_label, 18, 0)
grid_lay.addWidget(self.other_ring_entry, 18, 1) grid_lay.addWidget(self.other_ring_entry, 18, 1)

View File

@ -40,7 +40,7 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
# ## Drill diameter for alignment holes # ## Drill diameter for alignment holes
self.drill_dia_entry = FCDoubleSpinner() self.drill_dia_entry = FCDoubleSpinner()
self.drill_dia_entry.set_range(0.000001, 9999.9999) self.drill_dia_entry.set_range(0.000001, 10000.0000)
self.drill_dia_entry.set_precision(self.decimals) self.drill_dia_entry.set_precision(self.decimals)
self.drill_dia_entry.setSingleStep(0.1) self.drill_dia_entry.setSingleStep(0.1)

View File

@ -1,7 +1,7 @@
from PyQt5 import QtWidgets from PyQt5 import QtWidgets
from PyQt5.QtCore import QSettings from PyQt5.QtCore import QSettings
from appGUI.GUIElements import FCDoubleSpinner from appGUI.GUIElements import FCDoubleSpinner, FCLabel
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext import gettext
@ -28,7 +28,7 @@ class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
self.decimals = decimals self.decimals = decimals
# ## V-shape Calculator Tool # ## V-shape Calculator Tool
self.vshape_tool_label = QtWidgets.QLabel("<b>%s:</b>" % _("V-Shape Tool Calculator")) self.vshape_tool_label = FCLabel("<b>%s:</b>" % _("V-Shape Tool Calculator"))
self.vshape_tool_label.setToolTip( self.vshape_tool_label.setToolTip(
_("Calculate the tool diameter for a given V-shape tool,\n" _("Calculate the tool diameter for a given V-shape tool,\n"
"having the tip diameter, tip angle and\n" "having the tip diameter, tip angle and\n"
@ -43,11 +43,11 @@ class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
# ## Tip Diameter # ## Tip Diameter
self.tip_dia_entry = FCDoubleSpinner() self.tip_dia_entry = FCDoubleSpinner()
self.tip_dia_entry.set_range(0.000001, 9999.9999) self.tip_dia_entry.set_range(0.000001, 10000.0000)
self.tip_dia_entry.set_precision(self.decimals) self.tip_dia_entry.set_precision(self.decimals)
self.tip_dia_entry.setSingleStep(0.1) self.tip_dia_entry.setSingleStep(0.1)
self.tip_dia_label = QtWidgets.QLabel('%s:' % _("Tip Diameter")) self.tip_dia_label = FCLabel('%s:' % _("Tip Diameter"))
self.tip_dia_label.setToolTip( self.tip_dia_label.setToolTip(
_("This is the tool tip diameter.\n" _("This is the tool tip diameter.\n"
"It is specified by manufacturer.") "It is specified by manufacturer.")
@ -61,30 +61,30 @@ class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
self.tip_angle_entry.set_precision(self.decimals) self.tip_angle_entry.set_precision(self.decimals)
self.tip_angle_entry.setSingleStep(5) self.tip_angle_entry.setSingleStep(5)
self.tip_angle_label = QtWidgets.QLabel('%s:' % _("Tip Angle")) self.tip_angle_label = FCLabel('%s:' % _("Tip Angle"))
self.tip_angle_label.setToolTip( self.tip_angle_label.setToolTip(
_("This is the angle on the tip of the tool.\n" _("This is the angle on the tip of the tool.\n"
"It is specified by manufacturer.") "It is specified by manufacturer.")
) )
grid0.addWidget(self.tip_angle_label, 1, 0) grid0.addWidget(self.tip_angle_label, 2, 0)
grid0.addWidget(self.tip_angle_entry, 1, 1) grid0.addWidget(self.tip_angle_entry, 2, 1)
# ## Depth-of-cut Cut Z # ## Depth-of-cut Cut Z
self.cut_z_entry = FCDoubleSpinner() self.cut_z_entry = FCDoubleSpinner()
self.cut_z_entry.set_range(-9999.9999, 0.0000) self.cut_z_entry.set_range(-10000.0000, 0.0000)
self.cut_z_entry.set_precision(self.decimals) self.cut_z_entry.set_precision(self.decimals)
self.cut_z_entry.setSingleStep(0.01) self.cut_z_entry.setSingleStep(0.01)
self.cut_z_label = QtWidgets.QLabel('%s:' % _("Cut Z")) self.cut_z_label = FCLabel('%s:' % _("Cut Z"))
self.cut_z_label.setToolTip( self.cut_z_label.setToolTip(
_("This is depth to cut into material.\n" _("This is depth to cut into material.\n"
"In the CNCJob object it is the CutZ parameter.") "In the CNCJob object it is the CutZ parameter.")
) )
grid0.addWidget(self.cut_z_label, 2, 0) grid0.addWidget(self.cut_z_label, 4, 0)
grid0.addWidget(self.cut_z_entry, 2, 1) grid0.addWidget(self.cut_z_entry, 4, 1)
# ## Electroplating Calculator Tool # ## Electroplating Calculator Tool
self.plate_title_label = QtWidgets.QLabel("<b>%s:</b>" % _("ElectroPlating Calculator")) self.plate_title_label = FCLabel("<b>%s:</b>" % _("ElectroPlating Calculator"))
self.plate_title_label.setToolTip( self.plate_title_label.setToolTip(
_("This calculator is useful for those who plate the via/pad/drill holes,\n" _("This calculator is useful for those who plate the via/pad/drill holes,\n"
"using a method like graphite ink or calcium hypophosphite ink or palladium chloride.") "using a method like graphite ink or calcium hypophosphite ink or palladium chloride.")
@ -93,50 +93,61 @@ class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
# ## PCB Length # ## PCB Length
self.pcblength_entry = FCDoubleSpinner() self.pcblength_entry = FCDoubleSpinner()
self.pcblength_entry.set_range(0.000001, 9999.9999) self.pcblength_entry.set_range(0.000001, 10000.0000)
self.pcblength_entry.set_precision(self.decimals) self.pcblength_entry.set_precision(self.decimals)
self.pcblength_entry.setSingleStep(0.1) self.pcblength_entry.setSingleStep(0.1)
self.pcblengthlabel = QtWidgets.QLabel('%s:' % _("Board Length")) self.pcblengthlabel = FCLabel('%s:' % _("Board Length"))
self.pcblengthlabel.setToolTip(_('This is the board length. In centimeters.')) self.pcblengthlabel.setToolTip(_('This is the board length. In centimeters.'))
grid0.addWidget(self.pcblengthlabel, 4, 0) grid0.addWidget(self.pcblengthlabel, 6, 0)
grid0.addWidget(self.pcblength_entry, 4, 1) grid0.addWidget(self.pcblength_entry, 6, 1)
# ## PCB Width # ## PCB Width
self.pcbwidth_entry = FCDoubleSpinner() self.pcbwidth_entry = FCDoubleSpinner()
self.pcbwidth_entry.set_range(0.000001, 9999.9999) self.pcbwidth_entry.set_range(0.000001, 10000.0000)
self.pcbwidth_entry.set_precision(self.decimals) self.pcbwidth_entry.set_precision(self.decimals)
self.pcbwidth_entry.setSingleStep(0.1) self.pcbwidth_entry.setSingleStep(0.1)
self.pcbwidthlabel = QtWidgets.QLabel('%s:' % _("Board Width")) self.pcbwidthlabel = FCLabel('%s:' % _("Board Width"))
self.pcbwidthlabel.setToolTip(_('This is the board width.In centimeters.')) self.pcbwidthlabel.setToolTip(_('This is the board width.In centimeters.'))
grid0.addWidget(self.pcbwidthlabel, 5, 0) grid0.addWidget(self.pcbwidthlabel, 8, 0)
grid0.addWidget(self.pcbwidth_entry, 5, 1) grid0.addWidget(self.pcbwidth_entry, 8, 1)
# AREA
self.area_label = FCLabel('%s:' % _("Area"))
self.area_label.setToolTip(_('This is the board area.'))
self.area_entry = FCDoubleSpinner()
self.area_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.area_entry.set_precision(self.decimals)
self.area_entry.set_range(0.0, 10000.0000)
grid0.addWidget(self.area_label, 10, 0)
grid0.addWidget(self.area_entry, 10, 1)
# ## Current Density # ## Current Density
self.cdensity_label = QtWidgets.QLabel('%s:' % _("Current Density")) self.cdensity_label = FCLabel('%s:' % _("Current Density"))
self.cdensity_entry = FCDoubleSpinner() self.cdensity_entry = FCDoubleSpinner()
self.cdensity_entry.set_range(0.000001, 9999.9999) self.cdensity_entry.set_range(0.000001, 10000.0000)
self.cdensity_entry.set_precision(self.decimals) self.cdensity_entry.set_precision(self.decimals)
self.cdensity_entry.setSingleStep(0.1) self.cdensity_entry.setSingleStep(0.1)
self.cdensity_label.setToolTip(_("Current density to pass through the board. \n" self.cdensity_label.setToolTip(_("Current density to pass through the board. \n"
"In Amps per Square Feet ASF.")) "In Amps per Square Feet ASF."))
grid0.addWidget(self.cdensity_label, 6, 0) grid0.addWidget(self.cdensity_label, 12, 0)
grid0.addWidget(self.cdensity_entry, 6, 1) grid0.addWidget(self.cdensity_entry, 12, 1)
# ## PCB Copper Growth # ## PCB Copper Growth
self.growth_label = QtWidgets.QLabel('%s:' % _("Copper Growth")) self.growth_label = FCLabel('%s:' % _("Copper Growth"))
self.growth_entry = FCDoubleSpinner() self.growth_entry = FCDoubleSpinner()
self.growth_entry.set_range(0.000001, 9999.9999) self.growth_entry.set_range(0.000001, 10000.0000)
self.growth_entry.set_precision(self.decimals) self.growth_entry.set_precision(self.decimals)
self.growth_entry.setSingleStep(0.01) self.growth_entry.setSingleStep(0.01)
self.growth_label.setToolTip(_("How thick the copper growth is intended to be.\n" self.growth_label.setToolTip(_("How thick the copper growth is intended to be.\n"
"In microns.")) "In microns."))
grid0.addWidget(self.growth_label, 7, 0) grid0.addWidget(self.growth_label, 14, 0)
grid0.addWidget(self.growth_entry, 7, 1) grid0.addWidget(self.growth_entry, 14, 1)
self.layout.addStretch() self.layout.addStretch()

View File

@ -72,7 +72,7 @@ class ToolsCornersPrefGroupUI(OptionsGroupUI):
_("Bounding box margin.") _("Bounding box margin.")
) )
self.margin_entry = FCDoubleSpinner() self.margin_entry = FCDoubleSpinner()
self.margin_entry.set_range(-9999.9999, 9999.9999) self.margin_entry.set_range(-10000.0000, 10000.0000)
self.margin_entry.set_precision(self.decimals) self.margin_entry.set_precision(self.decimals)
self.margin_entry.setSingleStep(0.1) self.margin_entry.setSingleStep(0.1)
@ -85,7 +85,7 @@ class ToolsCornersPrefGroupUI(OptionsGroupUI):
_("The length of the line that makes the corner marker.") _("The length of the line that makes the corner marker.")
) )
self.l_entry = FCDoubleSpinner() self.l_entry = FCDoubleSpinner()
self.l_entry.set_range(-9999.9999, 9999.9999) self.l_entry.set_range(-10000.0000, 10000.0000)
self.l_entry.set_precision(self.decimals) self.l_entry.set_precision(self.decimals)
self.l_entry.setSingleStep(10 ** -self.decimals) self.l_entry.setSingleStep(10 ** -self.decimals)

View File

@ -47,7 +47,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
) )
self.cutout_tooldia_entry = FCDoubleSpinner() self.cutout_tooldia_entry = FCDoubleSpinner()
self.cutout_tooldia_entry.set_range(0.000001, 9999.9999) self.cutout_tooldia_entry.set_range(0.000001, 10000.0000)
self.cutout_tooldia_entry.set_precision(self.decimals) self.cutout_tooldia_entry.set_precision(self.decimals)
self.cutout_tooldia_entry.setSingleStep(0.1) self.cutout_tooldia_entry.setSingleStep(0.1)
@ -66,9 +66,9 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.cutz_entry.setRange(-9999.9999, 0.0000) self.cutz_entry.setRange(-10000.0000, 0.0000)
else: else:
self.cutz_entry.setRange(-9999.9999, 9999.9999) self.cutz_entry.setRange(-10000.0000, 10000.0000)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
@ -88,7 +88,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
self.maxdepth_entry = FCDoubleSpinner() self.maxdepth_entry = FCDoubleSpinner()
self.maxdepth_entry.set_precision(self.decimals) self.maxdepth_entry.set_precision(self.decimals)
self.maxdepth_entry.setRange(0, 9999.9999) self.maxdepth_entry.setRange(0, 10000.0000)
self.maxdepth_entry.setSingleStep(0.1) self.maxdepth_entry.setSingleStep(0.1)
self.maxdepth_entry.setToolTip(_("Depth of each pass (positive).")) self.maxdepth_entry.setToolTip(_("Depth of each pass (positive)."))
@ -120,7 +120,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
) )
self.cutout_margin_entry = FCDoubleSpinner() self.cutout_margin_entry = FCDoubleSpinner()
self.cutout_margin_entry.set_range(-9999.9999, 9999.9999) self.cutout_margin_entry.set_range(-10000.0000, 10000.0000)
self.cutout_margin_entry.set_precision(self.decimals) self.cutout_margin_entry.set_precision(self.decimals)
self.cutout_margin_entry.setSingleStep(0.1) self.cutout_margin_entry.setSingleStep(0.1)
@ -137,7 +137,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
) )
self.cutout_gap_entry = FCDoubleSpinner() self.cutout_gap_entry = FCDoubleSpinner()
self.cutout_gap_entry.set_range(0.000001, 9999.9999) self.cutout_gap_entry.set_range(0.000001, 10000.0000)
self.cutout_gap_entry.set_precision(self.decimals) self.cutout_gap_entry.set_precision(self.decimals)
self.cutout_gap_entry.setSingleStep(0.1) self.cutout_gap_entry.setSingleStep(0.1)
@ -174,9 +174,9 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
self.thin_depth_entry = FCDoubleSpinner() self.thin_depth_entry = FCDoubleSpinner()
self.thin_depth_entry.set_precision(self.decimals) self.thin_depth_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.thin_depth_entry.setRange(-9999.9999, -0.00001) self.thin_depth_entry.setRange(-10000.0000, -0.00001)
else: else:
self.thin_depth_entry.setRange(-9999.9999, 9999.9999) self.thin_depth_entry.setRange(-10000.0000, 10000.0000)
self.thin_depth_entry.setSingleStep(0.1) self.thin_depth_entry.setSingleStep(0.1)
grid0.addWidget(self.thin_depth_label, 9, 0) grid0.addWidget(self.thin_depth_label, 9, 0)

View File

@ -63,9 +63,9 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
self.cutz_entry = FCDoubleSpinner() self.cutz_entry = FCDoubleSpinner()
if machinist_setting == 0: if machinist_setting == 0:
self.cutz_entry.set_range(-9999.9999, 0.0000) self.cutz_entry.set_range(-10000.0000, 0.0000)
else: else:
self.cutz_entry.set_range(-9999.9999, 9999.9999) self.cutz_entry.set_range(-10000.0000, 10000.0000)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
@ -86,7 +86,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
self.maxdepth_entry = FCDoubleSpinner() self.maxdepth_entry = FCDoubleSpinner()
self.maxdepth_entry.set_precision(self.decimals) self.maxdepth_entry.set_precision(self.decimals)
self.maxdepth_entry.set_range(0, 9999.9999) self.maxdepth_entry.set_range(0, 10000.0000)
self.maxdepth_entry.setSingleStep(0.1) self.maxdepth_entry.setSingleStep(0.1)
self.maxdepth_entry.setToolTip(_("Depth of each pass (positive).")) self.maxdepth_entry.setToolTip(_("Depth of each pass (positive)."))
@ -105,9 +105,9 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
self.travelz_entry.set_precision(self.decimals) self.travelz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.travelz_entry.set_range(0.0001, 9999.9999) self.travelz_entry.set_range(0.0001, 10000.0000)
else: else:
self.travelz_entry.set_range(-9999.9999, 9999.9999) self.travelz_entry.set_range(-10000.0000, 10000.0000)
grid0.addWidget(travelzlabel, 5, 0) grid0.addWidget(travelzlabel, 5, 0)
grid0.addWidget(self.travelz_entry, 5, 1, 1, 2) grid0.addWidget(self.travelz_entry, 5, 1, 1, 2)
@ -131,9 +131,9 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
self.toolchangez_entry.set_precision(self.decimals) self.toolchangez_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.toolchangez_entry.set_range(0.0001, 9999.9999) self.toolchangez_entry.set_range(0.0001, 10000.0000)
else: else:
self.toolchangez_entry.set_range(-9999.9999, 9999.9999) self.toolchangez_entry.set_range(-10000.0000, 10000.0000)
grid0.addWidget(toolchangezlabel, 7, 0) grid0.addWidget(toolchangezlabel, 7, 0)
grid0.addWidget(self.toolchangez_entry, 7, 1, 1, 2) grid0.addWidget(self.toolchangez_entry, 7, 1, 1, 2)
@ -148,9 +148,9 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
self.endz_entry.set_precision(self.decimals) self.endz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.endz_entry.set_range(0.0000, 9999.9999) self.endz_entry.set_range(0.0000, 10000.0000)
else: else:
self.endz_entry.set_range(-9999.9999, 9999.9999) self.endz_entry.set_range(-10000.0000, 10000.0000)
grid0.addWidget(endz_label, 8, 0) grid0.addWidget(endz_label, 8, 0)
grid0.addWidget(self.endz_entry, 8, 1, 1, 2) grid0.addWidget(self.endz_entry, 8, 1, 1, 2)
@ -177,7 +177,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
) )
self.feedrate_z_entry = FCDoubleSpinner() self.feedrate_z_entry = FCDoubleSpinner()
self.feedrate_z_entry.set_precision(self.decimals) self.feedrate_z_entry.set_precision(self.decimals)
self.feedrate_z_entry.set_range(0, 99999.9999) self.feedrate_z_entry.set_range(0, 910000.0000)
grid0.addWidget(frlabel, 10, 0) grid0.addWidget(frlabel, 10, 0)
grid0.addWidget(self.feedrate_z_entry, 10, 1, 1, 2) grid0.addWidget(self.feedrate_z_entry, 10, 1, 1, 2)
@ -210,7 +210,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
dwelltime.setToolTip(_("Number of time units for spindle to dwell.")) dwelltime.setToolTip(_("Number of time units for spindle to dwell."))
self.dwelltime_entry = FCDoubleSpinner() self.dwelltime_entry = FCDoubleSpinner()
self.dwelltime_entry.set_precision(self.decimals) self.dwelltime_entry.set_precision(self.decimals)
self.dwelltime_entry.set_range(0, 99999.9999) self.dwelltime_entry.set_range(0, 910000.0000)
grid0.addWidget(dwelltime, 13, 0) grid0.addWidget(dwelltime, 13, 0)
grid0.addWidget(self.dwelltime_entry, 13, 1, 1, 2) grid0.addWidget(self.dwelltime_entry, 13, 1, 1, 2)
@ -255,7 +255,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
self.drill_overlap_entry = FCDoubleSpinner() self.drill_overlap_entry = FCDoubleSpinner()
self.drill_overlap_entry.set_precision(self.decimals) self.drill_overlap_entry.set_precision(self.decimals)
self.drill_overlap_entry.set_range(0.0, 9999.9999) self.drill_overlap_entry.set_range(0.0, 10000.0000)
self.drill_overlap_entry.setSingleStep(0.1) self.drill_overlap_entry.setSingleStep(0.1)
grid0.addWidget(self.drill_overlap_label, 22, 0) grid0.addWidget(self.drill_overlap_label, 22, 0)
@ -325,7 +325,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
) )
self.feedrate_rapid_entry = FCDoubleSpinner() self.feedrate_rapid_entry = FCDoubleSpinner()
self.feedrate_rapid_entry.set_precision(self.decimals) self.feedrate_rapid_entry.set_precision(self.decimals)
self.feedrate_rapid_entry.set_range(0, 99999.9999) self.feedrate_rapid_entry.set_range(0, 910000.0000)
grid0.addWidget(fr_rapid_label, 35, 0) grid0.addWidget(fr_rapid_label, 35, 0)
grid0.addWidget(self.feedrate_rapid_entry, 35, 1, 1, 2) grid0.addWidget(self.feedrate_rapid_entry, 35, 1, 1, 2)
@ -338,7 +338,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
) )
self.pdepth_entry = FCDoubleSpinner() self.pdepth_entry = FCDoubleSpinner()
self.pdepth_entry.set_precision(self.decimals) self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-99999.9999, 0.0000) self.pdepth_entry.set_range(-910000.0000, 0.0000)
grid0.addWidget(self.pdepth_label, 37, 0) grid0.addWidget(self.pdepth_label, 37, 0)
grid0.addWidget(self.pdepth_entry, 37, 1, 1, 2) grid0.addWidget(self.pdepth_entry, 37, 1, 1, 2)
@ -350,7 +350,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
) )
self.feedrate_probe_entry = FCDoubleSpinner() self.feedrate_probe_entry = FCDoubleSpinner()
self.feedrate_probe_entry.set_precision(self.decimals) self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0, 99999.9999) self.feedrate_probe_entry.set_range(0, 910000.0000)
grid0.addWidget(self.feedrate_probe_label, 38, 0) grid0.addWidget(self.feedrate_probe_label, 38, 0)
grid0.addWidget(self.feedrate_probe_entry, 38, 1, 1, 2) grid0.addWidget(self.feedrate_probe_entry, 38, 1, 1, 2)
@ -444,7 +444,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n" self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n"
"an interdiction area.")) "an interdiction area."))
self.over_z_entry = FCDoubleSpinner() self.over_z_entry = FCDoubleSpinner()
self.over_z_entry.set_range(0.000, 9999.9999) self.over_z_entry.set_range(0.000, 10000.0000)
self.over_z_entry.set_precision(self.decimals) self.over_z_entry.set_precision(self.decimals)
grid0.addWidget(self.over_z_label, 55, 0) grid0.addWidget(self.over_z_label, 55, 0)

View File

@ -65,7 +65,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
# Film Border # Film Border
self.film_boundary_entry = FCDoubleSpinner() self.film_boundary_entry = FCDoubleSpinner()
self.film_boundary_entry.set_precision(self.decimals) self.film_boundary_entry.set_precision(self.decimals)
self.film_boundary_entry.set_range(0, 9999.9999) self.film_boundary_entry.set_range(0, 10000.0000)
self.film_boundary_entry.setSingleStep(0.1) self.film_boundary_entry.setSingleStep(0.1)
self.film_boundary_label = FCLabel('%s:' % _("Border")) self.film_boundary_label = FCLabel('%s:' % _("Border"))
@ -84,7 +84,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
self.film_scale_stroke_entry = FCDoubleSpinner() self.film_scale_stroke_entry = FCDoubleSpinner()
self.film_scale_stroke_entry.set_precision(self.decimals) self.film_scale_stroke_entry.set_precision(self.decimals)
self.film_scale_stroke_entry.set_range(0, 9999.9999) self.film_scale_stroke_entry.set_range(0, 10000.0000)
self.film_scale_stroke_entry.setSingleStep(0.1) self.film_scale_stroke_entry.setSingleStep(0.1)
self.film_scale_stroke_label = FCLabel('%s:' % _("Scale Stroke")) self.film_scale_stroke_label = FCLabel('%s:' % _("Scale Stroke"))

View File

@ -119,7 +119,7 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
) )
self.cutz_entry = FCDoubleSpinner() self.cutz_entry = FCDoubleSpinner()
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
self.cutz_entry.set_range(-9999.9999, 0.0000) self.cutz_entry.set_range(-10000.0000, 0.0000)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
self.cutz_entry.setToolTip( self.cutz_entry.setToolTip(
@ -139,7 +139,7 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
) )
self.newdia_entry = FCDoubleSpinner() self.newdia_entry = FCDoubleSpinner()
self.newdia_entry.set_precision(self.decimals) self.newdia_entry.set_precision(self.decimals)
self.newdia_entry.set_range(0.0001, 9999.9999) self.newdia_entry.set_range(0.0001, 10000.0000)
self.newdia_entry.setSingleStep(0.1) self.newdia_entry.setSingleStep(0.1)
grid0.addWidget(self.newdialabel, 6, 0) grid0.addWidget(self.newdialabel, 6, 0)

View File

@ -102,7 +102,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
) )
self.cutz_entry = FCDoubleSpinner() self.cutz_entry = FCDoubleSpinner()
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
self.cutz_entry.set_range(-9999.9999, 0.0000) self.cutz_entry.set_range(-10000.0000, 0.0000)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
self.cutz_entry.setToolTip( self.cutz_entry.setToolTip(
@ -122,7 +122,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
) )
self.newdia_entry = FCDoubleSpinner() self.newdia_entry = FCDoubleSpinner()
self.newdia_entry.set_precision(self.decimals) self.newdia_entry.set_precision(self.decimals)
self.newdia_entry.set_range(0.0001, 9999.9999) self.newdia_entry.set_range(0.0001, 10000.0000)
self.newdia_entry.setSingleStep(0.1) self.newdia_entry.setSingleStep(0.1)
grid0.addWidget(self.newdialabel, 5, 0) grid0.addWidget(self.newdialabel, 5, 0)
@ -271,7 +271,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
"The value can be between 0.0 and 9999.9 FlatCAM units.") "The value can be between 0.0 and 9999.9 FlatCAM units.")
) )
self.ncc_offset_spinner = FCDoubleSpinner() self.ncc_offset_spinner = FCDoubleSpinner()
self.ncc_offset_spinner.set_range(0.00, 9999.9999) self.ncc_offset_spinner.set_range(0.00, 10000.0000)
self.ncc_offset_spinner.set_precision(self.decimals) self.ncc_offset_spinner.set_precision(self.decimals)
self.ncc_offset_spinner.setWrapping(True) self.ncc_offset_spinner.setWrapping(True)
self.ncc_offset_spinner.setSingleStep(0.1) self.ncc_offset_spinner.setSingleStep(0.1)

View File

@ -78,7 +78,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
_("The tip diameter for V-Shape Tool")) _("The tip diameter for V-Shape Tool"))
self.tipdia_entry = FCDoubleSpinner() self.tipdia_entry = FCDoubleSpinner()
self.tipdia_entry.set_precision(self.decimals) self.tipdia_entry.set_precision(self.decimals)
self.tipdia_entry.set_range(0.0000, 9999.9999) self.tipdia_entry.set_range(0.0000, 10000.0000)
self.tipdia_entry.setSingleStep(0.1) self.tipdia_entry.setSingleStep(0.1)
self.tipdia_entry.setObjectName(_("V-Tip Dia")) self.tipdia_entry.setObjectName(_("V-Tip Dia"))
@ -107,7 +107,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
) )
self.cutz_entry = FCDoubleSpinner() self.cutz_entry = FCDoubleSpinner()
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
self.cutz_entry.set_range(-99999.9999, 0.0000) self.cutz_entry.set_range(-910000.0000, 0.0000)
self.cutz_entry.setObjectName(_("Cut Z")) self.cutz_entry.setObjectName(_("Cut Z"))
self.cutz_entry.setToolTip( self.cutz_entry.setToolTip(
@ -126,7 +126,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
) )
self.newdia_entry = FCDoubleSpinner() self.newdia_entry = FCDoubleSpinner()
self.newdia_entry.set_precision(self.decimals) self.newdia_entry.set_precision(self.decimals)
self.newdia_entry.set_range(0.000, 9999.9999) self.newdia_entry.set_range(0.000, 10000.0000)
self.newdia_entry.setObjectName(_("Tool Dia")) self.newdia_entry.setObjectName(_("Tool Dia"))
grid0.addWidget(self.newdialabel, 5, 0) grid0.addWidget(self.newdialabel, 5, 0)
@ -185,7 +185,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
"be painted.") "be painted.")
) )
self.paintmargin_entry = FCDoubleSpinner() self.paintmargin_entry = FCDoubleSpinner()
self.paintmargin_entry.set_range(-9999.9999, 9999.9999) self.paintmargin_entry.set_range(-10000.0000, 10000.0000)
self.paintmargin_entry.set_precision(self.decimals) self.paintmargin_entry.set_precision(self.decimals)
self.paintmargin_entry.setSingleStep(0.1) self.paintmargin_entry.setSingleStep(0.1)

View File

@ -43,7 +43,7 @@ class ToolsPanelizePrefGroupUI(OptionsGroupUI):
# ## Spacing Columns # ## Spacing Columns
self.pspacing_columns = FCDoubleSpinner() self.pspacing_columns = FCDoubleSpinner()
self.pspacing_columns.set_range(0.000001, 9999.9999) self.pspacing_columns.set_range(0.000001, 10000.0000)
self.pspacing_columns.set_precision(self.decimals) self.pspacing_columns.set_precision(self.decimals)
self.pspacing_columns.setSingleStep(0.1) self.pspacing_columns.setSingleStep(0.1)
@ -57,7 +57,7 @@ class ToolsPanelizePrefGroupUI(OptionsGroupUI):
# ## Spacing Rows # ## Spacing Rows
self.pspacing_rows = FCDoubleSpinner() self.pspacing_rows = FCDoubleSpinner()
self.pspacing_rows.set_range(0.000001, 9999.9999) self.pspacing_rows.set_range(0.000001, 10000.0000)
self.pspacing_rows.set_precision(self.decimals) self.pspacing_rows.set_precision(self.decimals)
self.pspacing_rows.setSingleStep(0.1) self.pspacing_rows.setSingleStep(0.1)
@ -128,7 +128,7 @@ class ToolsPanelizePrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.pconstrain_cb, 10, 0, 1, 2) grid0.addWidget(self.pconstrain_cb, 10, 0, 1, 2)
self.px_width_entry = FCDoubleSpinner() self.px_width_entry = FCDoubleSpinner()
self.px_width_entry.set_range(0.000001, 9999.9999) self.px_width_entry.set_range(0.000001, 10000.0000)
self.px_width_entry.set_precision(self.decimals) self.px_width_entry.set_precision(self.decimals)
self.px_width_entry.setSingleStep(0.1) self.px_width_entry.setSingleStep(0.1)
@ -141,7 +141,7 @@ class ToolsPanelizePrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.px_width_entry, 12, 1) grid0.addWidget(self.px_width_entry, 12, 1)
self.py_height_entry = FCDoubleSpinner() self.py_height_entry = FCDoubleSpinner()
self.py_height_entry.set_range(0.000001, 9999.9999) self.py_height_entry.set_range(0.000001, 10000.0000)
self.py_height_entry.set_precision(self.decimals) self.py_height_entry.set_precision(self.decimals)
self.py_height_entry.setSingleStep(0.1) self.py_height_entry.setSingleStep(0.1)

View File

@ -57,7 +57,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
) )
self.addtool_entry = FCDoubleSpinner() self.addtool_entry = FCDoubleSpinner()
self.addtool_entry.set_precision(self.decimals) self.addtool_entry.set_precision(self.decimals)
self.addtool_entry.set_range(0.0000001, 9999.9999) self.addtool_entry.set_range(0.0000001, 10000.0000)
self.addtool_entry.setSingleStep(0.1) self.addtool_entry.setSingleStep(0.1)
grid0.addWidget(self.addtool_entry_lbl, 1, 0) grid0.addWidget(self.addtool_entry_lbl, 1, 0)
@ -66,7 +66,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Z dispense start # Z dispense start
self.z_start_entry = FCDoubleSpinner() self.z_start_entry = FCDoubleSpinner()
self.z_start_entry.set_precision(self.decimals) self.z_start_entry.set_precision(self.decimals)
self.z_start_entry.set_range(0.0000001, 9999.9999) self.z_start_entry.set_range(0.0000001, 10000.0000)
self.z_start_entry.setSingleStep(0.1) self.z_start_entry.setSingleStep(0.1)
self.z_start_label = QtWidgets.QLabel('%s:' % _("Z Dispense Start")) self.z_start_label = QtWidgets.QLabel('%s:' % _("Z Dispense Start"))
@ -79,7 +79,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Z dispense # Z dispense
self.z_dispense_entry = FCDoubleSpinner() self.z_dispense_entry = FCDoubleSpinner()
self.z_dispense_entry.set_precision(self.decimals) self.z_dispense_entry.set_precision(self.decimals)
self.z_dispense_entry.set_range(0.0000001, 9999.9999) self.z_dispense_entry.set_range(0.0000001, 10000.0000)
self.z_dispense_entry.setSingleStep(0.1) self.z_dispense_entry.setSingleStep(0.1)
self.z_dispense_label = QtWidgets.QLabel('%s:' % _("Z Dispense")) self.z_dispense_label = QtWidgets.QLabel('%s:' % _("Z Dispense"))
@ -92,7 +92,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Z dispense stop # Z dispense stop
self.z_stop_entry = FCDoubleSpinner() self.z_stop_entry = FCDoubleSpinner()
self.z_stop_entry.set_precision(self.decimals) self.z_stop_entry.set_precision(self.decimals)
self.z_stop_entry.set_range(0.0000001, 9999.9999) self.z_stop_entry.set_range(0.0000001, 10000.0000)
self.z_stop_entry.setSingleStep(0.1) self.z_stop_entry.setSingleStep(0.1)
self.z_stop_label = QtWidgets.QLabel('%s:' % _("Z Dispense Stop")) self.z_stop_label = QtWidgets.QLabel('%s:' % _("Z Dispense Stop"))
@ -105,7 +105,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Z travel # Z travel
self.z_travel_entry = FCDoubleSpinner() self.z_travel_entry = FCDoubleSpinner()
self.z_travel_entry.set_precision(self.decimals) self.z_travel_entry.set_precision(self.decimals)
self.z_travel_entry.set_range(0.0000001, 9999.9999) self.z_travel_entry.set_range(0.0000001, 10000.0000)
self.z_travel_entry.setSingleStep(0.1) self.z_travel_entry.setSingleStep(0.1)
self.z_travel_label = QtWidgets.QLabel('%s:' % _("Z Travel")) self.z_travel_label = QtWidgets.QLabel('%s:' % _("Z Travel"))
@ -119,7 +119,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Z toolchange location # Z toolchange location
self.z_toolchange_entry = FCDoubleSpinner() self.z_toolchange_entry = FCDoubleSpinner()
self.z_toolchange_entry.set_precision(self.decimals) self.z_toolchange_entry.set_precision(self.decimals)
self.z_toolchange_entry.set_range(0.0000001, 9999.9999) self.z_toolchange_entry.set_range(0.0000001, 10000.0000)
self.z_toolchange_entry.setSingleStep(0.1) self.z_toolchange_entry.setSingleStep(0.1)
self.z_toolchange_label = QtWidgets.QLabel('%s:' % _("Z Toolchange")) self.z_toolchange_label = QtWidgets.QLabel('%s:' % _("Z Toolchange"))
@ -142,7 +142,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Feedrate X-Y # Feedrate X-Y
self.frxy_entry = FCDoubleSpinner() self.frxy_entry = FCDoubleSpinner()
self.frxy_entry.set_precision(self.decimals) self.frxy_entry.set_precision(self.decimals)
self.frxy_entry.set_range(0.0000001, 99999.9999) self.frxy_entry.set_range(0.0000001, 910000.0000)
self.frxy_entry.setSingleStep(0.1) self.frxy_entry.setSingleStep(0.1)
self.frxy_label = QtWidgets.QLabel('%s:' % _("Feedrate X-Y")) self.frxy_label = QtWidgets.QLabel('%s:' % _("Feedrate X-Y"))
@ -155,7 +155,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Feedrate Z # Feedrate Z
self.frz_entry = FCDoubleSpinner() self.frz_entry = FCDoubleSpinner()
self.frz_entry.set_precision(self.decimals) self.frz_entry.set_precision(self.decimals)
self.frz_entry.set_range(0.0000001, 99999.9999) self.frz_entry.set_range(0.0000001, 910000.0000)
self.frz_entry.setSingleStep(0.1) self.frz_entry.setSingleStep(0.1)
self.frz_label = QtWidgets.QLabel('%s:' % _("Feedrate Z")) self.frz_label = QtWidgets.QLabel('%s:' % _("Feedrate Z"))
@ -169,7 +169,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Feedrate Z Dispense # Feedrate Z Dispense
self.frz_dispense_entry = FCDoubleSpinner() self.frz_dispense_entry = FCDoubleSpinner()
self.frz_dispense_entry.set_precision(self.decimals) self.frz_dispense_entry.set_precision(self.decimals)
self.frz_dispense_entry.set_range(0.0000001, 99999.9999) self.frz_dispense_entry.set_range(0.0000001, 910000.0000)
self.frz_dispense_entry.setSingleStep(0.1) self.frz_dispense_entry.setSingleStep(0.1)
self.frz_dispense_label = QtWidgets.QLabel('%s:' % _("Feedrate Z Dispense")) self.frz_dispense_label = QtWidgets.QLabel('%s:' % _("Feedrate Z Dispense"))
@ -196,7 +196,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Dwell Forward # Dwell Forward
self.dwellfwd_entry = FCDoubleSpinner() self.dwellfwd_entry = FCDoubleSpinner()
self.dwellfwd_entry.set_precision(self.decimals) self.dwellfwd_entry.set_precision(self.decimals)
self.dwellfwd_entry.set_range(0.0000001, 9999.9999) self.dwellfwd_entry.set_range(0.0000001, 10000.0000)
self.dwellfwd_entry.setSingleStep(0.1) self.dwellfwd_entry.setSingleStep(0.1)
self.dwellfwd_label = QtWidgets.QLabel('%s:' % _("Dwell FWD")) self.dwellfwd_label = QtWidgets.QLabel('%s:' % _("Dwell FWD"))
@ -222,7 +222,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# Dwell Reverse # Dwell Reverse
self.dwellrev_entry = FCDoubleSpinner() self.dwellrev_entry = FCDoubleSpinner()
self.dwellrev_entry.set_precision(self.decimals) self.dwellrev_entry.set_precision(self.decimals)
self.dwellrev_entry.set_range(0.0000001, 9999.9999) self.dwellrev_entry.set_range(0.0000001, 10000.0000)
self.dwellrev_entry.setSingleStep(0.1) self.dwellrev_entry.setSingleStep(0.1)
self.dwellrev_label = QtWidgets.QLabel('%s:' % _("Dwell REV")) self.dwellrev_label = QtWidgets.QLabel('%s:' % _("Dwell REV"))

View File

@ -155,7 +155,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.scale_link_cb, 12, 1) grid0.addWidget(self.scale_link_cb, 12, 1)
self.scalex_entry = FCDoubleSpinner() self.scalex_entry = FCDoubleSpinner()
self.scalex_entry.set_range(0, 9999.9999) self.scalex_entry.set_range(0, 10000.0000)
self.scalex_entry.set_precision(self.decimals) self.scalex_entry.set_precision(self.decimals)
self.scalex_entry.setSingleStep(0.1) self.scalex_entry.setSingleStep(0.1)
@ -168,7 +168,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
# ## Scale factor on X axis # ## Scale factor on X axis
self.scaley_entry = FCDoubleSpinner() self.scaley_entry = FCDoubleSpinner()
self.scaley_entry.set_range(0, 9999.9999) self.scaley_entry.set_range(0, 10000.0000)
self.scaley_entry.set_precision(self.decimals) self.scaley_entry.set_precision(self.decimals)
self.scaley_entry.setSingleStep(0.1) self.scaley_entry.setSingleStep(0.1)
@ -184,7 +184,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
grid0.addWidget(offset_title_lbl, 20, 0, 1, 2) grid0.addWidget(offset_title_lbl, 20, 0, 1, 2)
self.offx_entry = FCDoubleSpinner() self.offx_entry = FCDoubleSpinner()
self.offx_entry.set_range(-9999.9999, 9999.9999) self.offx_entry.set_range(-10000.0000, 10000.0000)
self.offx_entry.set_precision(self.decimals) self.offx_entry.set_precision(self.decimals)
self.offx_entry.setSingleStep(0.1) self.offx_entry.setSingleStep(0.1)
@ -197,7 +197,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
# ## Offset distance on Y axis # ## Offset distance on Y axis
self.offy_entry = FCDoubleSpinner() self.offy_entry = FCDoubleSpinner()
self.offy_entry.set_range(-9999.9999, 9999.9999) self.offy_entry.set_range(-10000.0000, 10000.0000)
self.offy_entry.set_precision(self.decimals) self.offy_entry.set_precision(self.decimals)
self.offy_entry.setSingleStep(0.1) self.offy_entry.setSingleStep(0.1)
@ -235,7 +235,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
self.buffer_entry.set_precision(self.decimals) self.buffer_entry.set_precision(self.decimals)
self.buffer_entry.setSingleStep(0.1) self.buffer_entry.setSingleStep(0.1)
self.buffer_entry.setWrapping(True) self.buffer_entry.setWrapping(True)
self.buffer_entry.set_range(-9999.9999, 9999.9999) self.buffer_entry.set_range(-10000.0000, 10000.0000)
grid0.addWidget(self.buffer_label, 28, 0) grid0.addWidget(self.buffer_label, 28, 0)
grid0.addWidget(self.buffer_entry, 28, 1) grid0.addWidget(self.buffer_entry, 28, 1)

View File

@ -7,7 +7,7 @@
from PyQt5 import QtWidgets, QtGui from PyQt5 import QtWidgets, QtGui
from appTool import AppTool from appTool import AppTool
from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, NumericalEvalEntry from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, NumericalEvalEntry, FCLabel, RadioSet, FCButton
import math import math
import gettext import gettext
@ -48,6 +48,8 @@ class ToolCalculator(AppTool):
self.ui.calculate_plate_button.clicked.connect(self.on_calculate_eplate) self.ui.calculate_plate_button.clicked.connect(self.on_calculate_eplate)
self.ui.reset_button.clicked.connect(self.set_tool_ui) self.ui.reset_button.clicked.connect(self.set_tool_ui)
self.ui.area_sel_radio.activated_custom.connect(self.on_area_calculation_radio)
def run(self, toggle=True): def run(self, toggle=True):
self.app.defaults.report_usage("ToolCalculators()") self.app.defaults.report_usage("ToolCalculators()")
@ -80,7 +82,7 @@ class ToolCalculator(AppTool):
AppTool.install(self, icon, separator, shortcut='Alt+C', **kwargs) AppTool.install(self, icon, separator, shortcut='Alt+C', **kwargs)
def set_tool_ui(self): def set_tool_ui(self):
self.units = self.app.defaults['units'].upper() self.units = self.app.defaults['units'].lower()
# ## Initialize form # ## Initialize form
self.ui.mm_entry.set_value('%.*f' % (self.decimals, 0)) self.ui.mm_entry.set_value('%.*f' % (self.decimals, 0))
@ -90,8 +92,10 @@ class ToolCalculator(AppTool):
width = self.app.defaults["tools_calc_electro_width"] width = self.app.defaults["tools_calc_electro_width"]
density = self.app.defaults["tools_calc_electro_cdensity"] density = self.app.defaults["tools_calc_electro_cdensity"]
growth = self.app.defaults["tools_calc_electro_growth"] growth = self.app.defaults["tools_calc_electro_growth"]
self.ui.pcblength_entry.set_value(length) self.ui.pcblength_entry.set_value(length)
self.ui.pcbwidth_entry.set_value(width) self.ui.pcbwidth_entry.set_value(width)
self.ui.area_entry.set_value(self.app.defaults["tools_calc_electro_area"])
self.ui.cdensity_entry.set_value(density) self.ui.cdensity_entry.set_value(density)
self.ui.growth_entry.set_value(growth) self.ui.growth_entry.set_value(growth)
self.ui.cvalue_entry.set_value(0.00) self.ui.cvalue_entry.set_value(0.00)
@ -106,6 +110,35 @@ class ToolCalculator(AppTool):
self.ui.cutDepth_entry.set_value(cut_z) self.ui.cutDepth_entry.set_value(cut_z)
self.ui.effectiveToolDia_entry.set_value('0.0000') self.ui.effectiveToolDia_entry.set_value('0.0000')
self.ui.area_sel_radio.set_value('d')
self.on_area_calculation_radio(val='d')
def on_area_calculation_radio(self, val):
if val == 'a':
self.ui.pcbwidthlabel.hide()
self.ui.pcbwidth_entry.hide()
self.ui.width_unit.hide()
self.ui.pcblengthlabel.hide()
self.ui.pcblength_entry.hide()
self.ui.length_unit.hide()
self.ui.area_label.show()
self.ui.area_entry.show()
self.ui.area_unit.show()
else:
self.ui.pcbwidthlabel.show()
self.ui.pcbwidth_entry.show()
self.ui.width_unit.show()
self.ui.pcblengthlabel.show()
self.ui.pcblength_entry.show()
self.ui.length_unit.show()
self.ui.area_label.hide()
self.ui.area_entry.hide()
self.ui.area_unit.hide()
def on_calculate_tool_dia(self): def on_calculate_tool_dia(self):
# Calculation: # Calculation:
# Manufacturer gives total angle of the the tip but we need only half of it # Manufacturer gives total angle of the the tip but we need only half of it
@ -123,23 +156,29 @@ class ToolCalculator(AppTool):
cut_depth = -cut_depth if cut_depth < 0 else cut_depth cut_depth = -cut_depth if cut_depth < 0 else cut_depth
tool_diameter = tip_diameter + (2 * cut_depth * math.tan(math.radians(half_tip_angle))) tool_diameter = tip_diameter + (2 * cut_depth * math.tan(math.radians(half_tip_angle)))
self.ui.effectiveToolDia_entry.set_value("%.*f" % (self.decimals, tool_diameter)) self.ui.effectiveToolDia_entry.set_value(self.app.dec_format(tool_diameter, self.decimals))
def on_calculate_inch_units(self): def on_calculate_inch_units(self):
mm_val = float(self.mm_entry.get_value()) mm_val = float(self.ui.mm_entry.get_value())
self.ui.inch_entry.set_value('%.*f' % (self.decimals, (mm_val / 25.4))) self.ui.inch_entry.set_value('%.*f' % (self.decimals, (mm_val / 25.4)))
def on_calculate_mm_units(self): def on_calculate_mm_units(self):
inch_val = float(self.inch_entry.get_value()) inch_val = float(self.ui.inch_entry.get_value())
self.ui.mm_entry.set_value('%.*f' % (self.decimals, (inch_val * 25.4))) self.ui.mm_entry.set_value('%.*f' % (self.decimals, (inch_val * 25.4)))
def on_calculate_eplate(self): def on_calculate_eplate(self):
length = float(self.ui.pcblength_entry.get_value()) area_calc_sel = self.ui.area_sel_radio.get_value()
width = float(self.ui.pcbwidth_entry.get_value()) length = self.ui.pcblength_entry.get_value()
density = float(self.ui.cdensity_entry.get_value()) width = self.ui.pcbwidth_entry.get_value()
copper = float(self.ui.growth_entry.get_value()) area = self.ui.area_entry.get_value()
calculated_current = (length * width * density) * 0.0021527820833419 density = self.ui.cdensity_entry.get_value()
copper = self.ui.growth_entry.get_value()
if area_calc_sel == 'd':
calculated_current = (length * width * density) * 0.0021527820833419
else:
calculated_current = (area * density) * 0.0021527820833419
calculated_time = copper * 2.142857142857143 * float(20 / density) calculated_time = copper * 2.142857142857143 * float(20 / density)
self.ui.cvalue_entry.set_value('%.2f' % calculated_current) self.ui.cvalue_entry.set_value('%.2f' % calculated_current)
@ -157,9 +196,10 @@ class CalcUI:
self.app = app self.app = app
self.decimals = self.app.decimals self.decimals = self.app.decimals
self.layout = layout self.layout = layout
self.units = self.app.defaults['units'].lower()
# ## Title # ## Title
title_label = QtWidgets.QLabel("%s" % self.toolName) title_label = FCLabel("%s" % self.toolName)
title_label.setStyleSheet(""" title_label.setStyleSheet("""
QLabel QLabel
{ {
@ -173,19 +213,19 @@ class CalcUI:
# ## Units Calculator # # ## Units Calculator #
# ##################### # #####################
self.unists_spacer_label = QtWidgets.QLabel(" ") self.unists_spacer_label = FCLabel(" ")
self.layout.addWidget(self.unists_spacer_label) self.layout.addWidget(self.unists_spacer_label)
# ## Title of the Units Calculator # ## Title of the Units Calculator
units_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.unitsName) units_label = FCLabel("<font size=3><b>%s</b></font>" % self.unitsName)
self.layout.addWidget(units_label) self.layout.addWidget(units_label)
# Grid Layout # Grid Layout
grid_units_layout = QtWidgets.QGridLayout() grid_units_layout = QtWidgets.QGridLayout()
self.layout.addLayout(grid_units_layout) self.layout.addLayout(grid_units_layout)
inch_label = QtWidgets.QLabel(_("INCH")) inch_label = FCLabel(_("INCH"))
mm_label = QtWidgets.QLabel(_("MM")) mm_label = FCLabel(_("MM"))
grid_units_layout.addWidget(mm_label, 0, 0) grid_units_layout.addWidget(mm_label, 0, 0)
grid_units_layout.addWidget(inch_label, 0, 1) grid_units_layout.addWidget(inch_label, 0, 1)
@ -206,21 +246,21 @@ class CalcUI:
# ############################## # ##############################
# ## V-shape Tool Calculator ### # ## V-shape Tool Calculator ###
# ############################## # ##############################
self.v_shape_spacer_label = QtWidgets.QLabel(" ") self.v_shape_spacer_label = FCLabel(" ")
self.layout.addWidget(self.v_shape_spacer_label) self.layout.addWidget(self.v_shape_spacer_label)
# ## Title of the V-shape Tools Calculator # ## Title of the V-shape Tools Calculator
v_shape_title_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.v_shapeName) v_shape_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.v_shapeName)
self.layout.addWidget(v_shape_title_label) self.layout.addWidget(v_shape_title_label)
# ## Form Layout # ## Form Layout
form_layout = QtWidgets.QFormLayout() form_layout = QtWidgets.QFormLayout()
self.layout.addLayout(form_layout) self.layout.addLayout(form_layout)
self.tipDia_label = QtWidgets.QLabel('%s:' % _("Tip Diameter")) self.tipDia_label = FCLabel('%s:' % _("Tip Diameter"))
self.tipDia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.tipDia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.tipDia_entry.set_precision(self.decimals) self.tipDia_entry.set_precision(self.decimals)
self.tipDia_entry.set_range(0.0, 9999.9999) self.tipDia_entry.set_range(0.0, 10000.0000)
self.tipDia_entry.setSingleStep(0.1) self.tipDia_entry.setSingleStep(0.1)
# self.tipDia_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) # self.tipDia_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
@ -228,7 +268,7 @@ class CalcUI:
_("This is the tool tip diameter.\n" _("This is the tool tip diameter.\n"
"It is specified by manufacturer.") "It is specified by manufacturer.")
) )
self.tipAngle_label = QtWidgets.QLabel('%s:' % _("Tip Angle")) self.tipAngle_label = FCLabel('%s:' % _("Tip Angle"))
self.tipAngle_entry = FCSpinner(callback=self.confirmation_message_int) self.tipAngle_entry = FCSpinner(callback=self.confirmation_message_int)
self.tipAngle_entry.set_range(0, 180) self.tipAngle_entry.set_range(0, 180)
self.tipAngle_entry.set_step(5) self.tipAngle_entry.set_step(5)
@ -237,16 +277,16 @@ class CalcUI:
self.tipAngle_label.setToolTip(_("This is the angle of the tip of the tool.\n" self.tipAngle_label.setToolTip(_("This is the angle of the tip of the tool.\n"
"It is specified by manufacturer.")) "It is specified by manufacturer."))
self.cutDepth_label = QtWidgets.QLabel('%s:' % _("Cut Z")) self.cutDepth_label = FCLabel('%s:' % _("Cut Z"))
self.cutDepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.cutDepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.cutDepth_entry.set_range(-9999.9999, 9999.9999) self.cutDepth_entry.set_range(-10000.0000, 10000.0000)
self.cutDepth_entry.set_precision(self.decimals) self.cutDepth_entry.set_precision(self.decimals)
# self.cutDepth_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) # self.cutDepth_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
self.cutDepth_label.setToolTip(_("This is the depth to cut into the material.\n" self.cutDepth_label.setToolTip(_("This is the depth to cut into the material.\n"
"In the CNCJob is the CutZ parameter.")) "In the CNCJob is the CutZ parameter."))
self.effectiveToolDia_label = QtWidgets.QLabel('%s:' % _("Tool Diameter")) self.effectiveToolDia_label = FCLabel('%s:' % _("Tool Diameter"))
self.effectiveToolDia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.effectiveToolDia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.effectiveToolDia_entry.set_precision(self.decimals) self.effectiveToolDia_entry.set_precision(self.decimals)
@ -262,8 +302,9 @@ class CalcUI:
form_layout.addRow(self.effectiveToolDia_label, self.effectiveToolDia_entry) form_layout.addRow(self.effectiveToolDia_label, self.effectiveToolDia_entry)
# ## Buttons # ## Buttons
self.calculate_vshape_button = QtWidgets.QPushButton(_("Calculate")) self.calculate_vshape_button = FCButton(_("Calculate"))
# self.calculate_button.setFixedWidth(70) self.calculate_vshape_button.setIcon(QtGui.QIcon(self.app.resource_location + '/calculator16.png'))
self.calculate_vshape_button.setToolTip( self.calculate_vshape_button.setToolTip(
_("Calculate either the Cut Z or the effective tool diameter,\n " _("Calculate either the Cut Z or the effective tool diameter,\n "
"depending on which is desired and which is known. ") "depending on which is desired and which is known. ")
@ -275,11 +316,10 @@ class CalcUI:
# ## ElectroPlating Tool Calculator ## # ## ElectroPlating Tool Calculator ##
# #################################### # ####################################
self.plate_spacer_label = QtWidgets.QLabel(" ") self.layout.addWidget(FCLabel(""))
self.layout.addWidget(self.plate_spacer_label)
# ## Title of the ElectroPlating Tools Calculator # ## Title of the ElectroPlating Tools Calculator
plate_title_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.eplateName) plate_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.eplateName)
plate_title_label.setToolTip( plate_title_label.setToolTip(
_("This calculator is useful for those who plate the via/pad/drill holes,\n" _("This calculator is useful for those who plate the via/pad/drill holes,\n"
"using a method like graphite ink or calcium hypophosphite ink or palladium chloride.") "using a method like graphite ink or calcium hypophosphite ink or palladium chloride.")
@ -287,79 +327,168 @@ class CalcUI:
self.layout.addWidget(plate_title_label) self.layout.addWidget(plate_title_label)
# ## Plate Form Layout # ## Plate Form Layout
plate_form_layout = QtWidgets.QFormLayout() grid2 = QtWidgets.QGridLayout()
self.layout.addLayout(plate_form_layout) grid2.setColumnStretch(0, 0)
grid2.setColumnStretch(1, 1)
self.layout.addLayout(grid2)
self.pcblengthlabel = QtWidgets.QLabel('%s:' % _("Board Length")) # Area Calculation
self.pcblength_entry = FCDoubleSpinner(callback=self.confirmation_message) self.area_sel_label = FCLabel('%s:' % _("Area Calculation"))
self.pcblength_entry.set_precision(self.decimals) self.area_sel_label.setToolTip(
self.pcblength_entry.set_range(0.0, 9999.9999) _("Choose how to calculate the board area.")
)
self.area_sel_radio = RadioSet([
{'label': _('Dimensions'), 'value': 'd'},
{"label": _("Area"), "value": "a"}
], stretch=False)
# self.pcblength_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) grid2.addWidget(self.area_sel_label, 0, 0)
grid2.addWidget(self.area_sel_radio, 1, 0, 1, 2)
# BOARD LENGTH
self.pcblengthlabel = FCLabel('%s:' % _("Board Length"))
self.pcblengthlabel.setToolTip(_('This is the board length. In centimeters.')) self.pcblengthlabel.setToolTip(_('This is the board length. In centimeters.'))
self.pcblength_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.pcblength_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.pcblength_entry.set_precision(self.decimals)
self.pcblength_entry.set_range(0.0, 10000.0000)
self.pcbwidthlabel = QtWidgets.QLabel('%s:' % _("Board Width")) self.length_unit = FCLabel('%s' % _("cm"))
self.pcbwidth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.length_unit.setMinimumWidth(25)
self.pcbwidth_entry.set_precision(self.decimals)
self.pcbwidth_entry.set_range(0.0, 9999.9999)
# self.pcbwidth_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) l_hlay = QtWidgets.QHBoxLayout()
l_hlay.addWidget(self.pcblength_entry)
l_hlay.addWidget(self.length_unit)
grid2.addWidget(self.pcblengthlabel, 2, 0)
grid2.addLayout(l_hlay, 2, 1)
# BOARD WIDTH
self.pcbwidthlabel = FCLabel('%s:' % _("Board Width"))
self.pcbwidthlabel.setToolTip(_('This is the board width.In centimeters.')) self.pcbwidthlabel.setToolTip(_('This is the board width.In centimeters.'))
self.pcbwidth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.pcbwidth_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.pcbwidth_entry.set_precision(self.decimals)
self.pcbwidth_entry.set_range(0.0, 10000.0000)
self.cdensity_label = QtWidgets.QLabel('%s:' % _("Current Density")) self.width_unit = FCLabel('%s' % _("cm"))
self.cdensity_entry = FCDoubleSpinner(callback=self.confirmation_message) self.width_unit.setMinimumWidth(25)
self.cdensity_entry.set_precision(self.decimals)
self.cdensity_entry.set_range(0.0, 9999.9999)
self.cdensity_entry.setSingleStep(0.1)
# self.cdensity_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) w_hlay = QtWidgets.QHBoxLayout()
w_hlay.addWidget(self.pcbwidth_entry)
w_hlay.addWidget(self.width_unit)
grid2.addWidget(self.pcbwidthlabel, 4, 0)
grid2.addLayout(w_hlay, 4, 1)
# AREA
self.area_label = FCLabel('%s:' % _("Area"))
self.area_label.setToolTip(_('This is the board area.'))
self.area_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.area_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.area_entry.set_precision(self.decimals)
self.area_entry.set_range(0.0, 10000.0000)
self.area_unit = FCLabel('%s<sup>2</sup>' % _("cm"))
self.area_unit.setMinimumWidth(25)
a_hlay = QtWidgets.QHBoxLayout()
a_hlay.addWidget(self.area_entry)
a_hlay.addWidget(self.area_unit)
grid2.addWidget(self.area_label, 6, 0)
grid2.addLayout(a_hlay, 6, 1)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid2.addWidget(separator_line, 7, 0, 1, 2)
# DENSITY
self.cdensity_label = FCLabel('%s:' % _("Current Density"))
self.cdensity_label.setToolTip(_("Current density to pass through the board. \n" self.cdensity_label.setToolTip(_("Current density to pass through the board. \n"
"In Amps per Square Feet ASF.")) "In Amps per Square Feet ASF."))
self.cdensity_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.cdensity_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.cdensity_entry.set_precision(self.decimals)
self.cdensity_entry.set_range(0.0, 10000.0000)
self.cdensity_entry.setSingleStep(0.1)
self.growth_label = QtWidgets.QLabel('%s:' % _("Copper Growth")) density_unit = FCLabel('%s' % "ASF")
self.growth_entry = FCDoubleSpinner(callback=self.confirmation_message) density_unit.setMinimumWidth(25)
self.growth_entry.set_precision(self.decimals)
self.growth_entry.set_range(0.0, 9999.9999)
self.growth_entry.setSingleStep(0.01)
# self.growth_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) d_hlay = QtWidgets.QHBoxLayout()
d_hlay.addWidget(self.cdensity_entry)
d_hlay.addWidget(density_unit)
grid2.addWidget(self.cdensity_label, 8, 0)
grid2.addLayout(d_hlay, 8, 1)
# COPPER GROWTH
self.growth_label = FCLabel('%s:' % _("Copper Growth"))
self.growth_label.setToolTip(_("How thick the copper growth is intended to be.\n" self.growth_label.setToolTip(_("How thick the copper growth is intended to be.\n"
"In microns.")) "In microns."))
self.growth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.growth_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.growth_entry.set_precision(self.decimals)
self.growth_entry.set_range(0.0, 10000.0000)
self.growth_entry.setSingleStep(0.01)
# self.growth_entry.setEnabled(False) growth_unit = FCLabel('%s' % _("um"))
growth_unit.setMinimumWidth(25)
self.cvaluelabel = QtWidgets.QLabel('%s:' % _("Current Value")) g_hlay = QtWidgets.QHBoxLayout()
self.cvalue_entry = FCDoubleSpinner(callback=self.confirmation_message) g_hlay.addWidget(self.growth_entry)
self.cvalue_entry.set_precision(self.decimals) g_hlay.addWidget(growth_unit)
self.cvalue_entry.set_range(0.0, 9999.9999)
self.cvalue_entry.setSingleStep(0.1)
# self.cvalue_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) grid2.addWidget(self.growth_label, 10, 0)
grid2.addLayout(g_hlay, 10, 1)
# CURRENT
self.cvaluelabel = FCLabel('%s:' % _("Current Value"))
self.cvaluelabel.setToolTip(_('This is the current intensity value\n' self.cvaluelabel.setToolTip(_('This is the current intensity value\n'
'to be set on the Power Supply. In Amps.')) 'to be set on the Power Supply. In Amps.'))
self.cvalue_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.cvalue_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.cvalue_entry.set_precision(self.decimals)
self.cvalue_entry.set_range(0.0, 10000.0000)
self.cvalue_entry.setSingleStep(0.1)
current_unit = FCLabel('%s' % "A")
current_unit.setMinimumWidth(25)
self.cvalue_entry.setReadOnly(True) self.cvalue_entry.setReadOnly(True)
self.timelabel = QtWidgets.QLabel('%s:' % _("Time")) c_hlay = QtWidgets.QHBoxLayout()
self.time_entry = FCDoubleSpinner(callback=self.confirmation_message) c_hlay.addWidget(self.cvalue_entry)
self.time_entry.set_precision(self.decimals) c_hlay.addWidget(current_unit)
self.time_entry.set_range(0.0, 9999.9999)
self.time_entry.setSingleStep(0.1)
# self.time_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) grid2.addWidget(self.cvaluelabel, 12, 0)
grid2.addLayout(c_hlay, 12, 1)
# TIME
self.timelabel = FCLabel('%s:' % _("Time"))
self.timelabel.setToolTip(_('This is the calculated time required for the procedure.\n' self.timelabel.setToolTip(_('This is the calculated time required for the procedure.\n'
'In minutes.')) 'In minutes.'))
self.time_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.time_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
self.time_entry.set_precision(self.decimals)
self.time_entry.set_range(0.0, 10000.0000)
self.time_entry.setSingleStep(0.1)
time_unit = FCLabel('%s' % "min")
time_unit.setMinimumWidth(25)
self.time_entry.setReadOnly(True) self.time_entry.setReadOnly(True)
plate_form_layout.addRow(self.pcblengthlabel, self.pcblength_entry) t_hlay = QtWidgets.QHBoxLayout()
plate_form_layout.addRow(self.pcbwidthlabel, self.pcbwidth_entry) t_hlay.addWidget(self.time_entry)
plate_form_layout.addRow(self.cdensity_label, self.cdensity_entry) t_hlay.addWidget(time_unit)
plate_form_layout.addRow(self.growth_label, self.growth_entry)
plate_form_layout.addRow(self.cvaluelabel, self.cvalue_entry) grid2.addWidget(self.timelabel, 14, 0)
plate_form_layout.addRow(self.timelabel, self.time_entry) grid2.addLayout(t_hlay, 14, 1)
# ## Buttons # ## Buttons
self.calculate_plate_button = QtWidgets.QPushButton(_("Calculate")) self.calculate_plate_button = FCButton(_("Calculate"))
# self.calculate_button.setFixedWidth(70) self.calculate_plate_button.setIcon(QtGui.QIcon(self.app.resource_location + '/calculator16.png'))
self.calculate_plate_button.setToolTip( self.calculate_plate_button.setToolTip(
_("Calculate the current intensity value and the procedure time,\n" _("Calculate the current intensity value and the procedure time,\n"
"depending on the parameters above") "depending on the parameters above")
@ -369,7 +498,7 @@ class CalcUI:
self.layout.addStretch() self.layout.addStretch()
# ## Reset Tool # ## Reset Tool
self.reset_button = QtWidgets.QPushButton(_("Reset Tool")) self.reset_button = FCButton(_("Reset Tool"))
self.reset_button.setIcon(QtGui.QIcon(self.app.resource_location + '/reset32.png')) self.reset_button.setIcon(QtGui.QIcon(self.app.resource_location + '/reset32.png'))
self.reset_button.setToolTip( self.reset_button.setToolTip(
_("Will reset the tool parameters.") _("Will reset the tool parameters.")

View File

@ -772,7 +772,7 @@ class CalibUI:
) )
self.travelz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.travelz_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.travelz_entry.set_range(-9999.9999, 9999.9999) self.travelz_entry.set_range(-10000.0000, 10000.0000)
self.travelz_entry.set_precision(self.decimals) self.travelz_entry.set_precision(self.decimals)
self.travelz_entry.setSingleStep(0.1) self.travelz_entry.setSingleStep(0.1)
@ -786,7 +786,7 @@ class CalibUI:
) )
self.verz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.verz_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.verz_entry.set_range(-9999.9999, 9999.9999) self.verz_entry.set_range(-10000.0000, 10000.0000)
self.verz_entry.set_precision(self.decimals) self.verz_entry.set_precision(self.decimals)
self.verz_entry.setSingleStep(0.1) self.verz_entry.setSingleStep(0.1)
@ -809,7 +809,7 @@ class CalibUI:
) )
self.toolchangez_entry = FCDoubleSpinner(callback=self.confirmation_message) self.toolchangez_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.toolchangez_entry.set_range(0.0000, 9999.9999) self.toolchangez_entry.set_range(0.0000, 10000.0000)
self.toolchangez_entry.set_precision(self.decimals) self.toolchangez_entry.set_precision(self.decimals)
self.toolchangez_entry.setSingleStep(0.1) self.toolchangez_entry.setSingleStep(0.1)
@ -1164,7 +1164,7 @@ class CalibUI:
_("Factor for Scale action over X axis.") _("Factor for Scale action over X axis.")
) )
self.scalex_entry = FCDoubleSpinner(callback=self.confirmation_message) self.scalex_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.scalex_entry.set_range(0, 9999.9999) self.scalex_entry.set_range(0, 10000.0000)
self.scalex_entry.set_precision(self.decimals) self.scalex_entry.set_precision(self.decimals)
self.scalex_entry.setSingleStep(0.1) self.scalex_entry.setSingleStep(0.1)
@ -1176,7 +1176,7 @@ class CalibUI:
_("Factor for Scale action over Y axis.") _("Factor for Scale action over Y axis.")
) )
self.scaley_entry = FCDoubleSpinner(callback=self.confirmation_message) self.scaley_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.scaley_entry.set_range(0, 9999.9999) self.scaley_entry.set_range(0, 10000.0000)
self.scaley_entry.set_precision(self.decimals) self.scaley_entry.set_precision(self.decimals)
self.scaley_entry.setSingleStep(0.1) self.scaley_entry.setSingleStep(0.1)
@ -1245,7 +1245,7 @@ class CalibUI:
# _("Final factor for Scale action over X axis.") # _("Final factor for Scale action over X axis.")
# ) # )
# self.fin_scalex_entry = FCDoubleSpinner(callback=self.confirmation_message) # self.fin_scalex_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.fin_scalex_entry.set_range(0, 9999.9999) # self.fin_scalex_entry.set_range(0, 10000.0000)
# self.fin_scalex_entry.set_precision(self.decimals) # self.fin_scalex_entry.set_precision(self.decimals)
# self.fin_scalex_entry.setSingleStep(0.1) # self.fin_scalex_entry.setSingleStep(0.1)
# #
@ -1257,7 +1257,7 @@ class CalibUI:
# _("Final factor for Scale action over Y axis.") # _("Final factor for Scale action over Y axis.")
# ) # )
# self.fin_scaley_entry = FCDoubleSpinner(callback=self.confirmation_message) # self.fin_scaley_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.fin_scaley_entry.set_range(0, 9999.9999) # self.fin_scaley_entry.set_range(0, 10000.0000)
# self.fin_scaley_entry.set_precision(self.decimals) # self.fin_scaley_entry.set_precision(self.decimals)
# self.fin_scaley_entry.setSingleStep(0.1) # self.fin_scaley_entry.setSingleStep(0.1)
# #

View File

@ -9,7 +9,7 @@ from PyQt5 import QtWidgets, QtCore, QtGui
from camlib import grace from camlib import grace
from appTool import AppTool from appTool import AppTool
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCEntry, FCComboBox from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCEntry, FCComboBox, FCLabel
import shapely.geometry.base as base import shapely.geometry.base as base
from shapely.ops import unary_union from shapely.ops import unary_union
@ -77,7 +77,7 @@ class ToolCopperThieving(AppTool):
self.geo_steps_per_circle = 128 self.geo_steps_per_circle = 128
# Thieving geometry storage # Thieving geometry storage
self.new_solid_geometry = [] self.thief_solid_geometry = []
# Robber bar geometry storage # Robber bar geometry storage
self.robber_geo = None self.robber_geo = None
@ -138,6 +138,7 @@ class ToolCopperThieving(AppTool):
self.ui.bbox_type_radio.set_value(self.app.defaults["tools_copper_thieving_box_type"]) self.ui.bbox_type_radio.set_value(self.app.defaults["tools_copper_thieving_box_type"])
self.ui.fill_type_radio.set_value(self.app.defaults["tools_copper_thieving_fill_type"]) self.ui.fill_type_radio.set_value(self.app.defaults["tools_copper_thieving_fill_type"])
self.ui.area_entry.set_value(self.app.defaults["tools_copper_thieving_area"])
self.ui.dot_dia_entry.set_value(self.app.defaults["tools_copper_thieving_dots_dia"]) self.ui.dot_dia_entry.set_value(self.app.defaults["tools_copper_thieving_dots_dia"])
self.ui.dot_spacing_entry.set_value(self.app.defaults["tools_copper_thieving_dots_spacing"]) self.ui.dot_spacing_entry.set_value(self.app.defaults["tools_copper_thieving_dots_spacing"])
self.ui.square_size_entry.set_value(self.app.defaults["tools_copper_thieving_squares_size"]) self.ui.square_size_entry.set_value(self.app.defaults["tools_copper_thieving_squares_size"])
@ -148,12 +149,13 @@ class ToolCopperThieving(AppTool):
self.ui.rb_margin_entry.set_value(self.app.defaults["tools_copper_thieving_rb_margin"]) self.ui.rb_margin_entry.set_value(self.app.defaults["tools_copper_thieving_rb_margin"])
self.ui.rb_thickness_entry.set_value(self.app.defaults["tools_copper_thieving_rb_thickness"]) self.ui.rb_thickness_entry.set_value(self.app.defaults["tools_copper_thieving_rb_thickness"])
self.ui.clearance_ppm_entry.set_value(self.app.defaults["tools_copper_thieving_mask_clearance"]) self.ui.clearance_ppm_entry.set_value(self.app.defaults["tools_copper_thieving_mask_clearance"])
self.ui.ppm_choice_radio.set_value(self.app.defaults["tools_copper_thieving_geo_choice"])
# INIT SECTION # INIT SECTION
self.handlers_connected = False self.handlers_connected = False
self.robber_geo = None self.robber_geo = None
self.robber_line = None self.robber_line = None
self.new_solid_geometry = None self.thief_solid_geometry = []
def on_ref_combo_type_change(self): def on_ref_combo_type_change(self):
obj_type = self.ui.ref_combo_type.currentIndex() obj_type = self.ui.ref_combo_type.currentIndex()
@ -207,6 +209,7 @@ class ToolCopperThieving(AppTool):
if self.ui.reference_radio.get_value() != 'itself': if self.ui.reference_radio.get_value() != 'itself':
self.ui.reference_radio.set_value('itself') self.ui.reference_radio.set_value('itself')
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Lines Grid works only for 'itself' reference ...")) self.app.inform.emit('[WARNING_NOTCL] %s' % _("Lines Grid works only for 'itself' reference ..."))
self.ui.dots_frame.hide() self.ui.dots_frame.hide()
self.ui.squares_frame.hide() self.ui.squares_frame.hide()
self.ui.lines_frame.show() self.ui.lines_frame.show()
@ -334,7 +337,7 @@ class ToolCopperThieving(AppTool):
self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), str(e))) self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), str(e)))
return "Could not retrieve object: %s" % self.obj_name return "Could not retrieve object: %s" % self.obj_name
self.on_copper_thieving( self.copper_thieving(
thieving_obj=self.grb_object, thieving_obj=self.grb_object,
c_val=self.clearance_val, c_val=self.clearance_val,
margin=self.margin_val margin=self.margin_val
@ -354,7 +357,7 @@ class ToolCopperThieving(AppTool):
self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), bound_obj_name)) self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), bound_obj_name))
return return
self.on_copper_thieving( self.copper_thieving(
thieving_obj=self.grb_object, thieving_obj=self.grb_object,
ref_obj=self.ref_obj, ref_obj=self.ref_obj,
c_val=self.clearance_val, c_val=self.clearance_val,
@ -422,7 +425,7 @@ class ToolCopperThieving(AppTool):
if not isinstance(self.sel_rect, Iterable): if not isinstance(self.sel_rect, Iterable):
self.sel_rect = [self.sel_rect] self.sel_rect = [self.sel_rect]
self.on_copper_thieving( self.copper_thieving(
thieving_obj=self.grb_object, thieving_obj=self.grb_object,
ref_obj=self.sel_rect, ref_obj=self.sel_rect,
c_val=self.clearance_val, c_val=self.clearance_val,
@ -481,7 +484,7 @@ class ToolCopperThieving(AppTool):
self.app.draw_moving_selection_shape(old_coords=(self.cursor_pos[0], self.cursor_pos[1]), self.app.draw_moving_selection_shape(old_coords=(self.cursor_pos[0], self.cursor_pos[1]),
coords=(curr_pos[0], curr_pos[1])) coords=(curr_pos[0], curr_pos[1]))
def on_copper_thieving(self, thieving_obj, ref_obj=None, c_val=None, margin=None, run_threaded=True): def copper_thieving(self, thieving_obj, ref_obj=None, c_val=None, margin=None, run_threaded=True):
""" """
:param thieving_obj: :param thieving_obj:
@ -511,6 +514,7 @@ class ToolCopperThieving(AppTool):
c_val = float(self.app.defaults["tools_copper_thieving_clearance"]) c_val = float(self.app.defaults["tools_copper_thieving_clearance"])
if margin is None: if margin is None:
margin = float(self.app.defaults["tools_copper_thieving_margin"]) margin = float(self.app.defaults["tools_copper_thieving_margin"])
min_area = self.ui.area_entry.get_value()
fill_type = self.ui.fill_type_radio.get_value() fill_type = self.ui.fill_type_radio.get_value()
dot_dia = self.ui.dot_dia_entry.get_value() dot_dia = self.ui.dot_dia_entry.get_value()
@ -540,6 +544,9 @@ class ToolCopperThieving(AppTool):
old_disp_number = 0 old_disp_number = 0
pol_nr = 0 pol_nr = 0
# #########################################################################################################
# apply the clearance value to the geometry
# #########################################################################################################
clearance_geometry = [] clearance_geometry = []
try: try:
for pol in tool_obj.grb_object.solid_geometry: for pol in tool_obj.grb_object.solid_geometry:
@ -580,7 +587,7 @@ class ToolCopperThieving(AppTool):
else: else:
working_obj = ref_obj working_obj = ref_obj
except Exception as e: except Exception as e:
log.debug("ToolCopperThieving.on_copper_thieving() --> %s" % str(e)) log.debug("ToolCopperThieving.copper_thieving() --> %s" % str(e))
return 'fail' return 'fail'
tool_obj.app.proc_container.update_view_text(' %s' % _("Working...")) tool_obj.app.proc_container.update_view_text(' %s' % _("Working..."))
@ -621,7 +628,7 @@ class ToolCopperThieving(AppTool):
return 'fail' return 'fail'
except Exception as e: except Exception as e:
log.debug("ToolCopperFIll.on_copper_thieving() 'itself' --> %s" % str(e)) log.debug("ToolCopperFIll.copper_thieving() 'itself' --> %s" % str(e))
tool_obj.app.inform.emit('[ERROR_NOTCL] %s' % _("No object available.")) tool_obj.app.inform.emit('[ERROR_NOTCL] %s' % _("No object available."))
return 'fail' return 'fail'
elif ref_selected == 'area': elif ref_selected == 'area':
@ -643,7 +650,7 @@ class ToolCopperThieving(AppTool):
try: try:
__ = iter(geo_n) __ = iter(geo_n)
except Exception as e: except Exception as e:
log.debug("ToolCopperFIll.on_copper_thieving() 'box' --> %s" % str(e)) log.debug("ToolCopperFIll.copper_thieving() 'box' --> %s" % str(e))
geo_n = [geo_n] geo_n = [geo_n]
geo_buff_list = [] geo_buff_list = []
@ -667,20 +674,20 @@ class ToolCopperThieving(AppTool):
tool_obj.app.inform.emit(_("Copper Thieving Tool. Appending new geometry and buffering.")) tool_obj.app.inform.emit(_("Copper Thieving Tool. Appending new geometry and buffering."))
# ######################################################################################################### # #########################################################################################################
# ########## Generate filling geometry. # Generate solid filling geometry. Effectively it's a NEGATIVE of the source object
# ######################################################################################################### # #########################################################################################################
tool_obj.thief_solid_geometry = bounding_box.difference(clearance_geometry)
tool_obj.new_solid_geometry = bounding_box.difference(clearance_geometry) temp_geo = []
try:
for s_geo in tool_obj.thief_solid_geometry:
if s_geo.area >= min_area:
temp_geo.append(s_geo)
except TypeError:
if tool_obj.thief_solid_geometry.area >= min_area:
temp_geo.append(tool_obj.thief_solid_geometry)
# determine the bounding box polygon for the entire Gerber object to which we add copper thieving tool_obj.thief_solid_geometry = temp_geo
# if isinstance(geo_n, list):
# env_obj = unary_union(geo_n).buffer(distance=margin, join_style=base.JOIN_STYLE.mitre)
# else:
# env_obj = geo_n.buffer(distance=margin, join_style=base.JOIN_STYLE.mitre)
#
# x0, y0, x1, y1 = env_obj.bounds
# bounding_box = box(x0, y0, x1, y1)
tool_obj.app.proc_container.update_view_text(' %s' % _("Create geometry"))
# ######################################################################################################### # #########################################################################################################
# apply the 'margin' to the bounding box geometry # apply the 'margin' to the bounding box geometry
@ -700,6 +707,8 @@ class ToolCopperThieving(AppTool):
# ######################################################################################################### # #########################################################################################################
# add Thieving geometry # add Thieving geometry
# ######################################################################################################### # #########################################################################################################
tool_obj.app.proc_container.update_view_text(' %s' % _("Create geometry"))
if fill_type == 'dot' or fill_type == 'square': if fill_type == 'dot' or fill_type == 'square':
# build the MultiPolygon of dots/squares that will fill the entire bounding box # build the MultiPolygon of dots/squares that will fill the entire bounding box
thieving_list = [] thieving_list = []
@ -734,11 +743,6 @@ class ToolCopperThieving(AppTool):
thieving_box_geo = affinity.translate(thieving_box_geo, xoff=dx, yoff=dy) thieving_box_geo = affinity.translate(thieving_box_geo, xoff=dx, yoff=dy)
try:
_it = iter(tool_obj.new_solid_geometry)
except TypeError:
tool_obj.new_solid_geometry = [tool_obj.new_solid_geometry]
try: try:
_it = iter(thieving_box_geo) _it = iter(thieving_box_geo)
except TypeError: except TypeError:
@ -746,11 +750,11 @@ class ToolCopperThieving(AppTool):
thieving_geo = [] thieving_geo = []
for dot_geo in thieving_box_geo: for dot_geo in thieving_box_geo:
for geo_t in tool_obj.new_solid_geometry: for geo_t in tool_obj.thief_solid_geometry:
if dot_geo.within(geo_t): if dot_geo.within(geo_t):
thieving_geo.append(dot_geo) thieving_geo.append(dot_geo)
tool_obj.new_solid_geometry = thieving_geo tool_obj.thief_solid_geometry = thieving_geo
if fill_type == 'line': if fill_type == 'line':
half_thick_line = line_size / 2.0 half_thick_line = line_size / 2.0
@ -838,13 +842,16 @@ class ToolCopperThieving(AppTool):
rest_line = line_poly.difference(clearance_geometry) rest_line = line_poly.difference(clearance_geometry)
diff_lines_geo.append(rest_line) diff_lines_geo.append(rest_line)
tool_obj.flatten([outline_geometry, box_outline_geometry, diff_lines_geo]) tool_obj.flatten([outline_geometry, box_outline_geometry, diff_lines_geo])
tool_obj.new_solid_geometry = tool_obj.flat_geometry tool_obj.thief_solid_geometry = tool_obj.flat_geometry
tool_obj.app.proc_container.update_view_text(' %s' % _("Append geometry")) tool_obj.app.proc_container.update_view_text(' %s' % _("Append geometry"))
# create a list of the source geometry
geo_list = deepcopy(tool_obj.grb_object.solid_geometry) geo_list = deepcopy(tool_obj.grb_object.solid_geometry)
if isinstance(tool_obj.grb_object.solid_geometry, MultiPolygon): if isinstance(tool_obj.grb_object.solid_geometry, MultiPolygon):
geo_list = list(geo_list.geoms) geo_list = list(geo_list.geoms)
# create a new dictionary to hold the source object apertures allowing us to tamper with without altering
# the original source object's apertures
new_apertures = deepcopy(tool_obj.grb_object.apertures) new_apertures = deepcopy(tool_obj.grb_object.apertures)
if '0' not in new_apertures: if '0' not in new_apertures:
new_apertures['0'] = { new_apertures['0'] = {
@ -853,8 +860,9 @@ class ToolCopperThieving(AppTool):
'geometry': [] 'geometry': []
} }
# add the thieving geometry in the '0' aperture of the new_apertures dict
try: try:
for poly in tool_obj.new_solid_geometry: for poly in tool_obj.thief_solid_geometry:
# append to the new solid geometry # append to the new solid geometry
geo_list.append(poly) geo_list.append(poly)
@ -863,12 +871,13 @@ class ToolCopperThieving(AppTool):
new_apertures['0']['geometry'].append(deepcopy(geo_elem)) new_apertures['0']['geometry'].append(deepcopy(geo_elem))
except TypeError: except TypeError:
# append to the new solid geometry # append to the new solid geometry
geo_list.append(tool_obj.new_solid_geometry) geo_list.append(tool_obj.thief_solid_geometry)
# append into the '0' aperture # append into the '0' aperture
geo_elem = {'solid': tool_obj.new_solid_geometry, 'follow': tool_obj.new_solid_geometry.exterior} geo_elem = {'solid': tool_obj.new_solid_geometry, 'follow': tool_obj.new_solid_geometry.exterior}
new_apertures['0']['geometry'].append(deepcopy(geo_elem)) new_apertures['0']['geometry'].append(deepcopy(geo_elem))
# prepare also the solid_geometry for the new object having the thieving geometry
new_solid_geo = MultiPolygon(geo_list).buffer(0.0000001).buffer(-0.0000001) new_solid_geo = MultiPolygon(geo_list).buffer(0.0000001).buffer(-0.0000001)
outname = '%s_%s' % (str(self.grb_object.options['name']), 'thief') outname = '%s_%s' % (str(self.grb_object.options['name']), 'thief')
@ -923,6 +932,7 @@ class ToolCopperThieving(AppTool):
def on_new_pattern_plating_object(self): def on_new_pattern_plating_object(self):
ppm_clearance = self.ui.clearance_ppm_entry.get_value() ppm_clearance = self.ui.clearance_ppm_entry.get_value()
geo_choice = self.ui.ppm_choice_radio.get_value()
rb_thickness = self.rb_thickness rb_thickness = self.rb_thickness
# get the Gerber object on which the Copper thieving will be inserted # get the Gerber object on which the Copper thieving will be inserted
@ -937,32 +947,133 @@ class ToolCopperThieving(AppTool):
return return
self.app.proc_container.update_view_text(' %s' % _("Append PP-M geometry")) self.app.proc_container.update_view_text(' %s' % _("Append PP-M geometry"))
geo_list = self.sm_object.solid_geometry geo_list = deepcopy(self.sm_object.solid_geometry)
if isinstance(self.sm_object.solid_geometry, MultiPolygon): if isinstance(geo_list, MultiPolygon):
geo_list = list(self.sm_object.solid_geometry.geoms) geo_list = list(geo_list.geoms)
# if the clearance is negative apply it to the original soldermask too # create a copy of the source apertures so we can manipulate them without altering the source object
new_apertures = deepcopy(self.sm_object.apertures)
# if the clearance is negative apply it to the original soldermask geometry too
if ppm_clearance < 0: if ppm_clearance < 0:
temp_geo_list = [] temp_geo_list = []
for geo in geo_list: for geo in geo_list:
temp_geo_list.append(geo.buffer(ppm_clearance)) temp_geo_list.append(geo.buffer(ppm_clearance))
geo_list = temp_geo_list geo_list = temp_geo_list
# squash former geometry in apertures
for ap_id in new_apertures:
for k in new_apertures[ap_id]:
if k == 'geometry':
new_apertures[ap_id]['geometry'] = []
# then add a buffered geometry
for ap_id in new_apertures:
if 'geometry' in self.sm_object.apertures[ap_id]:
new_geo_list = []
for geo_el in self.sm_object.apertures[ap_id]['geometry']:
new_el = {
'solid': geo_el['solid'].buffer(ppm_clearance) if 'solid' in geo_el else [],
'follow': geo_el['follow'] if 'follow' in geo_el else [],
'clear': geo_el['clear'] if 'clear' in geo_el else []
}
new_geo_list.append(deepcopy(new_el))
new_apertures[ap_id]['geometry'] = deepcopy(new_geo_list)
# calculate its own plated area (from the solder mask object)
plated_area = 0.0 plated_area = 0.0
for geo in geo_list: for geo in geo_list:
plated_area += geo.area plated_area += geo.area
if self.new_solid_geometry: thieving_solid_geo = deepcopy(self.thief_solid_geometry)
for geo in self.new_solid_geometry:
plated_area += geo.area
if self.robber_geo:
plated_area += self.robber_geo.area
self.ui.plated_area_entry.set_value(plated_area)
thieving_solid_geo = deepcopy(self.new_solid_geometry)
robber_solid_geo = deepcopy(self.robber_geo) robber_solid_geo = deepcopy(self.robber_geo)
robber_line = deepcopy(self.robber_line) robber_line = deepcopy(self.robber_line)
# store here the chosen follow geometry
new_follow_geo = deepcopy(self.sm_object.follow_geometry)
# if we have copper thieving geometry, add it
if thieving_solid_geo and geo_choice in ['b', 't']:
# add to the total the thieving geometry area, if chosen
for geo in thieving_solid_geo:
plated_area += geo.area
if '0' not in new_apertures:
new_apertures['0'] = {
'type': 'REG',
'size': 0.0,
'geometry': []
}
try:
for poly in thieving_solid_geo:
poly_b = poly.buffer(ppm_clearance)
# append to the new solid geometry
geo_list.append(poly_b)
# append into the '0' aperture
geo_elem = {
'solid': poly_b,
'follow': poly_b.exterior
}
new_apertures['0']['geometry'].append(deepcopy(geo_elem))
except TypeError:
# append to the new solid geometry
assert isinstance(thieving_solid_geo, Polygon)
geo_list.append(thieving_solid_geo.buffer(ppm_clearance))
# append into the '0' aperture
geo_elem = {
'solid': thieving_solid_geo.buffer(ppm_clearance),
'follow': thieving_solid_geo.buffer(ppm_clearance).exterior
}
new_apertures['0']['geometry'].append(deepcopy(geo_elem))
# if we have robber bar geometry, add it
if robber_solid_geo and geo_choice in ['b', 'r']:
# add to the total the robber bar geometry are, if chose
plated_area += robber_solid_geo.area
# add to the follow_geomery
new_follow_geo.append(robber_line)
aperture_found = None
for ap_id, ap_val in new_apertures.items():
if ap_val['type'] == 'C' and ap_val['size'] == self.rb_thickness + ppm_clearance:
aperture_found = ap_id
break
if aperture_found:
geo_elem = {'solid': robber_solid_geo, 'follow': robber_line}
new_apertures[aperture_found]['geometry'].append(deepcopy(geo_elem))
else:
ap_keys = list(new_apertures.keys())
max_apid = int(max(ap_keys))
if ap_keys and max_apid != 0:
new_apid = str(max_apid + 1)
else:
new_apid = '10'
new_apertures[new_apid] = {
'type': 'C',
'size': rb_thickness + ppm_clearance,
'geometry': []
}
geo_elem = {
'solid': robber_solid_geo.buffer(ppm_clearance),
'follow': deepcopy(robber_line)
}
new_apertures[new_apid]['geometry'].append(deepcopy(geo_elem))
geo_list.append(robber_solid_geo.buffer(ppm_clearance))
# and then set the total plated area value to the GUI element
self.ui.plated_area_entry.set_value(plated_area)
new_solid_geometry = MultiPolygon(geo_list).buffer(0.0000001).buffer(-0.0000001)
def obj_init(grb_obj, app_obj): def obj_init(grb_obj, app_obj):
grb_obj.options = {} grb_obj.options = {}
for opt in self.sm_object.options: for opt in self.sm_object.options:
@ -973,77 +1084,9 @@ class ToolCopperThieving(AppTool):
grb_obj.source_file = [] grb_obj.source_file = []
grb_obj.multigeo = False grb_obj.multigeo = False
grb_obj.follow = False grb_obj.follow = False
grb_obj.apertures = {} grb_obj.follow_geometry = deepcopy(new_follow_geo)
grb_obj.solid_geometry = [] grb_obj.apertures = deepcopy(new_apertures)
grb_obj.solid_geometry = deepcopy(new_solid_geometry)
# if we have copper thieving geometry, add it
if thieving_solid_geo:
if '0' not in grb_obj.apertures:
grb_obj.apertures['0'] = {
'type': 'REG',
'size': 0.0,
'geometry': []
}
try:
for poly in thieving_solid_geo:
poly_b = poly.buffer(ppm_clearance)
# append to the new solid geometry
geo_list.append(poly_b)
# append into the '0' aperture
geo_elem = {
'solid': poly_b,
'follow': poly_b.exterior
}
grb_obj.apertures['0']['geometry'].append(deepcopy(geo_elem))
except TypeError:
# append to the new solid geometry
assert isinstance(thieving_solid_geo, Polygon)
geo_list.append(thieving_solid_geo.buffer(ppm_clearance))
# append into the '0' aperture
geo_elem = {
'solid': thieving_solid_geo.buffer(ppm_clearance),
'follow': thieving_solid_geo.buffer(ppm_clearance).exterior
}
grb_obj.apertures['0']['geometry'].append(deepcopy(geo_elem))
# if we have robber bar geometry, add it
if robber_solid_geo:
aperture_found = None
for ap_id, ap_val in grb_obj.apertures.items():
if ap_val['type'] == 'C' and ap_val['size'] == app_obj.rb_thickness + ppm_clearance:
aperture_found = ap_id
break
if aperture_found:
geo_elem = {'solid': robber_solid_geo, 'follow': robber_line}
grb_obj.apertures[aperture_found]['geometry'].append(deepcopy(geo_elem))
else:
ap_keys = list(grb_obj.apertures.keys())
max_apid = int(max(ap_keys))
if ap_keys and max_apid != 0:
new_apid = str(max_apid + 1)
else:
new_apid = '10'
grb_obj.apertures[new_apid] = {
'type': 'C',
'size': rb_thickness + ppm_clearance,
'geometry': []
}
geo_elem = {
'solid': robber_solid_geo.buffer(ppm_clearance),
'follow': Polygon(robber_line).buffer(ppm_clearance / 2.0).exterior
}
grb_obj.apertures[new_apid]['geometry'].append(deepcopy(geo_elem))
geo_list.append(robber_solid_geo.buffer(ppm_clearance))
grb_obj.solid_geometry = MultiPolygon(geo_list).buffer(0.0000001).buffer(-0.0000001)
app_obj.proc_container.update_view_text(' %s' % _("Append source file")) app_obj.proc_container.update_view_text(' %s' % _("Append source file"))
# update the source file with the new geometry: # update the source file with the new geometry:
@ -1174,7 +1217,7 @@ class ThievingUI:
self.layout = layout self.layout = layout
# ## Title # ## Title
title_label = QtWidgets.QLabel("%s" % self.toolName) title_label = FCLabel("%s" % self.toolName)
title_label.setStyleSheet(""" title_label.setStyleSheet("""
QLabel QLabel
{ {
@ -1183,7 +1226,7 @@ class ThievingUI:
} }
""") """)
self.layout.addWidget(title_label) self.layout.addWidget(title_label)
self.layout.addWidget(QtWidgets.QLabel("")) self.layout.addWidget(FCLabel(""))
# ## Grid Layout # ## Grid Layout
i_grid_lay = QtWidgets.QGridLayout() i_grid_lay = QtWidgets.QGridLayout()
@ -1197,7 +1240,7 @@ class ThievingUI:
self.grb_object_combo.is_last = True self.grb_object_combo.is_last = True
self.grb_object_combo.obj_type = 'Gerber' self.grb_object_combo.obj_type = 'Gerber'
self.grbobj_label = QtWidgets.QLabel("<b>%s:</b>" % _("GERBER")) self.grbobj_label = FCLabel("<b>%s:</b>" % _("GERBER"))
self.grbobj_label.setToolTip( self.grbobj_label.setToolTip(
_("Gerber Object to which will be added a copper thieving.") _("Gerber Object to which will be added a copper thieving.")
) )
@ -1216,39 +1259,62 @@ class ThievingUI:
grid_lay.setColumnStretch(0, 0) grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1) grid_lay.setColumnStretch(1, 1)
self.copper_fill_label = QtWidgets.QLabel('<b>%s</b>' % _('Parameters')) self.copper_fill_label = FCLabel('<b>%s</b>' % _('Parameters'))
self.copper_fill_label.setToolTip( self.copper_fill_label.setToolTip(
_("Parameters used for this tool.") _("Parameters used for this tool.")
) )
grid_lay.addWidget(self.copper_fill_label, 0, 0, 1, 2) grid_lay.addWidget(self.copper_fill_label, 0, 0, 1, 2)
# CLEARANCE # # CLEARANCE #
self.clearance_label = QtWidgets.QLabel('%s:' % _("Clearance")) self.clearance_label = FCLabel('%s:' % _("Clearance"))
self.clearance_label.setToolTip( self.clearance_label.setToolTip(
_("This set the distance between the copper thieving components\n" _("This set the distance between the copper thieving components\n"
"(the polygon fill may be split in multiple polygons)\n" "(the polygon fill may be split in multiple polygons)\n"
"and the copper traces in the Gerber file.") "and the copper traces in the Gerber file.")
) )
self.clearance_entry = FCDoubleSpinner(callback=self.confirmation_message) self.clearance_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.clearance_entry.set_range(0.00001, 9999.9999) self.clearance_entry.set_range(0.00001, 10000.0000)
self.clearance_entry.set_precision(self.decimals) self.clearance_entry.set_precision(self.decimals)
self.clearance_entry.setSingleStep(0.1) self.clearance_entry.setSingleStep(0.1)
grid_lay.addWidget(self.clearance_label, 1, 0) grid_lay.addWidget(self.clearance_label, 2, 0)
grid_lay.addWidget(self.clearance_entry, 1, 1) grid_lay.addWidget(self.clearance_entry, 2, 1)
# MARGIN # # MARGIN #
self.margin_label = QtWidgets.QLabel('%s:' % _("Margin")) self.margin_label = FCLabel('%s:' % _("Margin"))
self.margin_label.setToolTip( self.margin_label.setToolTip(
_("Bounding box margin.") _("Bounding box margin.")
) )
self.margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.margin_entry.set_range(0.0, 9999.9999) self.margin_entry.set_range(0.0, 10000.0000)
self.margin_entry.set_precision(self.decimals) self.margin_entry.set_precision(self.decimals)
self.margin_entry.setSingleStep(0.1) self.margin_entry.setSingleStep(0.1)
grid_lay.addWidget(self.margin_label, 2, 0) grid_lay.addWidget(self.margin_label, 4, 0)
grid_lay.addWidget(self.margin_entry, 2, 1) grid_lay.addWidget(self.margin_entry, 4, 1)
# Area #
area_hlay = QtWidgets.QHBoxLayout()
self.area_label = FCLabel('%s:' % _("Area"))
self.area_label.setToolTip(
_("Thieving areas with area less then this value will not be added.")
)
self.area_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.area_entry.set_range(0.0, 10000.0000)
self.area_entry.set_precision(self.decimals)
self.area_entry.setSingleStep(0.1)
self.area_entry.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
if self.units.upper() == 'MM':
units_area_label = FCLabel('%s<sup>2</sup>' % _("mm"))
else:
units_area_label = FCLabel('%s<sup>2</sup>' % _("in"))
area_hlay.addWidget(self.area_entry)
area_hlay.addWidget(units_area_label)
grid_lay.addWidget(self.area_label, 6, 0)
grid_lay.addLayout(area_hlay, 6, 1)
# Reference # # Reference #
self.reference_radio = RadioSet([ self.reference_radio = RadioSet([
@ -1256,16 +1322,16 @@ class ThievingUI:
{"label": _("Area Selection"), "value": "area"}, {"label": _("Area Selection"), "value": "area"},
{'label': _("Reference Object"), 'value': 'box'} {'label': _("Reference Object"), 'value': 'box'}
], orientation='vertical', stretch=False) ], orientation='vertical', stretch=False)
self.reference_label = QtWidgets.QLabel(_("Reference:")) self.reference_label = FCLabel(_("Reference:"))
self.reference_label.setToolTip( self.reference_label.setToolTip(
_("- 'Itself' - the copper thieving extent is based on the object extent.\n" _("- 'Itself' - the copper thieving extent is based on the object extent.\n"
"- 'Area Selection' - left mouse click to start selection of the area to be filled.\n" "- 'Area Selection' - left mouse click to start selection of the area to be filled.\n"
"- 'Reference Object' - will do copper thieving within the area specified by another object.") "- 'Reference Object' - will do copper thieving within the area specified by another object.")
) )
grid_lay.addWidget(self.reference_label, 3, 0) grid_lay.addWidget(self.reference_label, 8, 0)
grid_lay.addWidget(self.reference_radio, 3, 1) grid_lay.addWidget(self.reference_radio, 8, 1)
self.ref_combo_type_label = QtWidgets.QLabel('%s:' % _("Ref. Type")) self.ref_combo_type_label = FCLabel('%s:' % _("Ref. Type"))
self.ref_combo_type_label.setToolTip( self.ref_combo_type_label.setToolTip(
_("The type of FlatCAM object to be used as copper thieving reference.\n" _("The type of FlatCAM object to be used as copper thieving reference.\n"
"It can be Gerber, Excellon or Geometry.") "It can be Gerber, Excellon or Geometry.")
@ -1273,10 +1339,10 @@ class ThievingUI:
self.ref_combo_type = FCComboBox() self.ref_combo_type = FCComboBox()
self.ref_combo_type.addItems([_("Gerber"), _("Excellon"), _("Geometry")]) self.ref_combo_type.addItems([_("Gerber"), _("Excellon"), _("Geometry")])
grid_lay.addWidget(self.ref_combo_type_label, 4, 0) grid_lay.addWidget(self.ref_combo_type_label, 10, 0)
grid_lay.addWidget(self.ref_combo_type, 4, 1) grid_lay.addWidget(self.ref_combo_type, 10, 1)
self.ref_combo_label = QtWidgets.QLabel('%s:' % _("Ref. Object")) self.ref_combo_label = FCLabel('%s:' % _("Ref. Object"))
self.ref_combo_label.setToolTip( self.ref_combo_label.setToolTip(
_("The FlatCAM object to be used as non copper clearing reference.") _("The FlatCAM object to be used as non copper clearing reference.")
) )
@ -1288,8 +1354,8 @@ class ThievingUI:
_("Gerber"): "Gerber", _("Excellon"): "Excellon", _("Geometry"): "Geometry" _("Gerber"): "Gerber", _("Excellon"): "Excellon", _("Geometry"): "Geometry"
}[self.ref_combo_type.get_value()] }[self.ref_combo_type.get_value()]
grid_lay.addWidget(self.ref_combo_label, 5, 0) grid_lay.addWidget(self.ref_combo_label, 12, 0)
grid_lay.addWidget(self.ref_combo, 5, 1) grid_lay.addWidget(self.ref_combo, 12, 1)
self.ref_combo.hide() self.ref_combo.hide()
self.ref_combo_label.hide() self.ref_combo_label.hide()
@ -1297,24 +1363,25 @@ class ThievingUI:
self.ref_combo_type_label.hide() self.ref_combo_type_label.hide()
# Bounding Box Type # # Bounding Box Type #
self.bbox_type_radio = RadioSet([ self.bbox_type_label = FCLabel(_("Box Type:"))
{'label': _('Rectangular'), 'value': 'rect'},
{"label": _("Minimal"), "value": "min"}
], stretch=False)
self.bbox_type_label = QtWidgets.QLabel(_("Box Type:"))
self.bbox_type_label.setToolTip( self.bbox_type_label.setToolTip(
_("- 'Rectangular' - the bounding box will be of rectangular shape.\n" _("- 'Rectangular' - the bounding box will be of rectangular shape.\n"
"- 'Minimal' - the bounding box will be the convex hull shape.") "- 'Minimal' - the bounding box will be the convex hull shape.")
) )
grid_lay.addWidget(self.bbox_type_label, 6, 0) self.bbox_type_radio = RadioSet([
grid_lay.addWidget(self.bbox_type_radio, 6, 1) {'label': _('Rectangular'), 'value': 'rect'},
{"label": _("Minimal"), "value": "min"}
], stretch=False)
grid_lay.addWidget(self.bbox_type_label, 14, 0)
grid_lay.addWidget(self.bbox_type_radio, 14, 1)
self.bbox_type_label.hide() self.bbox_type_label.hide()
self.bbox_type_radio.hide() self.bbox_type_radio.hide()
separator_line = QtWidgets.QFrame() separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine) separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken) separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid_lay.addWidget(separator_line, 7, 0, 1, 2) grid_lay.addWidget(separator_line, 16, 0, 1, 2)
# Fill Type # Fill Type
self.fill_type_radio = RadioSet([ self.fill_type_radio = RadioSet([
@ -1323,15 +1390,15 @@ class ThievingUI:
{"label": _("Squares Grid"), "value": "square"}, {"label": _("Squares Grid"), "value": "square"},
{"label": _("Lines Grid"), "value": "line"} {"label": _("Lines Grid"), "value": "line"}
], orientation='vertical', stretch=False) ], orientation='vertical', stretch=False)
self.fill_type_label = QtWidgets.QLabel(_("Fill Type:")) self.fill_type_label = FCLabel(_("Fill Type:"))
self.fill_type_label.setToolTip( self.fill_type_label.setToolTip(
_("- 'Solid' - copper thieving will be a solid polygon.\n" _("- 'Solid' - copper thieving will be a solid polygon.\n"
"- 'Dots Grid' - the empty area will be filled with a pattern of dots.\n" "- 'Dots Grid' - the empty area will be filled with a pattern of dots.\n"
"- 'Squares Grid' - the empty area will be filled with a pattern of squares.\n" "- 'Squares Grid' - the empty area will be filled with a pattern of squares.\n"
"- 'Lines Grid' - the empty area will be filled with a pattern of lines.") "- 'Lines Grid' - the empty area will be filled with a pattern of lines.")
) )
grid_lay.addWidget(self.fill_type_label, 8, 0) grid_lay.addWidget(self.fill_type_label, 18, 0)
grid_lay.addWidget(self.fill_type_radio, 8, 1) grid_lay.addWidget(self.fill_type_radio, 18, 1)
# DOTS FRAME # DOTS FRAME
self.dots_frame = QtWidgets.QFrame() self.dots_frame = QtWidgets.QFrame()
@ -1344,16 +1411,16 @@ class ThievingUI:
self.dots_frame.setLayout(dots_grid) self.dots_frame.setLayout(dots_grid)
self.dots_frame.hide() self.dots_frame.hide()
self.dots_label = QtWidgets.QLabel('<b>%s</b>:' % _("Dots Grid Parameters")) self.dots_label = FCLabel('<b>%s</b>:' % _("Dots Grid Parameters"))
dots_grid.addWidget(self.dots_label, 0, 0, 1, 2) dots_grid.addWidget(self.dots_label, 0, 0, 1, 2)
# Dot diameter # # Dot diameter #
self.dotdia_label = QtWidgets.QLabel('%s:' % _("Dia")) self.dotdia_label = FCLabel('%s:' % _("Dia"))
self.dotdia_label.setToolTip( self.dotdia_label.setToolTip(
_("Dot diameter in Dots Grid.") _("Dot diameter in Dots Grid.")
) )
self.dot_dia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dot_dia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dot_dia_entry.set_range(0.0, 9999.9999) self.dot_dia_entry.set_range(0.0, 10000.0000)
self.dot_dia_entry.set_precision(self.decimals) self.dot_dia_entry.set_precision(self.decimals)
self.dot_dia_entry.setSingleStep(0.1) self.dot_dia_entry.setSingleStep(0.1)
@ -1361,12 +1428,12 @@ class ThievingUI:
dots_grid.addWidget(self.dot_dia_entry, 1, 1) dots_grid.addWidget(self.dot_dia_entry, 1, 1)
# Dot spacing # # Dot spacing #
self.dotspacing_label = QtWidgets.QLabel('%s:' % _("Spacing")) self.dotspacing_label = FCLabel('%s:' % _("Spacing"))
self.dotspacing_label.setToolTip( self.dotspacing_label.setToolTip(
_("Distance between each two dots in Dots Grid.") _("Distance between each two dots in Dots Grid.")
) )
self.dot_spacing_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dot_spacing_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dot_spacing_entry.set_range(0.0, 9999.9999) self.dot_spacing_entry.set_range(0.0, 10000.0000)
self.dot_spacing_entry.set_precision(self.decimals) self.dot_spacing_entry.set_precision(self.decimals)
self.dot_spacing_entry.setSingleStep(0.1) self.dot_spacing_entry.setSingleStep(0.1)
@ -1384,16 +1451,16 @@ class ThievingUI:
self.squares_frame.setLayout(squares_grid) self.squares_frame.setLayout(squares_grid)
self.squares_frame.hide() self.squares_frame.hide()
self.squares_label = QtWidgets.QLabel('<b>%s</b>:' % _("Squares Grid Parameters")) self.squares_label = FCLabel('<b>%s</b>:' % _("Squares Grid Parameters"))
squares_grid.addWidget(self.squares_label, 0, 0, 1, 2) squares_grid.addWidget(self.squares_label, 0, 0, 1, 2)
# Square Size # # Square Size #
self.square_size_label = QtWidgets.QLabel('%s:' % _("Size")) self.square_size_label = FCLabel('%s:' % _("Size"))
self.square_size_label.setToolTip( self.square_size_label.setToolTip(
_("Square side size in Squares Grid.") _("Square side size in Squares Grid.")
) )
self.square_size_entry = FCDoubleSpinner(callback=self.confirmation_message) self.square_size_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.square_size_entry.set_range(0.0, 9999.9999) self.square_size_entry.set_range(0.0, 10000.0000)
self.square_size_entry.set_precision(self.decimals) self.square_size_entry.set_precision(self.decimals)
self.square_size_entry.setSingleStep(0.1) self.square_size_entry.setSingleStep(0.1)
@ -1401,12 +1468,12 @@ class ThievingUI:
squares_grid.addWidget(self.square_size_entry, 1, 1) squares_grid.addWidget(self.square_size_entry, 1, 1)
# Squares spacing # # Squares spacing #
self.squares_spacing_label = QtWidgets.QLabel('%s:' % _("Spacing")) self.squares_spacing_label = FCLabel('%s:' % _("Spacing"))
self.squares_spacing_label.setToolTip( self.squares_spacing_label.setToolTip(
_("Distance between each two squares in Squares Grid.") _("Distance between each two squares in Squares Grid.")
) )
self.squares_spacing_entry = FCDoubleSpinner(callback=self.confirmation_message) self.squares_spacing_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.squares_spacing_entry.set_range(0.0, 9999.9999) self.squares_spacing_entry.set_range(0.0, 10000.0000)
self.squares_spacing_entry.set_precision(self.decimals) self.squares_spacing_entry.set_precision(self.decimals)
self.squares_spacing_entry.setSingleStep(0.1) self.squares_spacing_entry.setSingleStep(0.1)
@ -1424,16 +1491,16 @@ class ThievingUI:
self.lines_frame.setLayout(lines_grid) self.lines_frame.setLayout(lines_grid)
self.lines_frame.hide() self.lines_frame.hide()
self.lines_label = QtWidgets.QLabel('<b>%s</b>:' % _("Lines Grid Parameters")) self.lines_label = FCLabel('<b>%s</b>:' % _("Lines Grid Parameters"))
lines_grid.addWidget(self.lines_label, 0, 0, 1, 2) lines_grid.addWidget(self.lines_label, 0, 0, 1, 2)
# Square Size # # Square Size #
self.line_size_label = QtWidgets.QLabel('%s:' % _("Size")) self.line_size_label = FCLabel('%s:' % _("Size"))
self.line_size_label.setToolTip( self.line_size_label.setToolTip(
_("Line thickness size in Lines Grid.") _("Line thickness size in Lines Grid.")
) )
self.line_size_entry = FCDoubleSpinner(callback=self.confirmation_message) self.line_size_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.line_size_entry.set_range(0.0, 9999.9999) self.line_size_entry.set_range(0.0, 10000.0000)
self.line_size_entry.set_precision(self.decimals) self.line_size_entry.set_precision(self.decimals)
self.line_size_entry.setSingleStep(0.1) self.line_size_entry.setSingleStep(0.1)
@ -1441,12 +1508,12 @@ class ThievingUI:
lines_grid.addWidget(self.line_size_entry, 1, 1) lines_grid.addWidget(self.line_size_entry, 1, 1)
# Lines spacing # # Lines spacing #
self.lines_spacing_label = QtWidgets.QLabel('%s:' % _("Spacing")) self.lines_spacing_label = FCLabel('%s:' % _("Spacing"))
self.lines_spacing_label.setToolTip( self.lines_spacing_label.setToolTip(
_("Distance between each two lines in Lines Grid.") _("Distance between each two lines in Lines Grid.")
) )
self.lines_spacing_entry = FCDoubleSpinner(callback=self.confirmation_message) self.lines_spacing_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.lines_spacing_entry.set_range(0.0, 9999.9999) self.lines_spacing_entry.set_range(0.0, 10000.0000)
self.lines_spacing_entry.set_precision(self.decimals) self.lines_spacing_entry.set_precision(self.decimals)
self.lines_spacing_entry.setSingleStep(0.1) self.lines_spacing_entry.setSingleStep(0.1)
@ -1480,40 +1547,40 @@ class ThievingUI:
separator_line_1.setFrameShadow(QtWidgets.QFrame.Sunken) separator_line_1.setFrameShadow(QtWidgets.QFrame.Sunken)
grid_lay_1.addWidget(separator_line_1, 0, 0, 1, 3) grid_lay_1.addWidget(separator_line_1, 0, 0, 1, 3)
grid_lay_1.addWidget(QtWidgets.QLabel('')) grid_lay_1.addWidget(FCLabel(''))
self.robber_bar_label = QtWidgets.QLabel('<b>%s</b>' % _('Robber Bar Parameters')) self.robber_bar_label = FCLabel('<b>%s</b>' % _('Robber Bar Parameters'))
self.robber_bar_label.setToolTip( self.robber_bar_label.setToolTip(
_("Parameters used for the robber bar.\n" _("Parameters used for the robber bar.\n"
"Robber bar = copper border to help in pattern hole plating.") "Robber bar = copper border to help in pattern hole plating.")
) )
grid_lay_1.addWidget(self.robber_bar_label, 1, 0, 1, 3) grid_lay_1.addWidget(self.robber_bar_label, 2, 0, 1, 3)
# ROBBER BAR MARGIN # # ROBBER BAR MARGIN #
self.rb_margin_label = QtWidgets.QLabel('%s:' % _("Margin")) self.rb_margin_label = FCLabel('%s:' % _("Margin"))
self.rb_margin_label.setToolTip( self.rb_margin_label.setToolTip(
_("Bounding box margin for robber bar.") _("Bounding box margin for robber bar.")
) )
self.rb_margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.rb_margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.rb_margin_entry.set_range(-9999.9999, 9999.9999) self.rb_margin_entry.set_range(-10000.0000, 10000.0000)
self.rb_margin_entry.set_precision(self.decimals) self.rb_margin_entry.set_precision(self.decimals)
self.rb_margin_entry.setSingleStep(0.1) self.rb_margin_entry.setSingleStep(0.1)
grid_lay_1.addWidget(self.rb_margin_label, 2, 0) grid_lay_1.addWidget(self.rb_margin_label, 4, 0)
grid_lay_1.addWidget(self.rb_margin_entry, 2, 1, 1, 2) grid_lay_1.addWidget(self.rb_margin_entry, 4, 1, 1, 2)
# THICKNESS # # THICKNESS #
self.rb_thickness_label = QtWidgets.QLabel('%s:' % _("Thickness")) self.rb_thickness_label = FCLabel('%s:' % _("Thickness"))
self.rb_thickness_label.setToolTip( self.rb_thickness_label.setToolTip(
_("The robber bar thickness.") _("The robber bar thickness.")
) )
self.rb_thickness_entry = FCDoubleSpinner(callback=self.confirmation_message) self.rb_thickness_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.rb_thickness_entry.set_range(0.0000, 9999.9999) self.rb_thickness_entry.set_range(0.0000, 10000.0000)
self.rb_thickness_entry.set_precision(self.decimals) self.rb_thickness_entry.set_precision(self.decimals)
self.rb_thickness_entry.setSingleStep(0.1) self.rb_thickness_entry.setSingleStep(0.1)
grid_lay_1.addWidget(self.rb_thickness_label, 3, 0) grid_lay_1.addWidget(self.rb_thickness_label, 6, 0)
grid_lay_1.addWidget(self.rb_thickness_entry, 3, 1, 1, 2) grid_lay_1.addWidget(self.rb_thickness_entry, 6, 1, 1, 2)
# ## Insert Robber Bar # ## Insert Robber Bar
self.rb_button = QtWidgets.QPushButton(_("Insert Robber Bar")) self.rb_button = QtWidgets.QPushButton(_("Insert Robber Bar"))
@ -1530,20 +1597,20 @@ class ThievingUI:
font-weight: bold; font-weight: bold;
} }
""") """)
grid_lay_1.addWidget(self.rb_button, 4, 0, 1, 3) grid_lay_1.addWidget(self.rb_button, 8, 0, 1, 3)
separator_line_2 = QtWidgets.QFrame() separator_line_2 = QtWidgets.QFrame()
separator_line_2.setFrameShape(QtWidgets.QFrame.HLine) separator_line_2.setFrameShape(QtWidgets.QFrame.HLine)
separator_line_2.setFrameShadow(QtWidgets.QFrame.Sunken) separator_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
grid_lay_1.addWidget(separator_line_2, 5, 0, 1, 3) grid_lay_1.addWidget(separator_line_2, 10, 0, 1, 3)
self.patern_mask_label = QtWidgets.QLabel('<b>%s</b>' % _('Pattern Plating Mask')) self.patern_mask_label = FCLabel('<b>%s</b>' % _('Pattern Plating Mask'))
self.patern_mask_label.setToolTip( self.patern_mask_label.setToolTip(
_("Generate a mask for pattern plating.") _("Generate a mask for pattern plating.")
) )
grid_lay_1.addWidget(self.patern_mask_label, 6, 0, 1, 3) grid_lay_1.addWidget(self.patern_mask_label, 12, 0, 1, 3)
self.sm_obj_label = QtWidgets.QLabel("%s:" % _("Select Soldermask object")) self.sm_obj_label = FCLabel("%s:" % _("Select Soldermask object"))
self.sm_obj_label.setToolTip( self.sm_obj_label.setToolTip(
_("Gerber Object with the soldermask.\n" _("Gerber Object with the soldermask.\n"
"It will be used as a base for\n" "It will be used as a base for\n"
@ -1556,25 +1623,25 @@ class ThievingUI:
self.sm_object_combo.is_last = True self.sm_object_combo.is_last = True
self.sm_object_combo.obj_type = 'Gerber' self.sm_object_combo.obj_type = 'Gerber'
grid_lay_1.addWidget(self.sm_obj_label, 7, 0, 1, 3) grid_lay_1.addWidget(self.sm_obj_label, 14, 0, 1, 3)
grid_lay_1.addWidget(self.sm_object_combo, 8, 0, 1, 3) grid_lay_1.addWidget(self.sm_object_combo, 16, 0, 1, 3)
# Openings CLEARANCE # # Openings CLEARANCE #
self.clearance_ppm_label = QtWidgets.QLabel('%s:' % _("Clearance")) self.clearance_ppm_label = FCLabel('%s:' % _("Clearance"))
self.clearance_ppm_label.setToolTip( self.clearance_ppm_label.setToolTip(
_("The distance between the possible copper thieving elements\n" _("The distance between the possible copper thieving elements\n"
"and/or robber bar and the actual openings in the mask.") "and/or robber bar and the actual openings in the mask.")
) )
self.clearance_ppm_entry = FCDoubleSpinner(callback=self.confirmation_message) self.clearance_ppm_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.clearance_ppm_entry.set_range(-9999.9999, 9999.9999) self.clearance_ppm_entry.set_range(-10000.0000, 10000.0000)
self.clearance_ppm_entry.set_precision(self.decimals) self.clearance_ppm_entry.set_precision(self.decimals)
self.clearance_ppm_entry.setSingleStep(0.1) self.clearance_ppm_entry.setSingleStep(0.1)
grid_lay_1.addWidget(self.clearance_ppm_label, 9, 0) grid_lay_1.addWidget(self.clearance_ppm_label, 18, 0)
grid_lay_1.addWidget(self.clearance_ppm_entry, 9, 1, 1, 2) grid_lay_1.addWidget(self.clearance_ppm_entry, 18, 1, 1, 2)
# Plated area # Plated area
self.plated_area_label = QtWidgets.QLabel('%s:' % _("Plated area")) self.plated_area_label = FCLabel('%s:' % _("Plated area"))
self.plated_area_label.setToolTip( self.plated_area_label.setToolTip(
_("The area to be plated by pattern plating.\n" _("The area to be plated by pattern plating.\n"
"Basically is made from the openings in the plating mask.\n\n" "Basically is made from the openings in the plating mask.\n\n"
@ -1587,13 +1654,27 @@ class ThievingUI:
self.plated_area_entry.setDisabled(True) self.plated_area_entry.setDisabled(True)
if self.units.upper() == 'MM': if self.units.upper() == 'MM':
self.units_area_label = QtWidgets.QLabel('%s<sup>2</sup>' % _("mm")) self.units_area_label = FCLabel('%s<sup>2</sup>' % _("mm"))
else: else:
self.units_area_label = QtWidgets.QLabel('%s<sup>2</sup>' % _("in")) self.units_area_label = FCLabel('%s<sup>2</sup>' % _("in"))
grid_lay_1.addWidget(self.plated_area_label, 10, 0) grid_lay_1.addWidget(self.plated_area_label, 20, 0)
grid_lay_1.addWidget(self.plated_area_entry, 10, 1) grid_lay_1.addWidget(self.plated_area_entry, 20, 1)
grid_lay_1.addWidget(self.units_area_label, 10, 2) grid_lay_1.addWidget(self.units_area_label, 20, 2)
# Include geometry
self.ppm_choice_label = FCLabel('%s:' % _("Add"))
self.ppm_choice_label.setToolTip(
_("Choose which additional geometry to include, if available.")
)
self.ppm_choice_radio = RadioSet([
{"label": _("Both"), "value": "b"},
{'label': _('Thieving'), 'value': 't'},
{"label": _("Robber bar"), "value": "r"},
{"label": _("None"), "value": "n"}
], orientation='vertical', stretch=False)
grid_lay_1.addWidget(self.ppm_choice_label, 22, 0)
grid_lay_1.addWidget(self.ppm_choice_radio, 22, 1, 1, 2)
# ## Pattern Plating Mask # ## Pattern Plating Mask
self.ppm_button = QtWidgets.QPushButton(_("Generate pattern plating mask")) self.ppm_button = QtWidgets.QPushButton(_("Generate pattern plating mask"))
@ -1609,7 +1690,7 @@ class ThievingUI:
font-weight: bold; font-weight: bold;
} }
""") """)
grid_lay_1.addWidget(self.ppm_button, 11, 0, 1, 3) grid_lay_1.addWidget(self.ppm_button, 24, 0, 1, 3)
self.layout.addStretch() self.layout.addStretch()

View File

@ -339,9 +339,6 @@ class ToolCorners(AppTool):
bl_state = self.ui.bl_cb.get_value() bl_state = self.ui.bl_cb.get_value()
br_state = self.ui.br_cb.get_value() br_state = self.ui.br_cb.get_value()
if not tl_state and not tr_state and not bl_state and not br_state:
self.app.inform.emit("[ERROR_NOTCL] %s." % _("Please select at least a location"))
# get the Gerber object on which the corner marker will be inserted # get the Gerber object on which the corner marker will be inserted
selection_index = self.ui.object_combo.currentIndex() selection_index = self.ui.object_combo.currentIndex()
model_index = self.app.collection.index(selection_index, 0, self.ui.object_combo.rootModelIndex()) model_index = self.app.collection.index(selection_index, 0, self.ui.object_combo.rootModelIndex())
@ -354,6 +351,11 @@ class ToolCorners(AppTool):
self.app.call_source = "app" self.app.call_source = "app"
return return
if tl_state is False and tr_state is False and bl_state is False and br_state is False:
self.app.inform.emit("[ERROR_NOTCL] %s." % _("Please select at least a location"))
self.app.call_source = "app"
return
xmin, ymin, xmax, ymax = self.grb_object.bounds() xmin, ymin, xmax, ymax = self.grb_object.bounds()
# list of (x,y) tuples. Store here the drill coordinates # list of (x,y) tuples. Store here the drill coordinates
@ -393,6 +395,9 @@ class ToolCorners(AppTool):
tools[1]['solid_geometry'] = [] tools[1]['solid_geometry'] = []
def obj_init(obj_inst, app_inst): def obj_init(obj_inst, app_inst):
obj_inst.options.update({
'name': outname
})
obj_inst.tools = deepcopy(tools) obj_inst.tools = deepcopy(tools)
obj_inst.create_geometry() obj_inst.create_geometry()
obj_inst.source_file = app_inst.f_handlers.export_excellon(obj_name=obj_inst.options['name'], obj_inst.source_file = app_inst.f_handlers.export_excellon(obj_name=obj_inst.options['name'],
@ -401,12 +406,10 @@ class ToolCorners(AppTool):
use_thread=False) use_thread=False)
outname = '%s_%s' % (str(self.grb_object.options['name']), 'corner_drills') outname = '%s_%s' % (str(self.grb_object.options['name']), 'corner_drills')
ret_val = self.app.app_obj.new_object("excellon", outname, obj_init) ret_val = self.app.app_obj.new_object("excellon", outname, obj_init)
self.app.call_source = "app" self.app.call_source = "app"
if ret_val == 'fail':
if not ret_val == 'fail':
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Failed.")) self.app.inform.emit('[ERROR_NOTCL] %s' % _("Failed."))
else: else:
self.app.inform.emit('[success] %s' % _("Excellon object with corner drills created.")) self.app.inform.emit('[success] %s' % _("Excellon object with corner drills created."))

View File

@ -2072,7 +2072,7 @@ class CutoutUI:
# Tool Diameter # Tool Diameter
self.dia = FCDoubleSpinner(callback=self.confirmation_message) self.dia = FCDoubleSpinner(callback=self.confirmation_message)
self.dia.set_precision(self.decimals) self.dia.set_precision(self.decimals)
self.dia.set_range(0.0000, 9999.9999) self.dia.set_range(0.0000, 10000.0000)
self.dia_label = QtWidgets.QLabel('%s:' % _("Tool Dia")) self.dia_label = QtWidgets.QLabel('%s:' % _("Tool Dia"))
self.dia_label.setToolTip( self.dia_label.setToolTip(
@ -2129,9 +2129,9 @@ class CutoutUI:
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.cutz_entry.setRange(-9999.9999, -0.00001) self.cutz_entry.setRange(-10000.0000, -0.00001)
else: else:
self.cutz_entry.setRange(-9999.9999, 9999.9999) self.cutz_entry.setRange(-10000.0000, 10000.0000)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
@ -2151,7 +2151,7 @@ class CutoutUI:
self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.maxdepth_entry.set_precision(self.decimals) self.maxdepth_entry.set_precision(self.decimals)
self.maxdepth_entry.setRange(0, 9999.9999) self.maxdepth_entry.setRange(0, 10000.0000)
self.maxdepth_entry.setSingleStep(0.1) self.maxdepth_entry.setSingleStep(0.1)
self.maxdepth_entry.setToolTip( self.maxdepth_entry.setToolTip(
@ -2167,7 +2167,7 @@ class CutoutUI:
# Margin # Margin
self.margin = FCDoubleSpinner(callback=self.confirmation_message) self.margin = FCDoubleSpinner(callback=self.confirmation_message)
self.margin.set_range(-9999.9999, 9999.9999) self.margin.set_range(-10000.0000, 10000.0000)
self.margin.setSingleStep(0.1) self.margin.setSingleStep(0.1)
self.margin.set_precision(self.decimals) self.margin.set_precision(self.decimals)
@ -2225,9 +2225,9 @@ class CutoutUI:
self.thin_depth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.thin_depth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.thin_depth_entry.set_precision(self.decimals) self.thin_depth_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.thin_depth_entry.setRange(-9999.9999, -0.00001) self.thin_depth_entry.setRange(-10000.0000, -0.00001)
else: else:
self.thin_depth_entry.setRange(-9999.9999, 9999.9999) self.thin_depth_entry.setRange(-10000.0000, 10000.0000)
self.thin_depth_entry.setSingleStep(0.1) self.thin_depth_entry.setSingleStep(0.1)
grid0.addWidget(self.thin_depth_label, 32, 0) grid0.addWidget(self.thin_depth_label, 32, 0)

View File

@ -565,7 +565,7 @@ class DsidedUI:
# Xmin value # Xmin value
self.xmin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.xmin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.xmin_entry.set_precision(self.decimals) self.xmin_entry.set_precision(self.decimals)
self.xmin_entry.set_range(-9999.9999, 9999.9999) self.xmin_entry.set_range(-10000.0000, 10000.0000)
self.xmin_btn = FCButton('%s:' % _("X min")) self.xmin_btn = FCButton('%s:' % _("X min"))
self.xmin_btn.setToolTip( self.xmin_btn.setToolTip(
@ -579,7 +579,7 @@ class DsidedUI:
# Ymin value # Ymin value
self.ymin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.ymin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.ymin_entry.set_precision(self.decimals) self.ymin_entry.set_precision(self.decimals)
self.ymin_entry.set_range(-9999.9999, 9999.9999) self.ymin_entry.set_range(-10000.0000, 10000.0000)
self.ymin_btn = FCButton('%s:' % _("Y min")) self.ymin_btn = FCButton('%s:' % _("Y min"))
self.ymin_btn.setToolTip( self.ymin_btn.setToolTip(
@ -593,7 +593,7 @@ class DsidedUI:
# Xmax value # Xmax value
self.xmax_entry = FCDoubleSpinner(callback=self.confirmation_message) self.xmax_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.xmax_entry.set_precision(self.decimals) self.xmax_entry.set_precision(self.decimals)
self.xmax_entry.set_range(-9999.9999, 9999.9999) self.xmax_entry.set_range(-10000.0000, 10000.0000)
self.xmax_btn = FCButton('%s:' % _("X max")) self.xmax_btn = FCButton('%s:' % _("X max"))
self.xmax_btn.setToolTip( self.xmax_btn.setToolTip(
@ -607,7 +607,7 @@ class DsidedUI:
# Ymax value # Ymax value
self.ymax_entry = FCDoubleSpinner(callback=self.confirmation_message) self.ymax_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.ymax_entry.set_precision(self.decimals) self.ymax_entry.set_precision(self.decimals)
self.ymax_entry.set_range(-9999.9999, 9999.9999) self.ymax_entry.set_range(-10000.0000, 10000.0000)
self.ymax_btn = FCButton('%s:' % _("Y max")) self.ymax_btn = FCButton('%s:' % _("Y max"))
self.ymax_btn.setToolTip( self.ymax_btn.setToolTip(
@ -834,7 +834,7 @@ class DsidedUI:
_("Diameter of the drill for the alignment holes.") _("Diameter of the drill for the alignment holes.")
) )
self.drill_dia.set_precision(self.decimals) self.drill_dia.set_precision(self.decimals)
self.drill_dia.set_range(0.0000, 9999.9999) self.drill_dia.set_range(0.0000, 10000.0000)
grid4.addWidget(self.dt_label, 2, 0) grid4.addWidget(self.dt_label, 2, 0)
grid4.addWidget(self.drill_dia, 2, 1) grid4.addWidget(self.drill_dia, 2, 1)

View File

@ -2150,9 +2150,9 @@ class DrillingUI:
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.cutz_entry.set_range(-9999.9999, 0.0000) self.cutz_entry.set_range(-10000.0000, 0.0000)
else: else:
self.cutz_entry.set_range(-9999.9999, 9999.9999) self.cutz_entry.set_range(-10000.0000, 10000.0000)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
self.cutz_entry.setObjectName("e_cutz") self.cutz_entry.setObjectName("e_cutz")
@ -2174,7 +2174,7 @@ class DrillingUI:
self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.maxdepth_entry.set_precision(self.decimals) self.maxdepth_entry.set_precision(self.decimals)
self.maxdepth_entry.set_range(0, 9999.9999) self.maxdepth_entry.set_range(0, 10000.0000)
self.maxdepth_entry.setSingleStep(0.1) self.maxdepth_entry.setSingleStep(0.1)
self.maxdepth_entry.setToolTip(_("Depth of each pass (positive).")) self.maxdepth_entry.setToolTip(_("Depth of each pass (positive)."))
@ -2196,9 +2196,9 @@ class DrillingUI:
self.travelz_entry.set_precision(self.decimals) self.travelz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.travelz_entry.set_range(0.00001, 9999.9999) self.travelz_entry.set_range(0.00001, 10000.0000)
else: else:
self.travelz_entry.set_range(-9999.9999, 9999.9999) self.travelz_entry.set_range(-10000.0000, 10000.0000)
self.travelz_entry.setSingleStep(0.1) self.travelz_entry.setSingleStep(0.1)
self.travelz_entry.setObjectName("e_travelz") self.travelz_entry.setObjectName("e_travelz")
@ -2216,7 +2216,7 @@ class DrillingUI:
) )
self.feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_z_entry.set_precision(self.decimals) self.feedrate_z_entry.set_precision(self.decimals)
self.feedrate_z_entry.set_range(0.0, 99999.9999) self.feedrate_z_entry.set_range(0.0, 910000.0000)
self.feedrate_z_entry.setSingleStep(0.1) self.feedrate_z_entry.setSingleStep(0.1)
self.feedrate_z_entry.setObjectName("e_feedratez") self.feedrate_z_entry.setObjectName("e_feedratez")
@ -2234,7 +2234,7 @@ class DrillingUI:
) )
self.feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_rapid_entry.set_precision(self.decimals) self.feedrate_rapid_entry.set_precision(self.decimals)
self.feedrate_rapid_entry.set_range(0.0, 99999.9999) self.feedrate_rapid_entry.set_range(0.0, 910000.0000)
self.feedrate_rapid_entry.setSingleStep(0.1) self.feedrate_rapid_entry.setSingleStep(0.1)
self.feedrate_rapid_entry.setObjectName("e_fr_rapid") self.feedrate_rapid_entry.setObjectName("e_fr_rapid")
@ -2271,7 +2271,7 @@ class DrillingUI:
# Dwelltime # Dwelltime
self.dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dwelltime_entry.set_precision(self.decimals) self.dwelltime_entry.set_precision(self.decimals)
self.dwelltime_entry.set_range(0.0, 9999.9999) self.dwelltime_entry.set_range(0.0, 10000.0000)
self.dwelltime_entry.setSingleStep(0.1) self.dwelltime_entry.setSingleStep(0.1)
self.dwelltime_entry.setToolTip( self.dwelltime_entry.setToolTip(
@ -2294,7 +2294,7 @@ class DrillingUI:
self.offset_entry = FCDoubleSpinner(callback=self.confirmation_message) self.offset_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.offset_entry.set_precision(self.decimals) self.offset_entry.set_precision(self.decimals)
self.offset_entry.set_range(-9999.9999, 9999.9999) self.offset_entry.set_range(-10000.0000, 10000.0000)
self.offset_entry.setObjectName("e_offset") self.offset_entry.setObjectName("e_offset")
self.grid1.addWidget(self.tool_offset_label, 25, 0) self.grid1.addWidget(self.tool_offset_label, 25, 0)
@ -2402,9 +2402,9 @@ class DrillingUI:
self.toolchangez_entry.setObjectName("e_toolchangez") self.toolchangez_entry.setObjectName("e_toolchangez")
if machinist_setting == 0: if machinist_setting == 0:
self.toolchangez_entry.set_range(0.0, 9999.9999) self.toolchangez_entry.set_range(0.0, 10000.0000)
else: else:
self.toolchangez_entry.set_range(-9999.9999, 9999.9999) self.toolchangez_entry.set_range(-10000.0000, 10000.0000)
self.toolchangez_entry.setSingleStep(0.1) self.toolchangez_entry.setSingleStep(0.1)
@ -2434,9 +2434,9 @@ class DrillingUI:
self.endz_entry.setObjectName("e_endz") self.endz_entry.setObjectName("e_endz")
if machinist_setting == 0: if machinist_setting == 0:
self.endz_entry.set_range(0.0, 9999.9999) self.endz_entry.set_range(0.0, 10000.0000)
else: else:
self.endz_entry.set_range(-9999.9999, 9999.9999) self.endz_entry.set_range(-10000.0000, 10000.0000)
self.endz_entry.setSingleStep(0.1) self.endz_entry.setSingleStep(0.1)
@ -2466,7 +2466,7 @@ class DrillingUI:
self.pdepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.pdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.pdepth_entry.set_precision(self.decimals) self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-9999.9999, 9999.9999) self.pdepth_entry.set_range(-10000.0000, 10000.0000)
self.pdepth_entry.setSingleStep(0.1) self.pdepth_entry.setSingleStep(0.1)
self.pdepth_entry.setObjectName("e_depth_probe") self.pdepth_entry.setObjectName("e_depth_probe")
@ -2484,7 +2484,7 @@ class DrillingUI:
self.feedrate_probe_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_probe_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_probe_entry.set_precision(self.decimals) self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0.0, 9999.9999) self.feedrate_probe_entry.set_range(0.0, 10000.0000)
self.feedrate_probe_entry.setSingleStep(0.1) self.feedrate_probe_entry.setSingleStep(0.1)
self.feedrate_probe_entry.setObjectName("e_fr_probe") self.feedrate_probe_entry.setObjectName("e_fr_probe")
@ -2573,7 +2573,7 @@ class DrillingUI:
self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n" self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n"
"an interdiction area.")) "an interdiction area."))
self.over_z_entry = FCDoubleSpinner() self.over_z_entry = FCDoubleSpinner()
self.over_z_entry.set_range(0.000, 9999.9999) self.over_z_entry.set_range(0.000, 10000.0000)
self.over_z_entry.set_precision(self.decimals) self.over_z_entry.set_precision(self.decimals)
self.over_z_entry.setObjectName("e_area_overz") self.over_z_entry.setObjectName("e_area_overz")

View File

@ -366,7 +366,7 @@ class EtchUI:
) )
self.thick_entry = FCDoubleSpinner(callback=self.confirmation_message) self.thick_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.thick_entry.set_precision(self.decimals) self.thick_entry.set_precision(self.decimals)
self.thick_entry.set_range(0.0000, 9999.9999) self.thick_entry.set_range(0.0000, 10000.0000)
self.thick_entry.setObjectName(_("Thickness")) self.thick_entry.setObjectName(_("Thickness"))
grid0.addWidget(self.thick_label, 12, 0) grid0.addWidget(self.thick_label, 12, 0)
@ -421,7 +421,7 @@ class EtchUI:
) )
self.offset_entry = FCDoubleSpinner(callback=self.confirmation_message) self.offset_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.offset_entry.set_precision(self.decimals) self.offset_entry.set_precision(self.decimals)
self.offset_entry.set_range(-9999.9999, 9999.9999) self.offset_entry.set_range(-10000.0000, 10000.0000)
self.offset_entry.setObjectName(_("Offset")) self.offset_entry.setObjectName(_("Offset"))
grid0.addWidget(self.offset_label, 20, 0) grid0.addWidget(self.offset_label, 20, 0)

View File

@ -552,7 +552,7 @@ class ExtractDrillsUI:
# Diameter value # Diameter value
self.dia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dia_entry.set_precision(self.decimals) self.dia_entry.set_precision(self.decimals)
self.dia_entry.set_range(0.0000, 9999.9999) self.dia_entry.set_range(0.0000, 10000.0000)
self.dia_label = QtWidgets.QLabel('%s:' % _("Value")) self.dia_label = QtWidgets.QLabel('%s:' % _("Value"))
self.dia_label.setToolTip( self.dia_label.setToolTip(
@ -593,7 +593,7 @@ class ExtractDrillsUI:
self.circular_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.circular_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.circular_ring_entry.set_precision(self.decimals) self.circular_ring_entry.set_precision(self.decimals)
self.circular_ring_entry.set_range(0.0000, 9999.9999) self.circular_ring_entry.set_range(0.0000, 10000.0000)
grid2.addWidget(self.circular_ring_label, 1, 0) grid2.addWidget(self.circular_ring_label, 1, 0)
grid2.addWidget(self.circular_ring_entry, 1, 1) grid2.addWidget(self.circular_ring_entry, 1, 1)
@ -606,7 +606,7 @@ class ExtractDrillsUI:
self.oblong_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.oblong_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.oblong_ring_entry.set_precision(self.decimals) self.oblong_ring_entry.set_precision(self.decimals)
self.oblong_ring_entry.set_range(0.0000, 9999.9999) self.oblong_ring_entry.set_range(0.0000, 10000.0000)
grid2.addWidget(self.oblong_ring_label, 2, 0) grid2.addWidget(self.oblong_ring_label, 2, 0)
grid2.addWidget(self.oblong_ring_entry, 2, 1) grid2.addWidget(self.oblong_ring_entry, 2, 1)
@ -619,7 +619,7 @@ class ExtractDrillsUI:
self.square_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.square_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.square_ring_entry.set_precision(self.decimals) self.square_ring_entry.set_precision(self.decimals)
self.square_ring_entry.set_range(0.0000, 9999.9999) self.square_ring_entry.set_range(0.0000, 10000.0000)
grid2.addWidget(self.square_ring_label, 3, 0) grid2.addWidget(self.square_ring_label, 3, 0)
grid2.addWidget(self.square_ring_entry, 3, 1) grid2.addWidget(self.square_ring_entry, 3, 1)
@ -632,7 +632,7 @@ class ExtractDrillsUI:
self.rectangular_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.rectangular_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.rectangular_ring_entry.set_precision(self.decimals) self.rectangular_ring_entry.set_precision(self.decimals)
self.rectangular_ring_entry.set_range(0.0000, 9999.9999) self.rectangular_ring_entry.set_range(0.0000, 10000.0000)
grid2.addWidget(self.rectangular_ring_label, 4, 0) grid2.addWidget(self.rectangular_ring_label, 4, 0)
grid2.addWidget(self.rectangular_ring_entry, 4, 1) grid2.addWidget(self.rectangular_ring_entry, 4, 1)
@ -645,7 +645,7 @@ class ExtractDrillsUI:
self.other_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.other_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.other_ring_entry.set_precision(self.decimals) self.other_ring_entry.set_precision(self.decimals)
self.other_ring_entry.set_range(0.0000, 9999.9999) self.other_ring_entry.set_range(0.0000, 10000.0000)
grid2.addWidget(self.other_ring_label, 5, 0) grid2.addWidget(self.other_ring_label, 5, 0)
grid2.addWidget(self.other_ring_entry, 5, 1) grid2.addWidget(self.other_ring_entry, 5, 1)

View File

@ -817,7 +817,7 @@ class FidoUI:
_("Bounding box margin.") _("Bounding box margin.")
) )
self.margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.margin_entry.set_range(-9999.9999, 9999.9999) self.margin_entry.set_range(-10000.0000, 10000.0000)
self.margin_entry.set_precision(self.decimals) self.margin_entry.set_precision(self.decimals)
self.margin_entry.setSingleStep(0.1) self.margin_entry.setSingleStep(0.1)
@ -880,7 +880,7 @@ class FidoUI:
_("Thickness of the line that makes the fiducial.") _("Thickness of the line that makes the fiducial.")
) )
self.line_thickness_entry = FCDoubleSpinner(callback=self.confirmation_message) self.line_thickness_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.line_thickness_entry.set_range(0.00001, 9999.9999) self.line_thickness_entry.set_range(0.00001, 10000.0000)
self.line_thickness_entry.set_precision(self.decimals) self.line_thickness_entry.set_precision(self.decimals)
self.line_thickness_entry.setSingleStep(0.1) self.line_thickness_entry.setSingleStep(0.1)

View File

@ -235,7 +235,7 @@ class InvertUI:
) )
self.margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.margin_entry.set_precision(self.decimals) self.margin_entry.set_precision(self.decimals)
self.margin_entry.set_range(0.0000, 9999.9999) self.margin_entry.set_range(0.0000, 10000.0000)
self.margin_entry.setObjectName(_("Margin")) self.margin_entry.setObjectName(_("Margin"))
grid0.addWidget(self.margin_label, 5, 0, 1, 2) grid0.addWidget(self.margin_label, 5, 0, 1, 2)

View File

@ -782,12 +782,12 @@ class ToolIsolation(AppTool, Gerber):
def on_add_tool_by_key(self): def on_add_tool_by_key(self):
# tool_add_popup = FCInputDialog(title='%s...' % _("New Tool"), # tool_add_popup = FCInputDialog(title='%s...' % _("New Tool"),
# text='%s:' % _('Enter a Tool Diameter'), # text='%s:' % _('Enter a Tool Diameter'),
# min=0.0001, max=9999.9999, decimals=self.decimals) # min=0.0001, max=10000.0000, decimals=self.decimals)
btn_icon = QtGui.QIcon(self.app.resource_location + '/open_excellon32.png') btn_icon = QtGui.QIcon(self.app.resource_location + '/open_excellon32.png')
tool_add_popup = FCInputDialogSpinnerButton(title='%s...' % _("New Tool"), tool_add_popup = FCInputDialogSpinnerButton(title='%s...' % _("New Tool"),
text='%s:' % _('Enter a Tool Diameter'), text='%s:' % _('Enter a Tool Diameter'),
min=0.0001, max=9999.9999, decimals=self.decimals, min=0.0001, max=10000.0000, decimals=self.decimals,
button_icon=btn_icon, button_icon=btn_icon,
callback=self.on_find_optimal_tooldia, callback=self.on_find_optimal_tooldia,
parent=self.app.ui) parent=self.app.ui)
@ -3111,7 +3111,7 @@ class IsoUI:
self.new_tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.new_tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.new_tooldia_entry.set_precision(self.decimals) self.new_tooldia_entry.set_precision(self.decimals)
self.new_tooldia_entry.set_range(0.000, 9999.9999) self.new_tooldia_entry.set_range(0.000, 10000.0000)
self.new_tooldia_entry.setObjectName("i_new_tooldia") self.new_tooldia_entry.setObjectName("i_new_tooldia")
new_tool_lay.addWidget(self.new_tooldia_entry) new_tool_lay.addWidget(self.new_tooldia_entry)

View File

@ -1783,7 +1783,7 @@ class MillingUI:
self.mill_dia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.mill_dia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.mill_dia_entry.set_precision(self.decimals) self.mill_dia_entry.set_precision(self.decimals)
self.mill_dia_entry.set_range(0.0000, 9999.9999) self.mill_dia_entry.set_range(0.0000, 10000.0000)
self.mill_dia_entry.setObjectName("e_milling_dia") self.mill_dia_entry.setObjectName("e_milling_dia")
self.grid1.addWidget(self.mill_dia_label, 3, 0) self.grid1.addWidget(self.mill_dia_label, 3, 0)
@ -1800,9 +1800,9 @@ class MillingUI:
self.cutz_entry.set_precision(self.decimals) self.cutz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.cutz_entry.set_range(-9999.9999, 0.0000) self.cutz_entry.set_range(-10000.0000, 0.0000)
else: else:
self.cutz_entry.set_range(-9999.9999, 9999.9999) self.cutz_entry.set_range(-10000.0000, 10000.0000)
self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setSingleStep(0.1)
self.cutz_entry.setObjectName("e_cutz") self.cutz_entry.setObjectName("e_cutz")
@ -1824,7 +1824,7 @@ class MillingUI:
self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.maxdepth_entry.set_precision(self.decimals) self.maxdepth_entry.set_precision(self.decimals)
self.maxdepth_entry.set_range(0, 9999.9999) self.maxdepth_entry.set_range(0, 10000.0000)
self.maxdepth_entry.setSingleStep(0.1) self.maxdepth_entry.setSingleStep(0.1)
self.maxdepth_entry.setToolTip(_("Depth of each pass (positive).")) self.maxdepth_entry.setToolTip(_("Depth of each pass (positive)."))
@ -1846,9 +1846,9 @@ class MillingUI:
self.travelz_entry.set_precision(self.decimals) self.travelz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.travelz_entry.set_range(0.00001, 9999.9999) self.travelz_entry.set_range(0.00001, 10000.0000)
else: else:
self.travelz_entry.set_range(-9999.9999, 9999.9999) self.travelz_entry.set_range(-10000.0000, 10000.0000)
self.travelz_entry.setSingleStep(0.1) self.travelz_entry.setSingleStep(0.1)
self.travelz_entry.setObjectName("e_travelz") self.travelz_entry.setObjectName("e_travelz")
@ -1864,7 +1864,7 @@ class MillingUI:
) )
self.xyfeedrate_entry = FCDoubleSpinner(callback=self.confirmation_message) self.xyfeedrate_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.xyfeedrate_entry.set_precision(self.decimals) self.xyfeedrate_entry.set_precision(self.decimals)
self.xyfeedrate_entry.set_range(0, 9999.9999) self.xyfeedrate_entry.set_range(0, 10000.0000)
self.xyfeedrate_entry.setSingleStep(0.1) self.xyfeedrate_entry.setSingleStep(0.1)
self.xyfeedrate_entry.setObjectName("e_feedratexy") self.xyfeedrate_entry.setObjectName("e_feedratexy")
@ -1881,7 +1881,7 @@ class MillingUI:
) )
self.feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_z_entry.set_precision(self.decimals) self.feedrate_z_entry.set_precision(self.decimals)
self.feedrate_z_entry.set_range(0.0, 99999.9999) self.feedrate_z_entry.set_range(0.0, 910000.0000)
self.feedrate_z_entry.setSingleStep(0.1) self.feedrate_z_entry.setSingleStep(0.1)
self.feedrate_z_entry.setObjectName("e_feedratez") self.feedrate_z_entry.setObjectName("e_feedratez")
@ -1899,7 +1899,7 @@ class MillingUI:
) )
self.feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_rapid_entry.set_precision(self.decimals) self.feedrate_rapid_entry.set_precision(self.decimals)
self.feedrate_rapid_entry.set_range(0.0, 99999.9999) self.feedrate_rapid_entry.set_range(0.0, 910000.0000)
self.feedrate_rapid_entry.setSingleStep(0.1) self.feedrate_rapid_entry.setSingleStep(0.1)
self.feedrate_rapid_entry.setObjectName("e_fr_rapid") self.feedrate_rapid_entry.setObjectName("e_fr_rapid")
@ -1963,7 +1963,7 @@ class MillingUI:
self.dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dwelltime_entry.set_precision(self.decimals) self.dwelltime_entry.set_precision(self.decimals)
self.dwelltime_entry.set_range(0.0, 9999.9999) self.dwelltime_entry.set_range(0.0, 10000.0000)
self.dwelltime_entry.setSingleStep(0.1) self.dwelltime_entry.setSingleStep(0.1)
self.dwelltime_entry.setToolTip( self.dwelltime_entry.setToolTip(
@ -1986,7 +1986,7 @@ class MillingUI:
self.offset_entry = FCDoubleSpinner(callback=self.confirmation_message) self.offset_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.offset_entry.set_precision(self.decimals) self.offset_entry.set_precision(self.decimals)
self.offset_entry.set_range(-9999.9999, 9999.9999) self.offset_entry.set_range(-10000.0000, 10000.0000)
self.offset_entry.setObjectName("e_offset") self.offset_entry.setObjectName("e_offset")
self.grid1.addWidget(self.tool_offset_label, 25, 0) self.grid1.addWidget(self.tool_offset_label, 25, 0)
@ -2073,9 +2073,9 @@ class MillingUI:
"tool change.") "tool change.")
) )
if machinist_setting == 0: if machinist_setting == 0:
self.toolchangez_entry.set_range(0.0, 9999.9999) self.toolchangez_entry.set_range(0.0, 10000.0000)
else: else:
self.toolchangez_entry.set_range(-9999.9999, 9999.9999) self.toolchangez_entry.set_range(-10000.0000, 10000.0000)
self.toolchangez_entry.setSingleStep(0.1) self.toolchangez_entry.setSingleStep(0.1)
self.ois_tcz_e = OptionalInputSection(self.toolchange_cb, [self.toolchangez_entry]) self.ois_tcz_e = OptionalInputSection(self.toolchange_cb, [self.toolchangez_entry])
@ -2104,9 +2104,9 @@ class MillingUI:
self.endz_entry.set_precision(self.decimals) self.endz_entry.set_precision(self.decimals)
if machinist_setting == 0: if machinist_setting == 0:
self.endz_entry.set_range(0.0, 9999.9999) self.endz_entry.set_range(0.0, 10000.0000)
else: else:
self.endz_entry.set_range(-9999.9999, 9999.9999) self.endz_entry.set_range(-10000.0000, 10000.0000)
self.endz_entry.setSingleStep(0.1) self.endz_entry.setSingleStep(0.1)
@ -2134,7 +2134,7 @@ class MillingUI:
self.pdepth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.pdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.pdepth_entry.set_precision(self.decimals) self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-9999.9999, 9999.9999) self.pdepth_entry.set_range(-10000.0000, 10000.0000)
self.pdepth_entry.setSingleStep(0.1) self.pdepth_entry.setSingleStep(0.1)
self.pdepth_entry.setObjectName("e_depth_probe") self.pdepth_entry.setObjectName("e_depth_probe")
@ -2152,7 +2152,7 @@ class MillingUI:
self.feedrate_probe_entry = FCDoubleSpinner(callback=self.confirmation_message) self.feedrate_probe_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.feedrate_probe_entry.set_precision(self.decimals) self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0.0, 9999.9999) self.feedrate_probe_entry.set_range(0.0, 10000.0000)
self.feedrate_probe_entry.setSingleStep(0.1) self.feedrate_probe_entry.setSingleStep(0.1)
self.feedrate_probe_entry.setObjectName("e_fr_probe") self.feedrate_probe_entry.setObjectName("e_fr_probe")
@ -2250,7 +2250,7 @@ class MillingUI:
self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n" self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n"
"an interdiction area.")) "an interdiction area."))
self.over_z_entry = FCDoubleSpinner() self.over_z_entry = FCDoubleSpinner()
self.over_z_entry.set_range(0.000, 9999.9999) self.over_z_entry.set_range(0.000, 10000.0000)
self.over_z_entry.set_precision(self.decimals) self.over_z_entry.set_precision(self.decimals)
grid_a1.addWidget(self.over_z_label, 2, 0) grid_a1.addWidget(self.over_z_label, 2, 0)

View File

@ -453,12 +453,12 @@ class NonCopperClear(AppTool, Gerber):
def on_add_tool_by_key(self): def on_add_tool_by_key(self):
# tool_add_popup = FCInputDialog(title='%s...' % _("New Tool"), # tool_add_popup = FCInputDialog(title='%s...' % _("New Tool"),
# text='%s:' % _('Enter a Tool Diameter'), # text='%s:' % _('Enter a Tool Diameter'),
# min=0.0001, max=9999.9999, decimals=self.decimals) # min=0.0001, max=10000.0000, decimals=self.decimals)
btn_icon = QtGui.QIcon(self.app.resource_location + '/open_excellon32.png') btn_icon = QtGui.QIcon(self.app.resource_location + '/open_excellon32.png')
tool_add_popup = FCInputDialogSpinnerButton(title='%s...' % _("New Tool"), tool_add_popup = FCInputDialogSpinnerButton(title='%s...' % _("New Tool"),
text='%s:' % _('Enter a Tool Diameter'), text='%s:' % _('Enter a Tool Diameter'),
min=0.0001, max=9999.9999, decimals=self.decimals, min=0.0001, max=10000.0000, decimals=self.decimals,
button_icon=btn_icon, button_icon=btn_icon,
callback=self.on_find_optimal_tooldia, callback=self.on_find_optimal_tooldia,
parent=self.app.ui) parent=self.app.ui)
@ -3997,7 +3997,7 @@ class NccUI:
self.new_tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.new_tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.new_tooldia_entry.set_precision(self.decimals) self.new_tooldia_entry.set_precision(self.decimals)
self.new_tooldia_entry.set_range(0.000, 9999.9999) self.new_tooldia_entry.set_range(0.000, 10000.0000)
self.new_tooldia_entry.setObjectName(_("Tool Dia")) self.new_tooldia_entry.setObjectName(_("Tool Dia"))
new_tool_lay.addWidget(self.new_tooldia_entry) new_tool_lay.addWidget(self.new_tooldia_entry)
@ -4162,7 +4162,7 @@ class NccUI:
) )
self.ncc_margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.ncc_margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.ncc_margin_entry.set_precision(self.decimals) self.ncc_margin_entry.set_precision(self.decimals)
self.ncc_margin_entry.set_range(-9999.9999, 9999.9999) self.ncc_margin_entry.set_range(-10000.0000, 10000.0000)
self.ncc_margin_entry.setObjectName("n_margin") self.ncc_margin_entry.setObjectName("n_margin")
self.grid3.addWidget(self.nccmarginlabel, 17, 0) self.grid3.addWidget(self.nccmarginlabel, 17, 0)
@ -4265,7 +4265,7 @@ class NccUI:
) )
self.rest_ncc_margin_entry = FCDoubleSpinner(callback=self.confirmation_message) self.rest_ncc_margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.rest_ncc_margin_entry.set_precision(self.decimals) self.rest_ncc_margin_entry.set_precision(self.decimals)
self.rest_ncc_margin_entry.set_range(-9999.9999, 9999.9999) self.rest_ncc_margin_entry.set_range(-10000.0000, 10000.0000)
self.rest_ncc_margin_entry.setObjectName("n_margin") self.rest_ncc_margin_entry.setObjectName("n_margin")
self.grid3.addWidget(self.rest_nccmarginlabel, 26, 0) self.grid3.addWidget(self.rest_nccmarginlabel, 26, 0)

View File

@ -2905,7 +2905,7 @@ class PaintUI:
) )
self.new_tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.new_tooldia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.new_tooldia_entry.set_precision(self.decimals) self.new_tooldia_entry.set_precision(self.decimals)
self.new_tooldia_entry.set_range(0.000, 9999.9999) self.new_tooldia_entry.set_range(0.000, 10000.0000)
self.new_tooldia_entry.setObjectName('p_tool_dia') self.new_tooldia_entry.setObjectName('p_tool_dia')
self.grid3.addWidget(self.new_tooldia_lbl, 2, 0) self.grid3.addWidget(self.new_tooldia_lbl, 2, 0)
@ -2999,7 +2999,7 @@ class PaintUI:
) )
self.offset_entry = FCDoubleSpinner(callback=self.confirmation_message) self.offset_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.offset_entry.set_precision(self.decimals) self.offset_entry.set_precision(self.decimals)
self.offset_entry.set_range(-9999.9999, 9999.9999) self.offset_entry.set_range(-10000.0000, 10000.0000)
self.offset_entry.setObjectName('p_offset') self.offset_entry.setObjectName('p_offset')
grid4.addWidget(self.offset_label, 2, 0) grid4.addWidget(self.offset_label, 2, 0)
@ -3095,7 +3095,7 @@ class PaintUI:
) )
self.rest_offset_entry = FCDoubleSpinner(callback=self.confirmation_message) self.rest_offset_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.rest_offset_entry.set_precision(self.decimals) self.rest_offset_entry.set_precision(self.decimals)
self.rest_offset_entry.set_range(-9999.9999, 9999.9999) self.rest_offset_entry.set_range(-10000.0000, 10000.0000)
grid4.addWidget(self.rest_offset_label, 17, 0) grid4.addWidget(self.rest_offset_label, 17, 0)
grid4.addWidget(self.rest_offset_entry, 17, 1) grid4.addWidget(self.rest_offset_entry, 17, 1)

View File

@ -1161,7 +1161,7 @@ class PunchUI:
# Diameter value # Diameter value
self.dia_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dia_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dia_entry.set_precision(self.decimals) self.dia_entry.set_precision(self.decimals)
self.dia_entry.set_range(0.0000, 9999.9999) self.dia_entry.set_range(0.0000, 10000.0000)
self.dia_label = QtWidgets.QLabel('%s:' % _("Value")) self.dia_label = QtWidgets.QLabel('%s:' % _("Value"))
self.dia_label.setToolTip( self.dia_label.setToolTip(
@ -1205,7 +1205,7 @@ class PunchUI:
self.circular_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.circular_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.circular_ring_entry.set_precision(self.decimals) self.circular_ring_entry.set_precision(self.decimals)
self.circular_ring_entry.set_range(0.0000, 9999.9999) self.circular_ring_entry.set_range(0.0000, 10000.0000)
self.grid1.addWidget(self.circular_ring_label, 3, 0) self.grid1.addWidget(self.circular_ring_label, 3, 0)
self.grid1.addWidget(self.circular_ring_entry, 3, 1) self.grid1.addWidget(self.circular_ring_entry, 3, 1)
@ -1218,7 +1218,7 @@ class PunchUI:
self.oblong_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.oblong_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.oblong_ring_entry.set_precision(self.decimals) self.oblong_ring_entry.set_precision(self.decimals)
self.oblong_ring_entry.set_range(0.0000, 9999.9999) self.oblong_ring_entry.set_range(0.0000, 10000.0000)
self.grid1.addWidget(self.oblong_ring_label, 4, 0) self.grid1.addWidget(self.oblong_ring_label, 4, 0)
self.grid1.addWidget(self.oblong_ring_entry, 4, 1) self.grid1.addWidget(self.oblong_ring_entry, 4, 1)
@ -1231,7 +1231,7 @@ class PunchUI:
self.square_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.square_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.square_ring_entry.set_precision(self.decimals) self.square_ring_entry.set_precision(self.decimals)
self.square_ring_entry.set_range(0.0000, 9999.9999) self.square_ring_entry.set_range(0.0000, 10000.0000)
self.grid1.addWidget(self.square_ring_label, 5, 0) self.grid1.addWidget(self.square_ring_label, 5, 0)
self.grid1.addWidget(self.square_ring_entry, 5, 1) self.grid1.addWidget(self.square_ring_entry, 5, 1)
@ -1244,7 +1244,7 @@ class PunchUI:
self.rectangular_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.rectangular_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.rectangular_ring_entry.set_precision(self.decimals) self.rectangular_ring_entry.set_precision(self.decimals)
self.rectangular_ring_entry.set_range(0.0000, 9999.9999) self.rectangular_ring_entry.set_range(0.0000, 10000.0000)
self.grid1.addWidget(self.rectangular_ring_label, 6, 0) self.grid1.addWidget(self.rectangular_ring_label, 6, 0)
self.grid1.addWidget(self.rectangular_ring_entry, 6, 1) self.grid1.addWidget(self.rectangular_ring_entry, 6, 1)
@ -1257,7 +1257,7 @@ class PunchUI:
self.other_ring_entry = FCDoubleSpinner(callback=self.confirmation_message) self.other_ring_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.other_ring_entry.set_precision(self.decimals) self.other_ring_entry.set_precision(self.decimals)
self.other_ring_entry.set_range(0.0000, 9999.9999) self.other_ring_entry.set_range(0.0000, 10000.0000)
self.grid1.addWidget(self.other_ring_label, 7, 0) self.grid1.addWidget(self.other_ring_label, 7, 0)
self.grid1.addWidget(self.other_ring_entry, 7, 1) self.grid1.addWidget(self.other_ring_entry, 7, 1)

View File

@ -1189,7 +1189,7 @@ class SolderUI:
_("Diameter for the new Nozzle tool to add in the Tool Table") _("Diameter for the new Nozzle tool to add in the Tool Table")
) )
self.addtool_entry = FCDoubleSpinner(callback=self.confirmation_message) self.addtool_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.addtool_entry.set_range(0.0000001, 9999.9999) self.addtool_entry.set_range(0.0000001, 10000.0000)
self.addtool_entry.set_precision(self.decimals) self.addtool_entry.set_precision(self.decimals)
self.addtool_entry.setSingleStep(0.1) self.addtool_entry.setSingleStep(0.1)
@ -1249,7 +1249,7 @@ class SolderUI:
# Z dispense start # Z dispense start
self.z_start_entry = FCDoubleSpinner(callback=self.confirmation_message) self.z_start_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.z_start_entry.set_range(0.0000001, 9999.9999) self.z_start_entry.set_range(0.0000001, 10000.0000)
self.z_start_entry.set_precision(self.decimals) self.z_start_entry.set_precision(self.decimals)
self.z_start_entry.setSingleStep(0.1) self.z_start_entry.setSingleStep(0.1)
@ -1261,7 +1261,7 @@ class SolderUI:
# Z dispense # Z dispense
self.z_dispense_entry = FCDoubleSpinner(callback=self.confirmation_message) self.z_dispense_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.z_dispense_entry.set_range(0.0000001, 9999.9999) self.z_dispense_entry.set_range(0.0000001, 10000.0000)
self.z_dispense_entry.set_precision(self.decimals) self.z_dispense_entry.set_precision(self.decimals)
self.z_dispense_entry.setSingleStep(0.1) self.z_dispense_entry.setSingleStep(0.1)
@ -1273,7 +1273,7 @@ class SolderUI:
# Z dispense stop # Z dispense stop
self.z_stop_entry = FCDoubleSpinner(callback=self.confirmation_message) self.z_stop_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.z_stop_entry.set_range(0.0000001, 9999.9999) self.z_stop_entry.set_range(0.0000001, 10000.0000)
self.z_stop_entry.set_precision(self.decimals) self.z_stop_entry.set_precision(self.decimals)
self.z_stop_entry.setSingleStep(0.1) self.z_stop_entry.setSingleStep(0.1)
@ -1285,7 +1285,7 @@ class SolderUI:
# Z travel # Z travel
self.z_travel_entry = FCDoubleSpinner(callback=self.confirmation_message) self.z_travel_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.z_travel_entry.set_range(0.0000001, 9999.9999) self.z_travel_entry.set_range(0.0000001, 10000.0000)
self.z_travel_entry.set_precision(self.decimals) self.z_travel_entry.set_precision(self.decimals)
self.z_travel_entry.setSingleStep(0.1) self.z_travel_entry.setSingleStep(0.1)
@ -1298,7 +1298,7 @@ class SolderUI:
# Z toolchange location # Z toolchange location
self.z_toolchange_entry = FCDoubleSpinner(callback=self.confirmation_message) self.z_toolchange_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.z_toolchange_entry.set_range(0.0000001, 9999.9999) self.z_toolchange_entry.set_range(0.0000001, 10000.0000)
self.z_toolchange_entry.set_precision(self.decimals) self.z_toolchange_entry.set_precision(self.decimals)
self.z_toolchange_entry.setSingleStep(0.1) self.z_toolchange_entry.setSingleStep(0.1)
@ -1319,7 +1319,7 @@ class SolderUI:
# Feedrate X-Y # Feedrate X-Y
self.frxy_entry = FCDoubleSpinner(callback=self.confirmation_message) self.frxy_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.frxy_entry.set_range(0.0000, 99999.9999) self.frxy_entry.set_range(0.0000, 910000.0000)
self.frxy_entry.set_precision(self.decimals) self.frxy_entry.set_precision(self.decimals)
self.frxy_entry.setSingleStep(0.1) self.frxy_entry.setSingleStep(0.1)
@ -1331,7 +1331,7 @@ class SolderUI:
# Feedrate Z # Feedrate Z
self.frz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.frz_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.frz_entry.set_range(0.0000, 99999.9999) self.frz_entry.set_range(0.0000, 910000.0000)
self.frz_entry.set_precision(self.decimals) self.frz_entry.set_precision(self.decimals)
self.frz_entry.setSingleStep(0.1) self.frz_entry.setSingleStep(0.1)
@ -1344,7 +1344,7 @@ class SolderUI:
# Feedrate Z Dispense # Feedrate Z Dispense
self.frz_dispense_entry = FCDoubleSpinner(callback=self.confirmation_message) self.frz_dispense_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.frz_dispense_entry.set_range(0.0000, 99999.9999) self.frz_dispense_entry.set_range(0.0000, 910000.0000)
self.frz_dispense_entry.set_precision(self.decimals) self.frz_dispense_entry.set_precision(self.decimals)
self.frz_dispense_entry.setSingleStep(0.1) self.frz_dispense_entry.setSingleStep(0.1)
@ -1369,7 +1369,7 @@ class SolderUI:
# Dwell Forward # Dwell Forward
self.dwellfwd_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dwellfwd_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dwellfwd_entry.set_range(0.0000001, 9999.9999) self.dwellfwd_entry.set_range(0.0000001, 10000.0000)
self.dwellfwd_entry.set_precision(self.decimals) self.dwellfwd_entry.set_precision(self.decimals)
self.dwellfwd_entry.setSingleStep(0.1) self.dwellfwd_entry.setSingleStep(0.1)
@ -1393,7 +1393,7 @@ class SolderUI:
# Dwell Reverse # Dwell Reverse
self.dwellrev_entry = FCDoubleSpinner(callback=self.confirmation_message) self.dwellrev_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.dwellrev_entry.set_range(0.0000001, 9999.9999) self.dwellrev_entry.set_range(0.0000001, 10000.0000)
self.dwellrev_entry.set_precision(self.decimals) self.dwellrev_entry.set_precision(self.decimals)
self.dwellrev_entry.setSingleStep(0.1) self.dwellrev_entry.setSingleStep(0.1)

View File

@ -873,7 +873,7 @@ class TransformUI:
self.buffer_entry.set_precision(self.decimals) self.buffer_entry.set_precision(self.decimals)
self.buffer_entry.setSingleStep(0.1) self.buffer_entry.setSingleStep(0.1)
self.buffer_entry.setWrapping(True) self.buffer_entry.setWrapping(True)
self.buffer_entry.set_range(-9999.9999, 9999.9999) self.buffer_entry.set_range(-10000.0000, 10000.0000)
self.buffer_button = FCButton(_("Buffer D")) self.buffer_button = FCButton(_("Buffer D"))
self.buffer_button.setToolTip( self.buffer_button.setToolTip(

View File

@ -564,6 +564,7 @@ class FlatCAMDefaults:
"tools_calc_vshape_cut_z": 0.05, "tools_calc_vshape_cut_z": 0.05,
"tools_calc_electro_length": 10.0, "tools_calc_electro_length": 10.0,
"tools_calc_electro_width": 10.0, "tools_calc_electro_width": 10.0,
"tools_calc_electro_area": 100.0,
"tools_calc_electro_cdensity": 13.0, "tools_calc_electro_cdensity": 13.0,
"tools_calc_electro_growth": 10.0, "tools_calc_electro_growth": 10.0,
@ -664,6 +665,7 @@ class FlatCAMDefaults:
# Copper Thieving Tool # Copper Thieving Tool
"tools_copper_thieving_clearance": 0.25, "tools_copper_thieving_clearance": 0.25,
"tools_copper_thieving_margin": 1.0, "tools_copper_thieving_margin": 1.0,
"tools_copper_thieving_area": 0.1,
"tools_copper_thieving_reference": 'itself', "tools_copper_thieving_reference": 'itself',
"tools_copper_thieving_box_type": 'rect', "tools_copper_thieving_box_type": 'rect',
"tools_copper_thieving_circle_steps": 64, "tools_copper_thieving_circle_steps": 64,
@ -677,6 +679,7 @@ class FlatCAMDefaults:
"tools_copper_thieving_rb_margin": 1.0, "tools_copper_thieving_rb_margin": 1.0,
"tools_copper_thieving_rb_thickness": 1.0, "tools_copper_thieving_rb_thickness": 1.0,
"tools_copper_thieving_mask_clearance": 0.0, "tools_copper_thieving_mask_clearance": 0.0,
"tools_copper_thieving_geo_choice": 'b',
# Fiducials Tool # Fiducials Tool
"tools_fiducials_dia": 1.0, "tools_fiducials_dia": 1.0,

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