- fixed the overlap parameter all over the app to reflect the change to percentage

This commit is contained in:
Marius Stanciu
2019-12-04 17:00:36 +02:00
parent 0de96a377e
commit f9c83a5e60
8 changed files with 50 additions and 56 deletions

View File

@@ -319,12 +319,10 @@ class NonCopperClear(FlatCAMTool, Gerber):
nccoverlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
nccoverlabel.setToolTip(
_("How much (fraction) of the tool width to overlap each tool pass.\n"
"Example:\n"
"A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
"Adjust the value starting with lower values\n"
"and increasing it if areas that should be cleared are still \n"
"not cleared.\n"
"Lower values = faster processing, faster execution on PCB.\n"
"Lower values = faster processing, faster execution on CNC.\n"
"Higher values = slow processing and slow execution on CNC\n"
"due of too many paths.")
)
@@ -1120,15 +1118,10 @@ class NonCopperClear(FlatCAMTool, Gerber):
self.reset_usage()
self.app.report_usage("on_paint_button_click")
self.overlap = float(self.ncc_overlap_entry.get_value())
self.overlap = float(self.ncc_overlap_entry.get_value()) / 100.0
self.grb_circle_steps = int(self.app.defaults["gerber_circle_steps"])
if self.overlap >= 1 or self.overlap < 0:
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Overlap value must be between "
"0 (inclusive) and 1 (exclusive), "))
return
self.connect = self.ncc_connect_cb.get_value()
self.contour = self.ncc_contour_cb.get_value()
self.has_offset = self.ncc_choice_offset_cb.isChecked()
@@ -1423,7 +1416,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
else:
ncc_select = self.reference_radio.get_value()
overlap = overlap if overlap else float(self.app.defaults["tools_nccoverlap"])
overlap = overlap if overlap is not None else float(self.app.defaults["tools_nccoverlap"])
connect = connect if connect else self.app.defaults["tools_nccconnect"]
contour = contour if contour else self.app.defaults["tools_ncccontour"]

View File

@@ -219,19 +219,17 @@ class ToolPaint(FlatCAMTool, Gerber):
ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
ovlabel.setToolTip(
_("How much (fraction) of the tool width to overlap each tool pass.\n"
"Example:\n"
"A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
"Adjust the value starting with lower values\n"
"and increasing it if areas that should be painted are still \n"
"not painted.\n"
"Lower values = faster processing, faster execution on PCB.\n"
"Lower values = faster processing, faster execution on CNC.\n"
"Higher values = slow processing and slow execution on CNC\n"
"due of too many paths.")
)
self.paintoverlap_entry = FCDoubleSpinner(suffix='%')
self.paintoverlap_entry.set_precision(3)
self.paintoverlap_entry.setWrapping(True)
self.paintoverlap_entry.setRange(0.000, 0.999)
self.paintoverlap_entry.setRange(0.0000, 99.9999)
self.paintoverlap_entry.setSingleStep(0.1)
grid3.addWidget(ovlabel, 1, 0)
grid3.addWidget(self.paintoverlap_entry, 1, 1)
@@ -956,7 +954,7 @@ class ToolPaint(FlatCAMTool, Gerber):
# #####################################################
self.app.inform.emit(_("Paint Tool. Reading parameters."))
self.overlap = float(self.paintoverlap_entry.get_value())
self.overlap = float(self.paintoverlap_entry.get_value()) / 100.0
self.connect = self.pathconnect_cb.get_value()
self.contour = self.paintcontour_cb.get_value()