Ver Fonte

jpcgt/flatcam/Beta слито с Beta

Camellan há 6 anos atrás
pai
commit
3a31e12003

+ 10 - 3
FlatCAMApp.py

@@ -1830,7 +1830,7 @@ class App(QtCore.QObject):
         # signal for displaying messages in status bar
         # signal for displaying messages in status bar
         self.inform.connect(self.info)
         self.inform.connect(self.info)
         # signal to be called when the app is quiting
         # signal to be called when the app is quiting
-        self.app_quit.connect(self.quit_application)
+        self.app_quit.connect(self.quit_application, type=Qt.QueuedConnection)
         self.message.connect(self.message_dialog)
         self.message.connect(self.message_dialog)
         self.progress.connect(self.set_progress_bar)
         self.progress.connect(self.set_progress_bar)
 
 
@@ -5104,7 +5104,7 @@ class App(QtCore.QObject):
 
 
         :return: None
         :return: None
         """
         """
-        self.save_defaults()
+        self.save_defaults(silent=True)
         log.debug("App.final_save() --> App Defaults saved.")
         log.debug("App.final_save() --> App Defaults saved.")
 
 
         if self.cmd_line_headless != 1:
         if self.cmd_line_headless != 1:
@@ -5138,7 +5138,14 @@ class App(QtCore.QObject):
             del stgs
             del stgs
 
 
         log.debug("App.final_save() --> App UI state saved.")
         log.debug("App.final_save() --> App UI state saved.")
-        QtWidgets.qApp.quit()
+
+        # QtWidgets.qApp.quit()
+        QtCore.QCoreApplication.exit()
+        if sys.platform != 'win32':
+            try:
+                sys.exit()
+            except Exception:
+                pass
 
 
     def on_portable_checked(self, state):
     def on_portable_checked(self, state):
         """
         """

+ 9 - 10
FlatCAMObj.py

@@ -1269,23 +1269,22 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
         """
         """
 
 
         if geometry is None:
         if geometry is None:
-            if follow:
-                work_geo = self.follow_geometry
-            else:
-                work_geo = self.solid_geometry
+            work_geo = self.follow_geometry if follow is True else self.solid_geometry
         else:
         else:
             work_geo = geometry
             work_geo = geometry
 
 
         if dia is None:
         if dia is None:
             dia = float(self.options["isotooldia"])
             dia = float(self.options["isotooldia"])
+
         if passes is None:
         if passes is None:
             passes = int(self.options["isopasses"])
             passes = int(self.options["isopasses"])
+
         if overlap is None:
         if overlap is None:
             overlap = float(self.options["isooverlap"])
             overlap = float(self.options["isooverlap"])
-        if combine is None:
-            combine = self.options["combine_passes"]
-        else:
-            combine = bool(combine)
+
+        overlap /= 100.0
+
+        combine = self.options["combine_passes"] if combine is None else bool(combine)
 
 
         if milling_type is None:
         if milling_type is None:
             milling_type = self.options["milling_type"]
             milling_type = self.options["milling_type"]
@@ -1316,7 +1315,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
 
 
                 geo_obj.solid_geometry = []
                 geo_obj.solid_geometry = []
                 for i in range(passes):
                 for i in range(passes):
-                    iso_offset = dia * ((2 * i + 1) / 2.0) - (i * (overlap / 100) * dia)
+                    iso_offset = dia * ((2 * i + 1) / 2.0) - (i * overlap * dia)
 
 
                     # if milling type is climb then the move is counter-clockwise around features
                     # if milling type is climb then the move is counter-clockwise around features
                     mill_t = 1 if milling_type == 'cl' else 0
                     mill_t = 1 if milling_type == 'cl' else 0
@@ -1417,7 +1416,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
         else:
         else:
             for i in range(passes):
             for i in range(passes):
 
 
-                offset = dia * ((2 * i + 1) / 2.0) - (i * (overlap / 100) * dia)
+                offset = dia * ((2 * i + 1) / 2.0) - (i * overlap * dia)
                 if passes > 1:
                 if passes > 1:
                     if outname is None:
                     if outname is None:
                         if self.iso_type == 0:
                         if self.iso_type == 0:

+ 6 - 0
README.md

@@ -15,6 +15,12 @@ CAD program, and create G-Code for Isolation routing.
 - in Transform Tool adjusted the GUI
 - in Transform Tool adjusted the GUI
 - fixed some decimals issues in NCC Tool, Paint Tool and Excellon Editor (they were still using the harcoded values)
 - fixed some decimals issues in NCC Tool, Paint Tool and Excellon Editor (they were still using the harcoded values)
 - some small updates in the NCC Tool
 - some small updates in the NCC Tool
+- changes in the Preferences UI for NCC and Paint Tool in Tool Dia entry field
+- fixed Tcl commands that use the overlap parameter to switch from fraction to percentage
+- in Transform Tool mae sure that the buffer sub-tool parameters are better explained in tooltips
+- attempt to make TclCommand quit_flatcam work under Linux
+- some fixes in the NCC Tcl command (using the bool() method on some params)
+- another attempt to make TclCommand quit_flatcam work under Linux
 
 
 29.12.2019
 29.12.2019
 
 

+ 2 - 2
camlib.py

@@ -1326,7 +1326,7 @@ class Geometry(object):
         geoms.get_points = get_pts
         geoms.get_points = get_pts
 
 
         # Path margin
         # Path margin
-        path_margin = polygon_to_clear.buffer(-tooldia / 2, int(steps_per_circle / 4))
+        path_margin = polygon_to_clear.buffer(-tooldia / 2, int(steps_per_circle))
 
 
         if path_margin.is_empty or path_margin is None:
         if path_margin.is_empty or path_margin is None:
             return
             return
@@ -1345,7 +1345,7 @@ class Geometry(object):
             # provide the app with a way to process the GUI events when in a blocking loop
             # provide the app with a way to process the GUI events when in a blocking loop
             QtWidgets.QApplication.processEvents()
             QtWidgets.QApplication.processEvents()
 
 
-            path = Point(seedpoint).buffer(radius, int(steps_per_circle / 4)).exterior
+            path = Point(seedpoint).buffer(radius, int(steps_per_circle)).exterior
             path = path.intersection(path_margin)
             path = path.intersection(path_margin)
 
 
             # Touches polygon?
             # Touches polygon?

+ 1 - 1
flatcamEditors/FlatCAMGeoEditor.py

@@ -453,7 +453,7 @@ class PaintOptionsTool(FlatCAMTool):
         # Overlap
         # Overlap
         ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         ovlabel.setToolTip(
         ovlabel.setToolTip(
-            _("How much (fraction) of the tool width to overlap each tool pass.\n"
+            _("How much (percentage) of the tool width to overlap each tool pass.\n"
               "Adjust the value starting with lower values\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be painted are still \n"
               "and increasing it if areas that should be painted are still \n"
               "not painted.\n"
               "not painted.\n"

+ 4 - 1
flatcamGUI/GUIElements.py

@@ -367,12 +367,15 @@ class IntEntry(QtWidgets.QLineEdit):
 
 
 
 
 class FCEntry(QtWidgets.QLineEdit):
 class FCEntry(QtWidgets.QLineEdit):
-    def __init__(self, decimals=None, alignment=None, parent=None):
+    def __init__(self, decimals=None, alignment=None, border_color=None, parent=None):
         super(FCEntry, self).__init__(parent)
         super(FCEntry, self).__init__(parent)
         self.readyToEdit = True
         self.readyToEdit = True
         self.editingFinished.connect(self.on_edit_finished)
         self.editingFinished.connect(self.on_edit_finished)
         self.decimals = decimals if decimals is not None else 4
         self.decimals = decimals if decimals is not None else 4
 
 
+        if border_color:
+            self.setStyleSheet("QLineEdit {border: 1px solid %s;}" % border_color)
+
         if alignment:
         if alignment:
             if alignment == 'center':
             if alignment == 'center':
                 align_val = QtCore.Qt.AlignHCenter
                 align_val = QtCore.Qt.AlignHCenter

+ 1 - 1
flatcamGUI/ObjectUI.py

@@ -388,7 +388,7 @@ class GerberObjectUI(ObjectUI):
         # Pass overlap
         # Pass overlap
         overlabel = QtWidgets.QLabel('%s:' % _('Pass overlap'))
         overlabel = QtWidgets.QLabel('%s:' % _('Pass overlap'))
         overlabel.setToolTip(
         overlabel.setToolTip(
-            _("How much (fraction) of the tool width to overlap each tool pass.")
+            _("How much (percentage) of the tool width to overlap each tool pass.")
         )
         )
         overlabel.setMinimumWidth(90)
         overlabel.setMinimumWidth(90)
         self.iso_overlap_entry = FCDoubleSpinner(suffix='%')
         self.iso_overlap_entry = FCDoubleSpinner(suffix='%')

+ 10 - 7
flatcamGUI/PreferencesUI.py

@@ -2048,7 +2048,7 @@ class GerberOptPrefGroupUI(OptionsGroupUI):
         # Pass overlap
         # Pass overlap
         overlabel = QtWidgets.QLabel('%s:' % _('Pass overlap'))
         overlabel = QtWidgets.QLabel('%s:' % _('Pass overlap'))
         overlabel.setToolTip(
         overlabel.setToolTip(
-            _("How much (fraction) of the tool width to overlap each tool pass.")
+            _("How much (percentage) of the tool width to overlap each tool pass.")
         )
         )
         self.iso_overlap_entry = FCDoubleSpinner(suffix='%')
         self.iso_overlap_entry = FCDoubleSpinner(suffix='%')
         self.iso_overlap_entry.set_precision(self.decimals)
         self.iso_overlap_entry.set_precision(self.decimals)
@@ -5034,7 +5034,8 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
               "Valid values: 0.3, 1.0")
               "Valid values: 0.3, 1.0")
         )
         )
         grid0.addWidget(ncctdlabel, 0, 0)
         grid0.addWidget(ncctdlabel, 0, 0)
-        self.ncc_tool_dia_entry = FCEntry()
+        self.ncc_tool_dia_entry = FCEntry(border_color='#0069A9')
+        self.ncc_tool_dia_entry.setPlaceholderText(_("Comma separated values"))
         grid0.addWidget(self.ncc_tool_dia_entry, 0, 1)
         grid0.addWidget(self.ncc_tool_dia_entry, 0, 1)
 
 
         # Tool Type Radio Button
         # Tool Type Radio Button
@@ -5156,7 +5157,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
         # Overlap Entry
         # Overlap Entry
         nccoverlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         nccoverlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         nccoverlabel.setToolTip(
         nccoverlabel.setToolTip(
-           _("How much (fraction) of the tool width to overlap each tool pass.\n"
+           _("How much (percentage) of the tool width to overlap each tool pass.\n"
              "Adjust the value starting with lower values\n"
              "Adjust the value starting with lower values\n"
              "and increasing it if areas that should be cleared are still \n"
              "and increasing it if areas that should be cleared are still \n"
              "not cleared.\n"
              "not cleared.\n"
@@ -5545,7 +5546,8 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
         )
         )
         grid0.addWidget(ptdlabel, 0, 0)
         grid0.addWidget(ptdlabel, 0, 0)
 
 
-        self.painttooldia_entry = FCEntry()
+        self.painttooldia_entry = FCEntry(border_color='#0069A9')
+        self.painttooldia_entry.setPlaceholderText(_("Comma separated values"))
 
 
         grid0.addWidget(self.painttooldia_entry, 0, 1)
         grid0.addWidget(self.painttooldia_entry, 0, 1)
 
 
@@ -5572,7 +5574,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
         # Overlap
         # Overlap
         ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         ovlabel.setToolTip(
         ovlabel.setToolTip(
-            _("How much (fraction) of the tool width to overlap each tool pass.\n"
+            _("How much (percentage) of the tool width to overlap each tool pass.\n"
               "Adjust the value starting with lower values\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be painted are still \n"
               "and increasing it if areas that should be painted are still \n"
               "not painted.\n"
               "not painted.\n"
@@ -6416,12 +6418,13 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
         grid0.addWidget(self.buffer_label, 17, 0)
         grid0.addWidget(self.buffer_label, 17, 0)
         grid0.addWidget(self.buffer_entry, 17, 1)
         grid0.addWidget(self.buffer_entry, 17, 1)
 
 
-        self.buffer_factor_label = QtWidgets.QLabel('%s:' % _("Factor"))
+        self.buffer_factor_label = QtWidgets.QLabel('%s:' % _("Value"))
         self.buffer_factor_label.setToolTip(
         self.buffer_factor_label.setToolTip(
             _("A positive value will create the effect of dilation,\n"
             _("A positive value will create the effect of dilation,\n"
               "while a negative value will create the effect of erosion.\n"
               "while a negative value will create the effect of erosion.\n"
               "Each geometry element of the object will be increased\n"
               "Each geometry element of the object will be increased\n"
-              "or decreased by the 'factor'.")
+              "or decreased to fit the 'Value'. Value is a percentage\n"
+              "of the initial dimension.")
         )
         )
 
 
         self.buffer_factor_entry = FCDoubleSpinner(suffix='%')
         self.buffer_factor_entry = FCDoubleSpinner(suffix='%')

+ 2 - 2
flatcamTools/ToolNonCopperClear.py

@@ -318,7 +318,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
         # Overlap Entry
         # Overlap Entry
         nccoverlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         nccoverlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         nccoverlabel.setToolTip(
         nccoverlabel.setToolTip(
-            _("How much (fraction) of the tool width to overlap each tool pass.\n"
+            _("How much (percentage) of the tool width to overlap each tool pass.\n"
               "Adjust the value starting with lower values\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be cleared are still \n"
               "and increasing it if areas that should be cleared are still \n"
               "not cleared.\n"
               "not cleared.\n"
@@ -1430,7 +1430,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
         else:
         else:
             ncc_select = self.reference_radio.get_value()
             ncc_select = self.reference_radio.get_value()
 
 
-        overlap = overlap if overlap is not None else float(self.app.defaults["tools_nccoverlap"])
+        overlap = overlap if overlap is not None else float(self.app.defaults["tools_nccoverlap"]) / 100.0
 
 
         connect = connect if connect else self.app.defaults["tools_nccconnect"]
         connect = connect if connect else self.app.defaults["tools_nccconnect"]
         contour = contour if contour else self.app.defaults["tools_ncccontour"]
         contour = contour if contour else self.app.defaults["tools_ncccontour"]

+ 4 - 4
flatcamTools/ToolPaint.py

@@ -218,7 +218,7 @@ class ToolPaint(FlatCAMTool, Gerber):
         # Overlap
         # Overlap
         ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         ovlabel.setToolTip(
         ovlabel.setToolTip(
-            _("How much (fraction) of the tool width to overlap each tool pass.\n"
+            _("How much (percentage) of the tool width to overlap each tool pass.\n"
               "Adjust the value starting with lower values\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be painted are still \n"
               "and increasing it if areas that should be painted are still \n"
               "not painted.\n"
               "not painted.\n"
@@ -1380,7 +1380,7 @@ class ToolPaint(FlatCAMTool, Gerber):
         prog_plot = True if self.app.defaults["tools_paint_plotting"] == 'progressive' else False
         prog_plot = True if self.app.defaults["tools_paint_plotting"] == 'progressive' else False
 
 
         name = outname if outname is not None else self.obj_name + "_paint"
         name = outname if outname is not None else self.obj_name + "_paint"
-        over = overlap if overlap is not None else float(self.app.defaults["tools_paintoverlap"])
+        over = overlap if overlap is not None else float(self.app.defaults["tools_paintoverlap"]) / 100.0
         conn = connect if connect is not None else self.app.defaults["tools_pathconnect"]
         conn = connect if connect is not None else self.app.defaults["tools_pathconnect"]
         cont = contour if contour is not None else self.app.defaults["tools_paintcontour"]
         cont = contour if contour is not None else self.app.defaults["tools_paintcontour"]
         order = order if order is not None else self.order_radio.get_value()
         order = order if order is not None else self.order_radio.get_value()
@@ -1630,7 +1630,7 @@ class ToolPaint(FlatCAMTool, Gerber):
         proc = self.app.proc_container.new(_("Painting polygons..."))
         proc = self.app.proc_container.new(_("Painting polygons..."))
         name = outname if outname is not None else self.obj_name + "_paint"
         name = outname if outname is not None else self.obj_name + "_paint"
 
 
-        over = overlap if overlap is not None else float(self.app.defaults["tools_paintoverlap"])
+        over = overlap if overlap is not None else float(self.app.defaults["tools_paintoverlap"]) / 100.0
         conn = connect if connect is not None else self.app.defaults["tools_pathconnect"]
         conn = connect if connect is not None else self.app.defaults["tools_pathconnect"]
         cont = contour if contour is not None else self.app.defaults["tools_paintcontour"]
         cont = contour if contour is not None else self.app.defaults["tools_paintcontour"]
         order = order if order is not None else self.order_radio.get_value()
         order = order if order is not None else self.order_radio.get_value()
@@ -2214,7 +2214,7 @@ class ToolPaint(FlatCAMTool, Gerber):
         proc = self.app.proc_container.new(_("Painting polygons..."))
         proc = self.app.proc_container.new(_("Painting polygons..."))
         name = outname if outname is not None else self.obj_name + "_paint"
         name = outname if outname is not None else self.obj_name + "_paint"
 
 
-        over = overlap if overlap is not None else float(self.app.defaults["tools_paintoverlap"])
+        over = overlap if overlap is not None else float(self.app.defaults["tools_paintoverlap"]) / 100.0
         conn = connect if connect is not None else self.app.defaults["tools_pathconnect"]
         conn = connect if connect is not None else self.app.defaults["tools_pathconnect"]
         cont = contour if contour is not None else self.app.defaults["tools_paintcontour"]
         cont = contour if contour is not None else self.app.defaults["tools_paintcontour"]
         order = order if order is not None else self.order_radio.get_value()
         order = order if order is not None else self.order_radio.get_value()

+ 3 - 2
flatcamTools/ToolTransform.py

@@ -371,12 +371,13 @@ class ToolTransform(FlatCAMTool):
         grid0.addWidget(self.buffer_entry, 23, 1)
         grid0.addWidget(self.buffer_entry, 23, 1)
         grid0.addWidget(self.buffer_button, 23, 2)
         grid0.addWidget(self.buffer_button, 23, 2)
 
 
-        self.buffer_factor_label = QtWidgets.QLabel('%s:' % _("Factor"))
+        self.buffer_factor_label = QtWidgets.QLabel('%s:' % _("Value"))
         self.buffer_factor_label.setToolTip(
         self.buffer_factor_label.setToolTip(
             _("A positive value will create the effect of dilation,\n"
             _("A positive value will create the effect of dilation,\n"
               "while a negative value will create the effect of erosion.\n"
               "while a negative value will create the effect of erosion.\n"
               "Each geometry element of the object will be increased\n"
               "Each geometry element of the object will be increased\n"
-              "or decreased by the 'factor'.")
+              "or decreased to fit the 'Value'. Value is a percentage\n"
+              "of the initial dimension.")
         )
         )
 
 
         self.buffer_factor_entry = FCDoubleSpinner(suffix='%')
         self.buffer_factor_entry = FCDoubleSpinner(suffix='%')

+ 9 - 8
tclCommands/TclCommandCopperClear.py

@@ -55,7 +55,8 @@ class TclCommandCopperClear(TclCommand):
             ('name', 'Name of the source Geometry object. String.'),
             ('name', 'Name of the source Geometry object. String.'),
             ('tooldia', 'Diameter of the tool to be used. Can be a comma separated list of diameters. No space is '
             ('tooldia', 'Diameter of the tool to be used. Can be a comma separated list of diameters. No space is '
                         'allowed between tool diameters. E.g: correct: 0.5,1 / incorrect: 0.5, 1'),
                         'allowed between tool diameters. E.g: correct: 0.5,1 / incorrect: 0.5, 1'),
-            ('overlap', 'Fraction of the tool diameter to overlap cuts. Float number.'),
+            ('overlap', 'Percentage of tool diameter to overlap current pass over previous pass. Float [0, 99.9999]\n'
+                        'E.g: for a 25% from tool diameter overlap use -overlap 25'),
             ('margin', 'Bounding box margin. Float number.'),
             ('margin', 'Bounding box margin. Float number.'),
             ('order', 'Can have the values: "no", "fwd" and "rev". String.'
             ('order', 'Can have the values: "no", "fwd" and "rev". String.'
                       'It is useful when there are multiple tools in tooldia parameter.'
                       'It is useful when there are multiple tools in tooldia parameter.'
@@ -68,13 +69,13 @@ class TclCommandCopperClear(TclCommand):
             ('rest', 'Use rest-machining. True or False'),
             ('rest', 'Use rest-machining. True or False'),
             ('has_offset', 'The offset will used only if this is set True or present in args. True or False.'),
             ('has_offset', 'The offset will used only if this is set True or present in args. True or False.'),
             ('offset', 'The copper clearing will finish to a distance from copper features. Float number.'),
             ('offset', 'The copper clearing will finish to a distance from copper features. Float number.'),
-            ('all', 'Will copper clear the whole object. 1 = enabled, anything else = disabled'),
+            ('all', 'Will copper clear the whole object. 1 or True = enabled, anything else = disabled'),
             ('ref', 'Will clear of extra copper all polygons within a specified object with the name in "box" '
             ('ref', 'Will clear of extra copper all polygons within a specified object with the name in "box" '
-                    'parameter. 1 = enabled, anything else = disabled'),
+                    'parameter. 1 or True = enabled, anything else = disabled'),
             ('box', 'Name of the object to be used as reference. Required when selecting "ref" = 1. String.'),
             ('box', 'Name of the object to be used as reference. Required when selecting "ref" = 1. String.'),
             ('outname', 'Name of the resulting Geometry object. String.'),
             ('outname', 'Name of the resulting Geometry object. String.'),
         ]),
         ]),
-        'examples': []
+        'examples': ["ncc obj_name -tooldia 0.3,1 -overlap 10 -margin 1.0 -method 'lines' -all True"]
     }
     }
 
 
     def execute(self, args, unnamed_args):
     def execute(self, args, unnamed_args):
@@ -106,9 +107,9 @@ class TclCommandCopperClear(TclCommand):
             tooldia = self.app.defaults["tools_ncctools"]
             tooldia = self.app.defaults["tools_ncctools"]
 
 
         if 'overlap' in args:
         if 'overlap' in args:
-            overlap = float(args['overlap'])
+            overlap = float(args['overlap']) / 100.0
         else:
         else:
-            overlap = float(self.app.defaults["tools_nccoverlap"])
+            overlap = float(self.app.defaults["tools_nccoverlap"]) / 100.0
 
 
         if 'order' in args:
         if 'order' in args:
             order = args['order']
             order = args['order']
@@ -217,7 +218,7 @@ class TclCommandCopperClear(TclCommand):
                 outname = name + "_ncc_rm"
                 outname = name + "_ncc_rm"
 
 
         # Non-Copper clear all polygons in the non-copper clear object
         # Non-Copper clear all polygons in the non-copper clear object
-        if 'all' in args and args['all'] == 1:
+        if 'all' in args and bool(args['all']):
             self.app.ncclear_tool.clear_copper(ncc_obj=obj,
             self.app.ncclear_tool.clear_copper(ncc_obj=obj,
                                                select_method='itself',
                                                select_method='itself',
                                                ncctooldia=tooldia,
                                                ncctooldia=tooldia,
@@ -237,7 +238,7 @@ class TclCommandCopperClear(TclCommand):
             return
             return
 
 
         # Non-Copper clear all polygons found within the box object from the the non_copper cleared object
         # Non-Copper clear all polygons found within the box object from the the non_copper cleared object
-        elif 'ref' in args and args['ref'] == 1:
+        elif 'ref' in args and bool(args['ref']):
             if 'box' not in args:
             if 'box' not in args:
                 self.raise_tcl_error('%s' % _("Expected -box <value>."))
                 self.raise_tcl_error('%s' % _("Expected -box <value>."))
             else:
             else:

+ 3 - 1
tclCommands/TclCommandIsolate.py

@@ -3,6 +3,7 @@ from FlatCAMObj import FlatCAMGerber
 
 
 import collections
 import collections
 
 
+
 class TclCommandIsolate(TclCommandSignaled):
 class TclCommandIsolate(TclCommandSignaled):
     """
     """
     Tcl shell command to Creates isolation routing geometry for the given Gerber.
     Tcl shell command to Creates isolation routing geometry for the given Gerber.
@@ -45,7 +46,8 @@ class TclCommandIsolate(TclCommandSignaled):
             ('name', 'Name of the source object.'),
             ('name', 'Name of the source object.'),
             ('dia', 'Tool diameter.'),
             ('dia', 'Tool diameter.'),
             ('passes', 'Passes of tool width.'),
             ('passes', 'Passes of tool width.'),
-            ('overlap', 'Fraction of tool diameter to overlap passes.'),
+            ('overlap', 'Percentage of tool diameter to overlap current pass over previous pass. Float [0, 99.9999]\n'
+                        'E.g: for a 25% from tool diameter overlap use -overlap 25'),
             ('combine', 'Combine all passes into one geometry.'),
             ('combine', 'Combine all passes into one geometry.'),
             ('outname', 'Name of the resulting Geometry object.'),
             ('outname', 'Name of the resulting Geometry object.'),
             ('follow', 'Create a Geometry that follows the Gerber path.'),
             ('follow', 'Create a Geometry that follows the Gerber path.'),

+ 5 - 4
tclCommands/TclCommandPaint.py

@@ -56,7 +56,8 @@ class TclCommandPaint(TclCommand):
             ('name', 'Name of the source Geometry object. String.'),
             ('name', 'Name of the source Geometry object. String.'),
             ('tooldia', 'Diameter of the tool to be used. Can be a comma separated list of diameters. No space is '
             ('tooldia', 'Diameter of the tool to be used. Can be a comma separated list of diameters. No space is '
                         'allowed between tool diameters. E.g: correct: 0.5,1 / incorrect: 0.5, 1'),
                         'allowed between tool diameters. E.g: correct: 0.5,1 / incorrect: 0.5, 1'),
-            ('overlap', 'Fraction of the tool diameter to overlap cuts. Float number.'),
+            ('overlap', 'Percentage of tool diameter to overlap current pass over previous pass. Float [0, 99.9999]\n'
+                        'E.g: for a 25% from tool diameter overlap use -overlap 25'),
             ('margin', 'Bounding box margin. Float number.'),
             ('margin', 'Bounding box margin. Float number.'),
             ('order', 'Can have the values: "no", "fwd" and "rev". String.'
             ('order', 'Can have the values: "no", "fwd" and "rev". String.'
                       'It is useful when there are multiple tools in tooldia parameter.'
                       'It is useful when there are multiple tools in tooldia parameter.'
@@ -74,7 +75,7 @@ class TclCommandPaint(TclCommand):
             ('y', 'Y value of coordinate for the selection of a single polygon. Float number.'),
             ('y', 'Y value of coordinate for the selection of a single polygon. Float number.'),
             ('outname', 'Name of the resulting Geometry object. String.'),
             ('outname', 'Name of the resulting Geometry object. String.'),
         ]),
         ]),
-        'examples': []
+        'examples': ["paint obj_name -tooldia 0.3 -margin 0.1 -method 'seed' -all True"]
     }
     }
 
 
     def execute(self, args, unnamed_args):
     def execute(self, args, unnamed_args):
@@ -103,9 +104,9 @@ class TclCommandPaint(TclCommand):
             tooldia = float(self.app.defaults["tools_paintoverlap"])
             tooldia = float(self.app.defaults["tools_paintoverlap"])
 
 
         if 'overlap' in args:
         if 'overlap' in args:
-            overlap = float(args['overlap'])
+            overlap = float(args['overlap']) / 100.0
         else:
         else:
-            overlap = float(self.app.defaults["tools_paintoverlap"])
+            overlap = float(self.app.defaults["tools_paintoverlap"]) / 100.0
 
 
         if 'order' in args:
         if 'order' in args:
             order = args['order']
             order = args['order']