Ver código fonte

- more refactoring; solved some issues introduced by the refactoring

Marius Stanciu 5 anos atrás
pai
commit
d61ca10e75
47 arquivos alterados com 135 adições e 158 exclusões
  1. 13 19
      App.py
  2. 2 3
      AppEditors/FlatCAMGeoEditor.py
  3. 1 3
      AppEditors/FlatCAMGrbEditor.py
  4. 42 56
      AppGUI/MainGUI.py
  5. 2 2
      AppGUI/ObjectUI.py
  6. 1 1
      AppGUI/preferences/PreferencesUIManager.py
  7. 7 7
      AppGUI/preferences/general/GeneralGUIPrefGroupUI.py
  8. 3 3
      AppObjects/AppObject.py
  9. 1 1
      AppObjects/FlatCAMExcellon.py
  10. 1 1
      AppObjects/FlatCAMGeometry.py
  11. 1 1
      AppObjects/FlatCAMGerber.py
  12. 2 2
      AppObjects/ObjectCollection.py
  13. 8 8
      AppTools/AppTool.py
  14. 3 3
      AppTools/ToolAlignObjects.py
  15. 1 1
      AppTools/ToolCalculators.py
  16. 3 3
      AppTools/ToolCalibration.py
  17. 2 2
      AppTools/ToolCopperThieving.py
  18. 2 2
      AppTools/ToolCorners.py
  19. 1 1
      AppTools/ToolCutOut.py
  20. 4 4
      AppTools/ToolDblSided.py
  21. 1 1
      AppTools/ToolDistance.py
  22. 2 3
      AppTools/ToolDistanceMin.py
  23. 1 1
      AppTools/ToolExtractDrills.py
  24. 2 2
      AppTools/ToolFiducials.py
  25. 2 2
      AppTools/ToolFilm.py
  26. 1 1
      AppTools/ToolImage.py
  27. 1 1
      AppTools/ToolInvertGerber.py
  28. 1 1
      AppTools/ToolMove.py
  29. 1 1
      AppTools/ToolNCC.py
  30. 1 1
      AppTools/ToolOptimal.py
  31. 1 1
      AppTools/ToolPDF.py
  32. 1 1
      AppTools/ToolPaint.py
  33. 1 1
      AppTools/ToolPanelize.py
  34. 1 1
      AppTools/ToolPcbWizard.py
  35. 1 1
      AppTools/ToolProperties.py
  36. 1 1
      AppTools/ToolPunchGerber.py
  37. 1 1
      AppTools/ToolQRCode.py
  38. 2 2
      AppTools/ToolRulesCheck.py
  39. 2 2
      AppTools/ToolSolderPaste.py
  40. 3 3
      AppTools/ToolSub.py
  41. 1 1
      AppTools/ToolTransform.py
  42. 1 0
      CHANGELOG.md
  43. 1 1
      Common.py
  44. 1 1
      FlatCAM.py
  45. 1 1
      camlib.py
  46. 1 1
      defaults.py
  47. 2 2
      tclCommands/TclCommand.py

+ 13 - 19
AppMain.py → App.py

@@ -50,7 +50,7 @@ from AppDatabase import ToolsDB2
 from vispy.gloo.util import _screenshot
 from vispy.gloo.util import _screenshot
 from vispy.io import write_png
 from vispy.io import write_png
 
 
-# FlatCAM AppObjects
+# FlatCAM Objects
 from defaults import FlatCAMDefaults
 from defaults import FlatCAMDefaults
 from AppGUI.preferences.OptionsGroupUI import OptionsGroupUI
 from AppGUI.preferences.OptionsGroupUI import OptionsGroupUI
 from AppGUI.preferences.PreferencesUIManager import PreferencesUIManager
 from AppGUI.preferences.PreferencesUIManager import PreferencesUIManager
@@ -1896,7 +1896,7 @@ class App(QtCore.QObject):
         self.calculator_tool = ToolCalculator(self)
         self.calculator_tool = ToolCalculator(self)
         self.calculator_tool.install(icon=QtGui.QIcon(self.resource_location + '/calculator16.png'), separator=True)
         self.calculator_tool.install(icon=QtGui.QIcon(self.resource_location + '/calculator16.png'), separator=True)
 
 
-        self.sub_tool = ToolSub(app=self)
+        self.sub_tool = ToolSub(self)
         self.sub_tool.install(icon=QtGui.QIcon(self.resource_location + '/sub32.png'),
         self.sub_tool.install(icon=QtGui.QIcon(self.resource_location + '/sub32.png'),
                               pos=self.ui.menutool, separator=True)
                               pos=self.ui.menutool, separator=True)
 
 
@@ -2049,9 +2049,6 @@ class App(QtCore.QObject):
         self.ui.zoom_out_btn.triggered.connect(lambda: self.plotcanvas.zoom(1.5))
         self.ui.zoom_out_btn.triggered.connect(lambda: self.plotcanvas.zoom(1.5))
 
 
         # Edit Toolbar Signals
         # Edit Toolbar Signals
-        self.ui.newgeo_btn.triggered.connect(self.app_obj.new_geometry_object)
-        self.ui.newgrb_btn.triggered.connect(self.app_obj.new_gerber_object)
-        self.ui.newexc_btn.triggered.connect(self.app_obj.new_excellon_object)
         self.ui.editgeo_btn.triggered.connect(self.object2editor)
         self.ui.editgeo_btn.triggered.connect(self.object2editor)
         self.ui.update_obj_btn.triggered.connect(lambda: self.editor2object())
         self.ui.update_obj_btn.triggered.connect(lambda: self.editor2object())
         self.ui.copy_btn.triggered.connect(self.on_copy_command)
         self.ui.copy_btn.triggered.connect(self.on_copy_command)
@@ -3586,7 +3583,7 @@ class App(QtCore.QObject):
 
 
         if len(objs) < 2:
         if len(objs) < 2:
             self.inform.emit('[ERROR_NOTCL] %s: %d' %
             self.inform.emit('[ERROR_NOTCL] %s: %d' %
-                             (_("At least two objects are required for join. AppObjects currently selected"), len(objs)))
+                             (_("At least two objects are required for join. Objects currently selected"), len(objs)))
             return 'fail'
             return 'fail'
 
 
         for obj in objs:
         for obj in objs:
@@ -3645,7 +3642,7 @@ class App(QtCore.QObject):
 
 
         if len(objs) < 2:
         if len(objs) < 2:
             self.inform.emit('[ERROR_NOTCL] %s: %d' %
             self.inform.emit('[ERROR_NOTCL] %s: %d' %
-                             (_("At least two objects are required for join. AppObjects currently selected"), len(objs)))
+                             (_("At least two objects are required for join. Objects currently selected"), len(objs)))
             return 'fail'
             return 'fail'
 
 
         def initialize(exc_obj, app):
         def initialize(exc_obj, app):
@@ -3673,7 +3670,7 @@ class App(QtCore.QObject):
 
 
         if len(objs) < 2:
         if len(objs) < 2:
             self.inform.emit('[ERROR_NOTCL] %s: %d' %
             self.inform.emit('[ERROR_NOTCL] %s: %d' %
-                             (_("At least two objects are required for join. AppObjects currently selected"), len(objs)))
+                             (_("At least two objects are required for join. Objects currently selected"), len(objs)))
             return 'fail'
             return 'fail'
 
 
         def initialize(grb_obj, app):
         def initialize(grb_obj, app):
@@ -5793,7 +5790,7 @@ class App(QtCore.QObject):
         else:
         else:
             self.plotcanvas.auto_adjust_axes()
             self.plotcanvas.auto_adjust_axes()
 
 
-        self.on_zoom_fit(None)
+        self.on_zoom_fit()
         self.collection.update_view()
         self.collection.update_view()
         # self.inform.emit(_("Plots updated ..."))
         # self.inform.emit(_("Plots updated ..."))
 
 
@@ -6285,7 +6282,7 @@ class App(QtCore.QObject):
 
 
         for obj in self.all_objects_list:
         for obj in self.all_objects_list:
             # ScriptObject and DocumentObject objects can't be selected
             # ScriptObject and DocumentObject objects can't be selected
-            if isinstance(obj, ScriptObject) or isinstance(obj, DocumentObject):
+            if obj.kind == 'script' or obj.kind == 'document':
                 continue
                 continue
 
 
             if key == 'multisel' and obj.options['name'] in self.objects_under_the_click_list:
             if key == 'multisel' and obj.options['name'] in self.objects_under_the_click_list:
@@ -7596,8 +7593,6 @@ class App(QtCore.QObject):
         Will create a new script file and open it in the Code Editor
         Will create a new script file and open it in the Code Editor
 
 
         :param silent:  if True will not display status messages
         :param silent:  if True will not display status messages
-        :param name:    if specified will be the name of the new script
-        :param text:    pass a source file to the newly created script to be loaded in it
         :return:        None
         :return:        None
         """
         """
         if silent is False:
         if silent is False:
@@ -9465,8 +9460,8 @@ class App(QtCore.QObject):
             # no_stats dict; just so it won't break things on website
             # no_stats dict; just so it won't break things on website
             no_ststs_dict = {}
             no_ststs_dict = {}
             no_ststs_dict["global_ststs"] = {}
             no_ststs_dict["global_ststs"] = {}
-            full_url = App.version_url + "?s=" + str(self.defaults['global_serial']) + "&v=" + str(self.version) + \
-                       "&os=" + str(self.os) + "&" + urllib.parse.urlencode(no_ststs_dict["global_ststs"])
+            full_url = App.version_url + "?s=" + str(self.defaults['global_serial']) + "&v=" + str(self.version)
+            full_url += "&os=" + str(self.os) + "&" + urllib.parse.urlencode(no_ststs_dict["global_ststs"])
 
 
         App.log.debug("Checking for updates @ %s" % full_url)
         App.log.debug("Checking for updates @ %s" % full_url)
         # ## Get the data
         # ## Get the data
@@ -9569,13 +9564,12 @@ class App(QtCore.QObject):
             # will use the default Matplotlib axes
             # will use the default Matplotlib axes
             self.hover_shapes = ShapeCollectionLegacy(obj=self, app=self, name='hover')
             self.hover_shapes = ShapeCollectionLegacy(obj=self, app=self, name='hover')
 
 
-    def on_zoom_fit(self, event):
+    def on_zoom_fit(self):
         """
         """
         Callback for zoom-fit request. This can be either from the corresponding
         Callback for zoom-fit request. This can be either from the corresponding
         toolbar button or the '1' key when the canvas is focused. Calls ``self.adjust_axes()``
         toolbar button or the '1' key when the canvas is focused. Calls ``self.adjust_axes()``
         with axes limits from the geometry bounds of all objects.
         with axes limits from the geometry bounds of all objects.
 
 
-        :param event:   Ignored.
         :return:        None
         :return:        None
         """
         """
         if self.is_legacy is False:
         if self.is_legacy is False:
@@ -9644,7 +9638,7 @@ class App(QtCore.QObject):
         """
         """
         Enable plots
         Enable plots
 
 
-        :param objects: list of AppObjects to be enabled
+        :param objects: list of Objects to be enabled
         :return:
         :return:
         """
         """
         log.debug("Enabling plots ...")
         log.debug("Enabling plots ...")
@@ -9685,7 +9679,7 @@ class App(QtCore.QObject):
         """
         """
         Disables plots
         Disables plots
 
 
-        :param objects: list of AppObjects to be disabled
+        :param objects: list of Objects to be disabled
         :return:
         :return:
         """
         """
 
 
@@ -9734,7 +9728,7 @@ class App(QtCore.QObject):
         """
         """
         Toggle plots visibility
         Toggle plots visibility
 
 
-        :param objects:     list of AppObjects for which to be toggled the visibility
+        :param objects:     list of Objects for which to be toggled the visibility
         :return:            None
         :return:            None
         """
         """
 
 

+ 2 - 3
AppEditors/FlatCAMGeoEditor.py

@@ -15,10 +15,9 @@ from PyQt5 import QtGui, QtCore, QtWidgets
 from PyQt5.QtCore import Qt, QSettings
 from PyQt5.QtCore import Qt, QSettings
 
 
 from camlib import distance, arc, three_point_circle, Geometry, FlatCAMRTreeStorage
 from camlib import distance, arc, three_point_circle, Geometry, FlatCAMRTreeStorage
-from AppTool import AppTool
-from AppGUI.ObjectUI import RadioSet
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import OptionalInputSection, FCCheckBox, FCEntry, FCComboBox, FCTextAreaRich, \
 from AppGUI.GUIElements import OptionalInputSection, FCCheckBox, FCEntry, FCComboBox, FCTextAreaRich, \
-    FCTable, FCDoubleSpinner, FCButton, EvalEntry2, FCInputDialog, FCTree
+    FCDoubleSpinner, FCButton, FCInputDialog, FCTree
 from AppParsers.ParseFont import *
 from AppParsers.ParseFont import *
 
 
 from shapely.geometry import LineString, LinearRing, MultiLineString, Polygon, MultiPolygon
 from shapely.geometry import LineString, LinearRing, MultiLineString, Polygon, MultiPolygon

+ 1 - 3
AppEditors/FlatCAMGrbEditor.py

@@ -14,15 +14,13 @@ import shapely.affinity as affinity
 
 
 from vispy.geometry import Rect
 from vispy.geometry import Rect
 
 
-import threading
-import time
 from copy import copy, deepcopy
 from copy import copy, deepcopy
 import logging
 import logging
 
 
 from camlib import distance, arc, three_point_circle
 from camlib import distance, arc, three_point_circle
 from AppGUI.GUIElements import FCEntry, FCComboBox, FCTable, FCDoubleSpinner, FCSpinner, RadioSet, \
 from AppGUI.GUIElements import FCEntry, FCComboBox, FCTable, FCDoubleSpinner, FCSpinner, RadioSet, \
     EvalEntry2, FCInputDialog, FCButton, OptionalInputSection, FCCheckBox
     EvalEntry2, FCInputDialog, FCButton, OptionalInputSection, FCCheckBox
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 
 
 import numpy as np
 import numpy as np
 from numpy.linalg import norm as numpy_norm
 from numpy.linalg import norm as numpy_norm

+ 42 - 56
AppGUI/MainGUI.py

@@ -581,7 +581,7 @@ class MainGUI(QtWidgets.QMainWindow):
         self.geo_cutpath_menuitem = self.geo_editor_menu.addAction(
         self.geo_cutpath_menuitem = self.geo_editor_menu.addAction(
             QtGui.QIcon(self.app.resource_location + '/cutpath16.png'), _('Cut Path\tX'))
             QtGui.QIcon(self.app.resource_location + '/cutpath16.png'), _('Cut Path\tX'))
         # self.move_menuitem = self.menu.addAction(
         # self.move_menuitem = self.menu.addAction(
-        #   QtGui.QIcon(self.app.resource_location + '/move16.png'), "Move AppObjects 'm'")
+        #   QtGui.QIcon(self.app.resource_location + '/move16.png'), "Move Objects 'm'")
         self.geo_copy_menuitem = self.geo_editor_menu.addAction(
         self.geo_copy_menuitem = self.geo_editor_menu.addAction(
             QtGui.QIcon(self.app.resource_location + '/copy16.png'), _("Copy Geom\tC"))
             QtGui.QIcon(self.app.resource_location + '/copy16.png'), _("Copy Geom\tC"))
         self.geo_delete_menuitem = self.geo_editor_menu.addAction(
         self.geo_delete_menuitem = self.geo_editor_menu.addAction(
@@ -789,9 +789,9 @@ class MainGUI(QtWidgets.QMainWindow):
         self.toolbarfile.setObjectName('File_TB')
         self.toolbarfile.setObjectName('File_TB')
         self.addToolBar(self.toolbarfile)
         self.addToolBar(self.toolbarfile)
 
 
-        self.toolbargeo = QtWidgets.QToolBar(_('Edit Toolbar'))
-        self.toolbargeo.setObjectName('Edit_TB')
-        self.addToolBar(self.toolbargeo)
+        self.toolbaredit = QtWidgets.QToolBar(_('Edit Toolbar'))
+        self.toolbaredit.setObjectName('Edit_TB')
+        self.addToolBar(self.toolbaredit)
 
 
         self.toolbarview = QtWidgets.QToolBar(_('View Toolbar'))
         self.toolbarview = QtWidgets.QToolBar(_('View Toolbar'))
         self.toolbarview.setObjectName('View_TB')
         self.toolbarview.setObjectName('View_TB')
@@ -845,37 +845,30 @@ class MainGUI(QtWidgets.QMainWindow):
         # ########################################################################
         # ########################################################################
         # ########################## Edit Toolbar# ###############################
         # ########################## Edit Toolbar# ###############################
         # ########################################################################
         # ########################################################################
-        self.newgeo_btn = self.toolbargeo.addAction(
-            QtGui.QIcon(self.app.resource_location + '/new_file_geo32.png'), _("New Blank Geometry"))
-        self.newgrb_btn = self.toolbargeo.addAction(
-            QtGui.QIcon(self.app.resource_location + '/new_file_grb32.png'), _("New Blank Gerber"))
-        self.newexc_btn = self.toolbargeo.addAction(
-            QtGui.QIcon(self.app.resource_location + '/new_file_exc32.png'), _("New Blank Excellon"))
-        self.toolbargeo.addSeparator()
-        self.editgeo_btn = self.toolbargeo.addAction(
+        self.editgeo_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/edit_file32.png'), _("Editor"))
             QtGui.QIcon(self.app.resource_location + '/edit_file32.png'), _("Editor"))
-        self.update_obj_btn = self.toolbargeo.addAction(
+        self.update_obj_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/close_edit_file32.png'), _("Save Object and close the Editor")
             QtGui.QIcon(self.app.resource_location + '/close_edit_file32.png'), _("Save Object and close the Editor")
         )
         )
 
 
-        self.toolbargeo.addSeparator()
-        self.copy_btn = self.toolbargeo.addAction(
+        self.toolbaredit.addSeparator()
+        self.copy_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/copy_file32.png'), _("Copy"))
             QtGui.QIcon(self.app.resource_location + '/copy_file32.png'), _("Copy"))
-        self.delete_btn = self.toolbargeo.addAction(
+        self.delete_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/delete_file32.png'), _("&Delete"))
             QtGui.QIcon(self.app.resource_location + '/delete_file32.png'), _("&Delete"))
-        self.toolbargeo.addSeparator()
-        self.distance_btn = self.toolbargeo.addAction(
+        self.toolbaredit.addSeparator()
+        self.distance_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/distance32.png'), _("Distance Tool"))
             QtGui.QIcon(self.app.resource_location + '/distance32.png'), _("Distance Tool"))
-        self.distance_min_btn = self.toolbargeo.addAction(
+        self.distance_min_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/distance_min32.png'), _("Distance Min Tool"))
             QtGui.QIcon(self.app.resource_location + '/distance_min32.png'), _("Distance Min Tool"))
-        self.origin_btn = self.toolbargeo.addAction(
+        self.origin_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/origin32.png'), _('Set Origin'))
             QtGui.QIcon(self.app.resource_location + '/origin32.png'), _('Set Origin'))
-        self.move2origin_btn = self.toolbargeo.addAction(
+        self.move2origin_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/origin2_32.png'), _('Move to Origin'))
             QtGui.QIcon(self.app.resource_location + '/origin2_32.png'), _('Move to Origin'))
 
 
-        self.jmp_btn = self.toolbargeo.addAction(
+        self.jmp_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/jump_to16.png'), _('Jump to Location'))
             QtGui.QIcon(self.app.resource_location + '/jump_to16.png'), _('Jump to Location'))
-        self.locate_btn = self.toolbargeo.addAction(
+        self.locate_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/locate32.png'), _('Locate in Object'))
             QtGui.QIcon(self.app.resource_location + '/locate32.png'), _('Locate in Object'))
 
 
         # ########################################################################
         # ########################################################################
@@ -912,7 +905,7 @@ class MainGUI(QtWidgets.QMainWindow):
         self.dblsided_btn = self.toolbartools.addAction(
         self.dblsided_btn = self.toolbartools.addAction(
             QtGui.QIcon(self.app.resource_location + '/doubleside32.png'), _("2Sided Tool"))
             QtGui.QIcon(self.app.resource_location + '/doubleside32.png'), _("2Sided Tool"))
         self.align_btn = self.toolbartools.addAction(
         self.align_btn = self.toolbartools.addAction(
-            QtGui.QIcon(self.app.resource_location + '/align32.png'), _("Align AppObjects Tool"))
+            QtGui.QIcon(self.app.resource_location + '/align32.png'), _("Align Objects Tool"))
         self.extract_btn = self.toolbartools.addAction(
         self.extract_btn = self.toolbartools.addAction(
             QtGui.QIcon(self.app.resource_location + '/extract_drill32.png'), _("Extract Drills Tool"))
             QtGui.QIcon(self.app.resource_location + '/extract_drill32.png'), _("Extract Drills Tool"))
 
 
@@ -1035,7 +1028,7 @@ class MainGUI(QtWidgets.QMainWindow):
             QtGui.QIcon(self.app.resource_location + '/transform.png'), _("Transformations"))
             QtGui.QIcon(self.app.resource_location + '/transform.png'), _("Transformations"))
         self.geo_edit_toolbar.addSeparator()
         self.geo_edit_toolbar.addSeparator()
         self.geo_move_btn = self.geo_edit_toolbar.addAction(
         self.geo_move_btn = self.geo_edit_toolbar.addAction(
-            QtGui.QIcon(self.app.resource_location + '/move32.png'), _("Move AppObjects "))
+            QtGui.QIcon(self.app.resource_location + '/move32.png'), _("Move Objects "))
 
 
         # ########################################################################
         # ########################################################################
         # ########################## Gerber Editor Toolbar# ######################
         # ########################## Gerber Editor Toolbar# ######################
@@ -1374,11 +1367,11 @@ class MainGUI(QtWidgets.QMainWindow):
         self.cmenu_newmenu = self.popMenu.addMenu(
         self.cmenu_newmenu = self.popMenu.addMenu(
             QtGui.QIcon(self.app.resource_location + '/file32.png'), _("New"))
             QtGui.QIcon(self.app.resource_location + '/file32.png'), _("New"))
         self.popmenu_new_geo = self.cmenu_newmenu.addAction(
         self.popmenu_new_geo = self.cmenu_newmenu.addAction(
-            QtGui.QIcon(self.app.resource_location + '/new_geo32_bis.png'), _("Geometry"))
+            QtGui.QIcon(self.app.resource_location + '/new_file_geo16.png'), _("Geometry"))
         self.popmenu_new_grb = self.cmenu_newmenu.addAction(
         self.popmenu_new_grb = self.cmenu_newmenu.addAction(
-            QtGui.QIcon(self.app.resource_location + '/flatcam_icon32.png'), "Gerber")
+            QtGui.QIcon(self.app.resource_location + '/new_file_grb16.png'), "Gerber")
         self.popmenu_new_exc = self.cmenu_newmenu.addAction(
         self.popmenu_new_exc = self.cmenu_newmenu.addAction(
-            QtGui.QIcon(self.app.resource_location + '/new_exc32.png'), _("Excellon"))
+            QtGui.QIcon(self.app.resource_location + '/new_file_exc16.png'), _("Excellon"))
         self.cmenu_newmenu.addSeparator()
         self.cmenu_newmenu.addSeparator()
         self.popmenu_new_prj = self.cmenu_newmenu.addAction(
         self.popmenu_new_prj = self.cmenu_newmenu.addAction(
             QtGui.QIcon(self.app.resource_location + '/file16.png'), _("Project"))
             QtGui.QIcon(self.app.resource_location + '/file16.png'), _("Project"))
@@ -1694,9 +1687,9 @@ class MainGUI(QtWidgets.QMainWindow):
             self.toolbarfile.setVisible(False)
             self.toolbarfile.setVisible(False)
 
 
         if tb & 2:
         if tb & 2:
-            self.toolbargeo.setVisible(True)
+            self.toolbaredit.setVisible(True)
         else:
         else:
-            self.toolbargeo.setVisible(False)
+            self.toolbaredit.setVisible(False)
 
 
         if tb & 4:
         if tb & 4:
             self.toolbarview.setVisible(True)
             self.toolbarview.setVisible(True)
@@ -1816,37 +1809,30 @@ class MainGUI(QtWidgets.QMainWindow):
         # ########################################################################
         # ########################################################################
         # ## Edit Toolbar # ##
         # ## Edit Toolbar # ##
         # ########################################################################
         # ########################################################################
-        self.newgeo_btn = self.toolbargeo.addAction(
-            QtGui.QIcon(self.app.resource_location + '/new_file_geo32.png'), _("New Blank Geometry"))
-        self.newgrb_btn = self.toolbargeo.addAction(
-            QtGui.QIcon(self.app.resource_location + '/new_file_grb32.png'), _("New Blank Gerber"))
-        self.newexc_btn = self.toolbargeo.addAction(
-            QtGui.QIcon(self.app.resource_location + '/new_file_exc32.png'), _("New Blank Excellon"))
-        self.toolbargeo.addSeparator()
-        self.editgeo_btn = self.toolbargeo.addAction(
+        self.editgeo_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/edit32.png'), _("Editor"))
             QtGui.QIcon(self.app.resource_location + '/edit32.png'), _("Editor"))
-        self.update_obj_btn = self.toolbargeo.addAction(
+        self.update_obj_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/close_edit_file32.png'),
             QtGui.QIcon(self.app.resource_location + '/close_edit_file32.png'),
             _("Save Object and close the Editor")
             _("Save Object and close the Editor")
         )
         )
 
 
-        self.toolbargeo.addSeparator()
-        self.copy_btn = self.toolbargeo.addAction(
+        self.toolbaredit.addSeparator()
+        self.copy_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/copy_file32.png'), _("Copy"))
             QtGui.QIcon(self.app.resource_location + '/copy_file32.png'), _("Copy"))
-        self.delete_btn = self.toolbargeo.addAction(
+        self.delete_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/delete_file32.png'), _("&Delete"))
             QtGui.QIcon(self.app.resource_location + '/delete_file32.png'), _("&Delete"))
-        self.toolbargeo.addSeparator()
-        self.distance_btn = self.toolbargeo.addAction(
+        self.toolbaredit.addSeparator()
+        self.distance_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/distance32.png'), _("Distance Tool"))
             QtGui.QIcon(self.app.resource_location + '/distance32.png'), _("Distance Tool"))
-        self.distance_min_btn = self.toolbargeo.addAction(
+        self.distance_min_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/distance_min32.png'), _("Distance Min Tool"))
             QtGui.QIcon(self.app.resource_location + '/distance_min32.png'), _("Distance Min Tool"))
-        self.origin_btn = self.toolbargeo.addAction(
+        self.origin_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/origin32.png'), _('Set Origin'))
             QtGui.QIcon(self.app.resource_location + '/origin32.png'), _('Set Origin'))
-        self.move2origin_btn = self.toolbargeo.addAction(
+        self.move2origin_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/origin2_32.png'), _('Move to Origin'))
             QtGui.QIcon(self.app.resource_location + '/origin2_32.png'), _('Move to Origin'))
-        self.jmp_btn = self.toolbargeo.addAction(
+        self.jmp_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/jump_to16.png'), _('Jump to Location'))
             QtGui.QIcon(self.app.resource_location + '/jump_to16.png'), _('Jump to Location'))
-        self.locate_btn = self.toolbargeo.addAction(
+        self.locate_btn = self.toolbaredit.addAction(
             QtGui.QIcon(self.app.resource_location + '/locate32.png'), _('Locate in Object'))
             QtGui.QIcon(self.app.resource_location + '/locate32.png'), _('Locate in Object'))
 
 
         # ########################################################################
         # ########################################################################
@@ -1881,7 +1867,7 @@ class MainGUI(QtWidgets.QMainWindow):
         self.dblsided_btn = self.toolbartools.addAction(
         self.dblsided_btn = self.toolbartools.addAction(
             QtGui.QIcon(self.app.resource_location + '/doubleside32.png'), _("2Sided Tool"))
             QtGui.QIcon(self.app.resource_location + '/doubleside32.png'), _("2Sided Tool"))
         self.align_btn = self.toolbartools.addAction(
         self.align_btn = self.toolbartools.addAction(
-            QtGui.QIcon(self.app.resource_location + '/align32.png'), _("Align AppObjects Tool"))
+            QtGui.QIcon(self.app.resource_location + '/align32.png'), _("Align Objects Tool"))
         self.extract_btn = self.toolbartools.addAction(
         self.extract_btn = self.toolbartools.addAction(
             QtGui.QIcon(self.app.resource_location + '/extract_drill32.png'), _("Extract Drills Tool"))
             QtGui.QIcon(self.app.resource_location + '/extract_drill32.png'), _("Extract Drills Tool"))
 
 
@@ -1996,7 +1982,7 @@ class MainGUI(QtWidgets.QMainWindow):
         self.geo_cutpath_btn = self.geo_edit_toolbar.addAction(
         self.geo_cutpath_btn = self.geo_edit_toolbar.addAction(
             QtGui.QIcon(self.app.resource_location + '/cutpath32.png'), _('Cut Path'))
             QtGui.QIcon(self.app.resource_location + '/cutpath32.png'), _('Cut Path'))
         self.geo_copy_btn = self.geo_edit_toolbar.addAction(
         self.geo_copy_btn = self.geo_edit_toolbar.addAction(
-            QtGui.QIcon(self.app.resource_location + '/copy32.png'), _("Copy AppObjects"))
+            QtGui.QIcon(self.app.resource_location + '/copy32.png'), _("Copy Objects"))
         self.geo_delete_btn = self.geo_edit_toolbar.addAction(
         self.geo_delete_btn = self.geo_edit_toolbar.addAction(
             QtGui.QIcon(self.app.resource_location + '/trash32.png'), _("Delete Shape"))
             QtGui.QIcon(self.app.resource_location + '/trash32.png'), _("Delete Shape"))
         self.geo_transform_btn = self.geo_edit_toolbar.addAction(
         self.geo_transform_btn = self.geo_edit_toolbar.addAction(
@@ -2004,7 +1990,7 @@ class MainGUI(QtWidgets.QMainWindow):
 
 
         self.geo_edit_toolbar.addSeparator()
         self.geo_edit_toolbar.addSeparator()
         self.geo_move_btn = self.geo_edit_toolbar.addAction(
         self.geo_move_btn = self.geo_edit_toolbar.addAction(
-            QtGui.QIcon(self.app.resource_location + '/move32.png'), _("Move AppObjects"))
+            QtGui.QIcon(self.app.resource_location + '/move32.png'), _("Move Objects"))
 
 
         # ########################################################################
         # ########################################################################
         # ## Gerber Editor Toolbar # ##
         # ## Gerber Editor Toolbar # ##
@@ -2547,7 +2533,7 @@ class MainGUI(QtWidgets.QMainWindow):
 
 
                 # Zoom Fit
                 # Zoom Fit
                 if key == QtCore.Qt.Key_V:
                 if key == QtCore.Qt.Key_V:
-                    self.app.on_zoom_fit(None)
+                    self.app.on_zoom_fit()
 
 
                 # Mirror on X the selected object(s)
                 # Mirror on X the selected object(s)
                 if key == QtCore.Qt.Key_X:
                 if key == QtCore.Qt.Key_X:
@@ -2726,7 +2712,7 @@ class MainGUI(QtWidgets.QMainWindow):
                     self.app.geo_editor.on_corner_snap()
                     self.app.geo_editor.on_corner_snap()
 
 
                 if key == QtCore.Qt.Key_V or key == 'V':
                 if key == QtCore.Qt.Key_V or key == 'V':
-                    self.app.on_zoom_fit(None)
+                    self.app.on_zoom_fit()
 
 
                 # we do this so we can reuse the following keys while inside a Tool
                 # we do this so we can reuse the following keys while inside a Tool
                 # the above keys are general enough so were left outside
                 # the above keys are general enough so were left outside
@@ -3180,7 +3166,7 @@ class MainGUI(QtWidgets.QMainWindow):
                 # Zoom Fit
                 # Zoom Fit
                 if key == QtCore.Qt.Key_V or key == 'V':
                 if key == QtCore.Qt.Key_V or key == 'V':
                     self.app.exc_editor.launched_from_shortcuts = True
                     self.app.exc_editor.launched_from_shortcuts = True
-                    self.app.on_zoom_fit(None)
+                    self.app.on_zoom_fit()
                     return
                     return
 
 
                 # Add Slot Hole Tool
                 # Add Slot Hole Tool
@@ -4010,7 +3996,7 @@ class ShortcutsTab(QtWidgets.QWidget):
                 _("Skew on Y axis"),
                 _("Skew on Y axis"),
 
 
                 # ALT section
                 # ALT section
-                _("Align AppObjects Tool"), _("Calculators Tool"), _("2-Sided PCB Tool"), _("Transformations Tool"),
+                _("Align Objects Tool"), _("Calculators Tool"), _("2-Sided PCB Tool"), _("Transformations Tool"),
                 _("Punch Gerber Tool"), _("Extract Drills Tool"), _("Fiducials Tool"),
                 _("Punch Gerber Tool"), _("Extract Drills Tool"), _("Fiducials Tool"),
                 _("Solder Paste Dispensing Tool"),
                 _("Solder Paste Dispensing Tool"),
                 _("Film PCB Tool"), _("Corner Markers Tool"), _("Non-Copper Clearing Tool"), _("Optimal Tool"),
                 _("Film PCB Tool"), _("Corner Markers Tool"), _("Non-Copper Clearing Tool"), _("Optimal Tool"),

+ 2 - 2
AppGUI/ObjectUI.py

@@ -1272,7 +1272,7 @@ class ExcellonObjectUI(ObjectUI):
         pp_excellon_label = QtWidgets.QLabel('%s:' % _("Preprocessor E"))
         pp_excellon_label = QtWidgets.QLabel('%s:' % _("Preprocessor E"))
         pp_excellon_label.setToolTip(
         pp_excellon_label.setToolTip(
             _("The preprocessor JSON file that dictates\n"
             _("The preprocessor JSON file that dictates\n"
-              "Gcode output for Excellon AppObjects.")
+              "Gcode output for Excellon Objects.")
         )
         )
         self.pp_excellon_name_cb = FCComboBox()
         self.pp_excellon_name_cb = FCComboBox()
         self.pp_excellon_name_cb.setFocusPolicy(QtCore.Qt.StrongFocus)
         self.pp_excellon_name_cb.setFocusPolicy(QtCore.Qt.StrongFocus)
@@ -1284,7 +1284,7 @@ class ExcellonObjectUI(ObjectUI):
         pp_geo_label = QtWidgets.QLabel('%s:' % _("Preprocessor G"))
         pp_geo_label = QtWidgets.QLabel('%s:' % _("Preprocessor G"))
         pp_geo_label.setToolTip(
         pp_geo_label.setToolTip(
             _("The preprocessor JSON file that dictates\n"
             _("The preprocessor JSON file that dictates\n"
-              "Gcode output for Geometry (Milling) AppObjects.")
+              "Gcode output for Geometry (Milling) Objects.")
         )
         )
         self.pp_geo_name_cb = FCComboBox()
         self.pp_geo_name_cb = FCComboBox()
         self.pp_geo_name_cb.setFocusPolicy(QtCore.Qt.StrongFocus)
         self.pp_geo_name_cb.setFocusPolicy(QtCore.Qt.StrongFocus)

+ 1 - 1
AppGUI/preferences/PreferencesUIManager.py

@@ -1093,7 +1093,7 @@ class PreferencesUIManager:
         if self.ui.toolbarfile.isVisible():
         if self.ui.toolbarfile.isVisible():
             tb_status += 1
             tb_status += 1
 
 
-        if self.ui.toolbargeo.isVisible():
+        if self.ui.toolbaredit.isVisible():
             tb_status += 2
             tb_status += 2
 
 
         if self.ui.toolbarview.isVisible():
         if self.ui.toolbarview.isVisible():

+ 7 - 7
AppGUI/preferences/general/GeneralGUIPrefGroupUI.py

@@ -647,7 +647,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
         # first remove the toolbars:
         # first remove the toolbars:
         try:
         try:
             self.app.ui.removeToolBar(self.app.ui.toolbarfile)
             self.app.ui.removeToolBar(self.app.ui.toolbarfile)
-            self.app.ui.removeToolBar(self.app.ui.toolbargeo)
+            self.app.ui.removeToolBar(self.app.ui.toolbaredit)
             self.app.ui.removeToolBar(self.app.ui.toolbarview)
             self.app.ui.removeToolBar(self.app.ui.toolbarview)
             self.app.ui.removeToolBar(self.app.ui.toolbarshell)
             self.app.ui.removeToolBar(self.app.ui.toolbarshell)
             self.app.ui.removeToolBar(self.app.ui.toolbartools)
             self.app.ui.removeToolBar(self.app.ui.toolbartools)
@@ -664,9 +664,9 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
             self.app.ui.toolbarfile.setObjectName('File_TB')
             self.app.ui.toolbarfile.setObjectName('File_TB')
             self.app.ui.addToolBar(Qt.LeftToolBarArea, self.app.ui.toolbarfile)
             self.app.ui.addToolBar(Qt.LeftToolBarArea, self.app.ui.toolbarfile)
 
 
-            self.app.ui.toolbargeo = QtWidgets.QToolBar('Edit Toolbar')
-            self.app.ui.toolbargeo.setObjectName('Edit_TB')
-            self.app.ui.addToolBar(Qt.LeftToolBarArea, self.app.ui.toolbargeo)
+            self.app.ui.toolbaredit = QtWidgets.QToolBar('Edit Toolbar')
+            self.app.ui.toolbaredit.setObjectName('Edit_TB')
+            self.app.ui.addToolBar(Qt.LeftToolBarArea, self.app.ui.toolbaredit)
 
 
             self.app.ui.toolbarshell = QtWidgets.QToolBar('Shell Toolbar')
             self.app.ui.toolbarshell = QtWidgets.QToolBar('Shell Toolbar')
             self.app.ui.toolbarshell.setObjectName('Shell_TB')
             self.app.ui.toolbarshell.setObjectName('Shell_TB')
@@ -702,9 +702,9 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
             self.app.ui.toolbarfile.setObjectName('File_TB')
             self.app.ui.toolbarfile.setObjectName('File_TB')
             self.app.ui.addToolBar(self.app.ui.toolbarfile)
             self.app.ui.addToolBar(self.app.ui.toolbarfile)
 
 
-            self.app.ui.toolbargeo = QtWidgets.QToolBar('Edit Toolbar')
-            self.app.ui.toolbargeo.setObjectName('Edit_TB')
-            self.app.ui.addToolBar(self.app.ui.toolbargeo)
+            self.app.ui.toolbaredit = QtWidgets.QToolBar('Edit Toolbar')
+            self.app.ui.toolbaredit.setObjectName('Edit_TB')
+            self.app.ui.addToolBar(self.app.ui.toolbaredit)
 
 
             self.app.ui.toolbarview = QtWidgets.QToolBar('View Toolbar')
             self.app.ui.toolbarview = QtWidgets.QToolBar('View Toolbar')
             self.app.ui.toolbarview.setObjectName('View_TB')
             self.app.ui.toolbarview.setObjectName('View_TB')

+ 3 - 3
AppObjects/AppObject.py

@@ -292,7 +292,7 @@ class AppObject(QtCore.QObject):
         self.app.collection.append(obj)
         self.app.collection.append(obj)
 
 
         # after adding the object to the collection always update the list of objects that are in the collection
         # after adding the object to the collection always update the list of objects that are in the collection
-        self.all_objects_list = self.app.collection.get_list()
+        self.app.all_objects_list = self.app.collection.get_list()
 
 
         # self.app.inform.emit('[selected] %s created & selected: %s' %
         # self.app.inform.emit('[selected] %s created & selected: %s' %
         #                  (str(obj.kind).capitalize(), str(obj.options['name'])))
         #                  (str(obj.kind).capitalize(), str(obj.options['name'])))
@@ -358,7 +358,7 @@ class AppObject(QtCore.QObject):
         # Send to worker
         # Send to worker
         # self.worker.add_task(worker_task, [self])
         # self.worker.add_task(worker_task, [self])
         if plot is True:
         if plot is True:
-            self.worker_task.emit({'fcn': task, 'params': [obj]})
+            self.app.worker_task.emit({'fcn': task, 'params': [obj]})
 
 
     def on_object_changed(self, obj):
     def on_object_changed(self, obj):
         """
         """
@@ -390,4 +390,4 @@ class AppObject(QtCore.QObject):
 
 
         :return: None
         :return: None
         """
         """
-        self.app.on_zoom_fit(None)
+        self.app.on_zoom_fit()

+ 1 - 1
AppObjects/FlatCAMExcellon.py

@@ -146,7 +146,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
 
 
         If only one object is in exc_list parameter then this function will copy that object in the exc_final
         If only one object is in exc_list parameter then this function will copy that object in the exc_final
 
 
-        :param exc_list: List or one object of ExcellonObject AppObjects to join.
+        :param exc_list: List or one object of ExcellonObject Objects to join.
         :param exc_final: Destination ExcellonObject object.
         :param exc_final: Destination ExcellonObject object.
         :return: None
         :return: None
         """
         """

+ 1 - 1
AppObjects/FlatCAMGeometry.py

@@ -2738,7 +2738,7 @@ class GeometryObject(FlatCAMObj, Geometry):
         """
         """
         Merges the geometry of objects in grb_list into the geometry of geo_final.
         Merges the geometry of objects in grb_list into the geometry of geo_final.
 
 
-        :param geo_list: List of GerberObject AppObjects to join.
+        :param geo_list: List of GerberObject Objects to join.
         :param geo_final: Destination GerberObject object.
         :param geo_final: Destination GerberObject object.
         :param multigeo: if the merged geometry objects are of type MultiGeo
         :param multigeo: if the merged geometry objects are of type MultiGeo
         :return: None
         :return: None

+ 1 - 1
AppObjects/FlatCAMGerber.py

@@ -45,7 +45,7 @@ class GerberObject(FlatCAMObj, Gerber):
         Merges the geometry of objects in geo_list into
         Merges the geometry of objects in geo_list into
         the geometry of geo_final.
         the geometry of geo_final.
 
 
-        :param grb_list: List of GerberObject AppObjects to join.
+        :param grb_list: List of GerberObject Objects to join.
         :param grb_final: Destination GeometryObject object.
         :param grb_final: Destination GeometryObject object.
         :return: None
         :return: None
         """
         """

+ 2 - 2
AppObjects/ObjectCollection.py

@@ -1010,7 +1010,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
 
 
     def on_row_selected(self, obj_name):
     def on_row_selected(self, obj_name):
         """
         """
-        This is a special string; when received it will make all Menu -> AppObjects entries unchecked
+        This is a special string; when received it will make all Menu -> Objects entries unchecked
         It mean we clicked outside of the items and deselected all
         It mean we clicked outside of the items and deselected all
 
 
         :param obj_name:
         :param obj_name:
@@ -1194,6 +1194,6 @@ class ObjectCollection(QtCore.QAbstractItemModel):
                     pass
                     pass
 
 
             if obj_list:
             if obj_list:
-                self.app.inform.emit('%s' % _("AppObjects selection is cleared."))
+                self.app.inform.emit('%s' % _("Objects selection is cleared."))
             else:
             else:
                 self.app.inform.emit('')
                 self.app.inform.emit('')

+ 8 - 8
AppTool.py → AppTools/AppTool.py

@@ -6,8 +6,7 @@
 # MIT Licence                                              #
 # MIT Licence                                              #
 # ########################################################## ##
 # ########################################################## ##
 
 
-from PyQt5 import QtGui, QtCore, QtWidgets, QtWidgets
-from PyQt5.QtCore import Qt
+from PyQt5 import QtCore, QtWidgets
 
 
 from shapely.geometry import Polygon, LineString
 from shapely.geometry import Polygon, LineString
 
 
@@ -27,15 +26,16 @@ class AppTool(QtWidgets.QWidget):
     def __init__(self, app, parent=None):
     def __init__(self, app, parent=None):
         """
         """
 
 
-        :param app: The application this tool will run in.
-        :type app: AppMain
-        :param parent: Qt Parent
-        :return: AppTool
+        :param app:         The application this tool will run in.
+        :type app:          App.App
+        :param parent:      Qt Parent
+        :return:            AppTool
         """
         """
+        QtWidgets.QWidget.__init__(self, parent)
+
         self.app = app
         self.app = app
-        self.decimals = app.decimals
+        self.decimals = self.app.decimals
 
 
-        QtWidgets.QWidget.__init__(self, parent)
         # self.setSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
         # self.setSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
 
 
         self.layout = QtWidgets.QVBoxLayout()
         self.layout = QtWidgets.QVBoxLayout()

+ 3 - 3
AppTools/ToolAlignObjects.py

@@ -5,8 +5,8 @@
 # MIT Licence                                              #
 # MIT Licence                                              #
 # ##########################################################
 # ##########################################################
 
 
-from PyQt5 import QtWidgets, QtGui, QtCore
-from AppTool import AppTool
+from PyQt5 import QtWidgets, QtCore
+from AppTools.AppTool import AppTool
 
 
 from AppGUI.GUIElements import FCComboBox, RadioSet
 from AppGUI.GUIElements import FCComboBox, RadioSet
 
 
@@ -29,7 +29,7 @@ log = logging.getLogger('base')
 
 
 class AlignObjects(AppTool):
 class AlignObjects(AppTool):
 
 
-    toolName = _("Align AppObjects")
+    toolName = _("Align Objects")
 
 
     def __init__(self, app):
     def __init__(self, app):
         AppTool.__init__(self, app)
         AppTool.__init__(self, app)

+ 1 - 1
AppTools/ToolCalculators.py

@@ -6,7 +6,7 @@
 # ##########################################################
 # ##########################################################
 
 
 from PyQt5 import QtWidgets
 from PyQt5 import QtWidgets
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, FCEntry
 from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, FCEntry
 import math
 import math
 
 

+ 3 - 3
AppTools/ToolCalibration.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore, QtGui
 from PyQt5 import QtWidgets, QtCore, QtGui
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCDoubleSpinner, EvalEntry, FCCheckBox, OptionalInputSection, FCEntry
 from AppGUI.GUIElements import FCDoubleSpinner, EvalEntry, FCCheckBox, OptionalInputSection, FCEntry
 from AppGUI.GUIElements import FCTable, FCComboBox, RadioSet
 from AppGUI.GUIElements import FCTable, FCComboBox, RadioSet
 from AppEditors.FlatCAMTextEditor import TextEditor
 from AppEditors.FlatCAMTextEditor import TextEditor
@@ -620,7 +620,7 @@ class ToolCalibration(AppTool):
         grid_lay.addWidget(QtWidgets.QLabel(''), 44, 0, 1, 3)
         grid_lay.addWidget(QtWidgets.QLabel(''), 44, 0, 1, 3)
 
 
         # STEP 5 #
         # STEP 5 #
-        step_5 = QtWidgets.QLabel('<b>%s</b>' % _("STEP 5: Calibrate FlatCAM AppObjects"))
+        step_5 = QtWidgets.QLabel('<b>%s</b>' % _("STEP 5: Calibrate FlatCAM Objects"))
         step_5.setToolTip(
         step_5.setToolTip(
             _("Adjust the FlatCAM objects\n"
             _("Adjust the FlatCAM objects\n"
               "with the factors determined and verified above.")
               "with the factors determined and verified above.")
@@ -656,7 +656,7 @@ class ToolCalibration(AppTool):
         grid_lay.addWidget(self.adj_object_label, 48, 0, 1, 3)
         grid_lay.addWidget(self.adj_object_label, 48, 0, 1, 3)
         grid_lay.addWidget(self.adj_object_combo, 49, 0, 1, 3)
         grid_lay.addWidget(self.adj_object_combo, 49, 0, 1, 3)
 
 
-        # ## Adjust AppObjects Button
+        # ## Adjust Objects Button
         self.cal_button = QtWidgets.QPushButton(_("Calibrate"))
         self.cal_button = QtWidgets.QPushButton(_("Calibrate"))
         self.cal_button.setToolTip(
         self.cal_button.setToolTip(
             _("Adjust (scale and/or skew) the objects\n"
             _("Adjust (scale and/or skew) the objects\n"

+ 2 - 2
AppTools/ToolCopperThieving.py

@@ -8,7 +8,7 @@
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
 from Common import GracefulException as grace
 from Common import GracefulException as grace
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCDoubleSpinner, RadioSet, FCEntry, FCComboBox
 from AppGUI.GUIElements import FCDoubleSpinner, RadioSet, FCEntry, FCComboBox
 
 
 import shapely.geometry.base as base
 import shapely.geometry.base as base
@@ -493,7 +493,7 @@ class ToolCopperThieving(AppTool):
                         """)
                         """)
         self.layout.addWidget(self.reset_button)
         self.layout.addWidget(self.reset_button)
 
 
-        # AppObjects involved in Copper thieving
+        # Objects involved in Copper thieving
         self.grb_object = None
         self.grb_object = None
         self.ref_obj = None
         self.ref_obj = None
         self.sel_rect = []
         self.sel_rect = []

+ 2 - 2
AppTools/ToolCorners.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, FCButton
 from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, FCButton
 
 
 from shapely.geometry import MultiPolygon, LineString
 from shapely.geometry import MultiPolygon, LineString
@@ -182,7 +182,7 @@ class ToolCorners(AppTool):
                         """)
                         """)
         self.layout.addWidget(self.reset_button)
         self.layout.addWidget(self.reset_button)
 
 
-        # AppObjects involved in Copper thieving
+        # Objects involved in Copper thieving
         self.grb_object = None
         self.grb_object = None
 
 
         # store the flattened geometry here:
         # store the flattened geometry here:

+ 1 - 1
AppTools/ToolCutOut.py

@@ -6,7 +6,7 @@
 # ##########################################################
 # ##########################################################
 
 
 from PyQt5 import QtWidgets, QtGui, QtCore
 from PyQt5 import QtWidgets, QtGui, QtCore
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCComboBox, OptionalInputSection, FCButton
 from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCComboBox, OptionalInputSection, FCButton
 
 
 from shapely.geometry import box, MultiPolygon, Polygon, LineString, LinearRing
 from shapely.geometry import box, MultiPolygon, Polygon, LineString, LinearRing

+ 4 - 4
AppTools/ToolDblSided.py

@@ -1,7 +1,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, EvalEntry, FCEntry, FCButton, FCComboBox
 from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, EvalEntry, FCEntry, FCButton, FCComboBox
 
 
 from numpy import Inf
 from numpy import Inf
@@ -48,9 +48,9 @@ class DblSidedTool(AppTool):
         grid_lay.setColumnStretch(1, 0)
         grid_lay.setColumnStretch(1, 0)
         self.layout.addLayout(grid_lay)
         self.layout.addLayout(grid_lay)
 
 
-        # AppObjects to be mirrored
+        # Objects to be mirrored
         self.m_objects_label = QtWidgets.QLabel("<b>%s:</b>" % _("Mirror Operation"))
         self.m_objects_label = QtWidgets.QLabel("<b>%s:</b>" % _("Mirror Operation"))
-        self.m_objects_label.setToolTip('%s.' % _("AppObjects to be mirrored"))
+        self.m_objects_label.setToolTip('%s.' % _("Objects to be mirrored"))
 
 
         grid_lay.addWidget(self.m_objects_label, 0, 0, 1, 2)
         grid_lay.addWidget(self.m_objects_label, 0, 0, 1, 2)
 
 
@@ -154,7 +154,7 @@ class DblSidedTool(AppTool):
         grid_lay1.setColumnStretch(1, 1)
         grid_lay1.setColumnStretch(1, 1)
         self.layout.addLayout(grid_lay1)
         self.layout.addLayout(grid_lay1)
 
 
-        # AppObjects to be mirrored
+        # Objects to be mirrored
         self.param_label = QtWidgets.QLabel("<b>%s:</b>" % _("Mirror Parameters"))
         self.param_label = QtWidgets.QLabel("<b>%s:</b>" % _("Mirror Parameters"))
         self.param_label.setToolTip('%s.' % _("Parameters for the mirror operation"))
         self.param_label.setToolTip('%s.' % _("Parameters for the mirror operation"))
 
 

+ 1 - 1
AppTools/ToolDistance.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.VisPyVisuals import *
 from AppGUI.VisPyVisuals import *
 from AppGUI.GUIElements import FCEntry, FCButton, FCCheckBox
 from AppGUI.GUIElements import FCEntry, FCButton, FCCheckBox
 
 

+ 2 - 3
AppTools/ToolDistanceMin.py

@@ -6,8 +6,7 @@
 # ##########################################################
 # ##########################################################
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
-from AppTool import AppTool
-from AppGUI.VisPyVisuals import *
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCEntry
 from AppGUI.GUIElements import FCEntry
 
 
 from shapely.ops import nearest_points
 from shapely.ops import nearest_points
@@ -291,7 +290,7 @@ class DistanceMin(AppTool):
             )
             )
         else:
         else:
             self.app.inform.emit('[WARNING_NOTCL] %s: %s' %
             self.app.inform.emit('[WARNING_NOTCL] %s: %s' %
-                                 (_("AppObjects intersects or touch at"),
+                                 (_("Objects intersects or touch at"),
                                   "(%.*f, %.*f)" % (self.decimals, self.h_point[0], self.decimals, self.h_point[1])))
                                   "(%.*f, %.*f)" % (self.decimals, self.h_point[0], self.decimals, self.h_point[1])))
 
 
     def on_jump_to_half_point(self):
     def on_jump_to_half_point(self):

+ 1 - 1
AppTools/ToolExtractDrills.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox
 from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox
 
 
 from shapely.geometry import Point
 from shapely.geometry import Point

+ 2 - 2
AppTools/ToolFiducials.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCDoubleSpinner, RadioSet, EvalEntry, FCTable, FCComboBox
 from AppGUI.GUIElements import FCDoubleSpinner, RadioSet, EvalEntry, FCTable, FCComboBox
 
 
 from shapely.geometry import Point, Polygon, MultiPolygon, LineString
 from shapely.geometry import Point, Polygon, MultiPolygon, LineString
@@ -327,7 +327,7 @@ class ToolFiducials(AppTool):
                         """)
                         """)
         self.layout.addWidget(self.reset_button)
         self.layout.addWidget(self.reset_button)
 
 
-        # AppObjects involved in Copper thieving
+        # Objects involved in Copper thieving
         self.grb_object = None
         self.grb_object = None
         self.sm_object = None
         self.sm_object = None
 
 

+ 2 - 2
AppTools/ToolFilm.py

@@ -5,9 +5,9 @@
 # MIT Licence                                              #
 # MIT Licence                                              #
 # ##########################################################
 # ##########################################################
 
 
-from PyQt5 import QtGui, QtCore, QtWidgets
+from PyQt5 import QtCore, QtWidgets
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, \
 from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, \
     OptionalHideInputSection, OptionalInputSection, FCComboBox, FCFileSaveDialog
     OptionalHideInputSection, OptionalInputSection, FCComboBox, FCFileSaveDialog
 
 

+ 1 - 1
AppTools/ToolImage.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtGui, QtWidgets
 from PyQt5 import QtGui, QtWidgets
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import RadioSet, FCComboBox, FCSpinner
 from AppGUI.GUIElements import RadioSet, FCComboBox, FCSpinner
 
 
 import gettext
 import gettext

+ 1 - 1
AppTools/ToolInvertGerber.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCButton, FCDoubleSpinner, RadioSet, FCComboBox
 from AppGUI.GUIElements import FCButton, FCDoubleSpinner, RadioSet, FCComboBox
 
 
 from shapely.geometry import box
 from shapely.geometry import box

+ 1 - 1
AppTools/ToolMove.py

@@ -6,7 +6,7 @@
 # ##########################################################
 # ##########################################################
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.VisPyVisuals import *
 from AppGUI.VisPyVisuals import *
 
 
 from copy import copy
 from copy import copy

+ 1 - 1
AppTools/ToolNCC.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore, QtGui
 from PyQt5 import QtWidgets, QtCore, QtGui
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCCheckBox, FCDoubleSpinner, RadioSet, FCTable, FCInputDialog, FCButton,\
 from AppGUI.GUIElements import FCCheckBox, FCDoubleSpinner, RadioSet, FCTable, FCInputDialog, FCButton,\
     FCComboBox, OptionalInputSection
     FCComboBox, OptionalInputSection
 from AppParsers.ParseGerber import Gerber
 from AppParsers.ParseGerber import Gerber

+ 1 - 1
AppTools/ToolOptimal.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore, QtGui
 from PyQt5 import QtWidgets, QtCore, QtGui
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import OptionalHideInputSection, FCTextArea, FCEntry, FCSpinner, FCCheckBox, FCComboBox
 from AppGUI.GUIElements import OptionalHideInputSection, FCTextArea, FCEntry, FCSpinner, FCCheckBox, FCComboBox
 from Common import GracefulException as grace
 from Common import GracefulException as grace
 
 

+ 1 - 1
AppTools/ToolPDF.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from Common import GracefulException as grace
 from Common import GracefulException as grace
 from AppParsers.ParsePDF import PdfParser
 from AppParsers.ParsePDF import PdfParser
 from shapely.geometry import Point, MultiPolygon
 from shapely.geometry import Point, MultiPolygon

+ 1 - 1
AppTools/ToolPaint.py

@@ -8,7 +8,7 @@
 from PyQt5 import QtWidgets, QtGui, QtCore
 from PyQt5 import QtWidgets, QtGui, QtCore
 from PyQt5.QtCore import Qt
 from PyQt5.QtCore import Qt
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from copy import deepcopy
 from copy import deepcopy
 # from ObjectCollection import *
 # from ObjectCollection import *
 from AppParsers.ParseGerber import Gerber
 from AppParsers.ParseGerber import Gerber

+ 1 - 1
AppTools/ToolPanelize.py

@@ -6,7 +6,7 @@
 # ##########################################################
 # ##########################################################
 
 
 from PyQt5 import QtWidgets, QtGui, QtCore
 from PyQt5 import QtWidgets, QtGui, QtCore
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 
 
 from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCCheckBox, OptionalInputSection, FCComboBox
 from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCCheckBox, OptionalInputSection, FCComboBox
 from Common import GracefulException as grace
 from Common import GracefulException as grace

+ 1 - 1
AppTools/ToolPcbWizard.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import RadioSet, FCSpinner, FCButton, FCTable
 from AppGUI.GUIElements import RadioSet, FCSpinner, FCButton, FCTable
 
 
 import re
 import re

+ 1 - 1
AppTools/ToolProperties.py

@@ -6,7 +6,7 @@
 # ##########################################################
 # ##########################################################
 
 
 from PyQt5 import QtGui, QtCore, QtWidgets
 from PyQt5 import QtGui, QtCore, QtWidgets
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCTree
 from AppGUI.GUIElements import FCTree
 
 
 from shapely.geometry import MultiPolygon, Polygon
 from shapely.geometry import MultiPolygon, Polygon

+ 1 - 1
AppTools/ToolPunchGerber.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtCore, QtWidgets
 from PyQt5 import QtCore, QtWidgets
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox
 from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox
 
 
 from copy import deepcopy
 from copy import deepcopy

+ 1 - 1
AppTools/ToolQRCode.py

@@ -8,7 +8,7 @@
 from PyQt5 import QtWidgets, QtCore, QtGui
 from PyQt5 import QtWidgets, QtCore, QtGui
 from PyQt5.QtCore import Qt
 from PyQt5.QtCore import Qt
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import RadioSet, FCTextArea, FCSpinner, FCEntry, FCCheckBox, FCComboBox, FCFileSaveDialog
 from AppGUI.GUIElements import RadioSet, FCTextArea, FCSpinner, FCEntry, FCCheckBox, FCComboBox, FCFileSaveDialog
 from AppParsers.ParseSVG import *
 from AppParsers.ParseSVG import *
 
 

+ 2 - 2
AppTools/ToolRulesCheck.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets
 from PyQt5 import QtWidgets
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, OptionalInputSection, FCComboBox
 from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, OptionalInputSection, FCComboBox
 from copy import deepcopy
 from copy import deepcopy
 
 
@@ -196,7 +196,7 @@ class RulesCheck(AppTool):
 
 
         self.grid_layout.addWidget(QtWidgets.QLabel(""), 8, 0, 1, 3)
         self.grid_layout.addWidget(QtWidgets.QLabel(""), 8, 0, 1, 3)
 
 
-        self.excellon_title_lbl = QtWidgets.QLabel('<b>%s</b>:' % _("Excellon AppObjects"))
+        self.excellon_title_lbl = QtWidgets.QLabel('<b>%s</b>:' % _("Excellon Objects"))
         self.excellon_title_lbl.setToolTip(
         self.excellon_title_lbl.setToolTip(
             _("Excellon objects for which to check rules.")
             _("Excellon objects for which to check rules.")
         )
         )

+ 2 - 2
AppTools/ToolSolderPaste.py

@@ -5,11 +5,11 @@
 # MIT Licence                                              #
 # MIT Licence                                              #
 # ##########################################################
 # ##########################################################
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from Common import LoudDict
 from Common import LoudDict
 from AppGUI.GUIElements import FCComboBox, FCEntry, FCTable, \
 from AppGUI.GUIElements import FCComboBox, FCEntry, FCTable, \
     FCInputDialog, FCDoubleSpinner, FCSpinner, FCFileSaveDialog
     FCInputDialog, FCDoubleSpinner, FCSpinner, FCFileSaveDialog
-from AppMain import log
+from App import log
 from camlib import distance
 from camlib import distance
 from AppEditors.FlatCAMTextEditor import TextEditor
 from AppEditors.FlatCAMTextEditor import TextEditor
 
 

+ 3 - 3
AppTools/ToolSub.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets, QtCore
 from PyQt5 import QtWidgets, QtCore
 
 
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCCheckBox, FCButton, FCComboBox
 from AppGUI.GUIElements import FCCheckBox, FCButton, FCComboBox
 
 
 from shapely.geometry import Polygon, MultiPolygon, MultiLineString, LineString
 from shapely.geometry import Polygon, MultiPolygon, MultiLineString, LineString
@@ -62,7 +62,7 @@ class ToolSub(AppTool):
         form_layout = QtWidgets.QFormLayout()
         form_layout = QtWidgets.QFormLayout()
         self.tools_box.addLayout(form_layout)
         self.tools_box.addLayout(form_layout)
 
 
-        self.gerber_title = QtWidgets.QLabel("<b>%s</b>" % _("Gerber AppObjects"))
+        self.gerber_title = QtWidgets.QLabel("<b>%s</b>" % _("Gerber Objects"))
         form_layout.addRow(self.gerber_title)
         form_layout.addRow(self.gerber_title)
 
 
         # Target Gerber Object
         # Target Gerber Object
@@ -117,7 +117,7 @@ class ToolSub(AppTool):
         form_geo_layout = QtWidgets.QFormLayout()
         form_geo_layout = QtWidgets.QFormLayout()
         self.tools_box.addLayout(form_geo_layout)
         self.tools_box.addLayout(form_geo_layout)
 
 
-        self.geo_title = QtWidgets.QLabel("<b>%s</b>" % _("Geometry AppObjects"))
+        self.geo_title = QtWidgets.QLabel("<b>%s</b>" % _("Geometry Objects"))
         form_geo_layout.addRow(self.geo_title)
         form_geo_layout.addRow(self.geo_title)
 
 
         # Target Geometry Object
         # Target Geometry Object

+ 1 - 1
AppTools/ToolTransform.py

@@ -6,7 +6,7 @@
 # ##########################################################
 # ##########################################################
 
 
 from PyQt5 import QtWidgets
 from PyQt5 import QtWidgets
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCButton, OptionalInputSection, FCEntry
 from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCButton, OptionalInputSection, FCEntry
 
 
 import gettext
 import gettext

+ 1 - 0
CHANGELOG.md

@@ -21,6 +21,7 @@ CHANGELOG for FlatCAM beta
 - more refactoring class names
 - more refactoring class names
 - moved some of the methods from the App class to the ObjectCollection class
 - moved some of the methods from the App class to the ObjectCollection class
 - moved all the new_object related methods in their own class AppObjects.AppObject
 - moved all the new_object related methods in their own class AppObjects.AppObject
+- more refactoring; solved some issues introduced by the refactoring
 
 
 17.05.2020
 17.05.2020
 
 

+ 1 - 1
Common.py

@@ -15,7 +15,7 @@ from PyQt5 import QtCore
 from shapely.geometry import Polygon, MultiPolygon
 from shapely.geometry import Polygon, MultiPolygon
 
 
 from AppGUI.VisPyVisuals import ShapeCollection
 from AppGUI.VisPyVisuals import ShapeCollection
-from AppTool import AppTool
+from AppTools.AppTool import AppTool
 
 
 import numpy as np
 import numpy as np
 
 

+ 1 - 1
FlatCAM.py

@@ -3,7 +3,7 @@ import os
 
 
 from PyQt5 import QtWidgets
 from PyQt5 import QtWidgets
 from PyQt5.QtCore import QSettings, Qt
 from PyQt5.QtCore import QSettings, Qt
-from AppMain import App
+from App import App
 from AppGUI import VisPyPatches
 from AppGUI import VisPyPatches
 
 
 from multiprocessing import freeze_support
 from multiprocessing import freeze_support

+ 1 - 1
camlib.py

@@ -6418,7 +6418,7 @@ def distance_euclidian(x1, y1, x2, y2):
 class FlatCAMRTree(object):
 class FlatCAMRTree(object):
     """
     """
     Indexes geometry (Any object with "cooords" property containing
     Indexes geometry (Any object with "cooords" property containing
-    a list of tuples with x, y values). AppObjects are indexed by
+    a list of tuples with x, y values). Objects are indexed by
     all their points by default. To index by arbitrary points,
     all their points by default. To index by arbitrary points,
     override self.points2obj.
     override self.points2obj.
     """
     """

+ 1 - 1
defaults.py

@@ -636,7 +636,7 @@ class FlatCAMDefaults:
         "tools_punch_rectangular": False,
         "tools_punch_rectangular": False,
         "tools_punch_others": False,
         "tools_punch_others": False,
 
 
-        # Align AppObjects Tool
+        # Align Objects Tool
         "tools_align_objects_align_type": 'sp',
         "tools_align_objects_align_type": 'sp',
 
 
         # Invert Gerber Tool
         # Invert Gerber Tool

+ 2 - 2
tclCommands/TclCommand.py

@@ -1,6 +1,6 @@
 import sys
 import sys
 import re
 import re
-import AppMain
+import App
 import abc
 import abc
 import collections
 import collections
 from PyQt5 import QtCore
 from PyQt5 import QtCore
@@ -53,7 +53,7 @@ class TclCommand(object):
         if self.app is None:
         if self.app is None:
             raise TypeError('Expected app to be FlatCAMApp instance.')
             raise TypeError('Expected app to be FlatCAMApp instance.')
 
 
-        if not isinstance(self.app, AppMain.App):
+        if not isinstance(self.app, App.App):
             raise TypeError('Expected FlatCAMApp, got %s.' % type(app))
             raise TypeError('Expected FlatCAMApp, got %s.' % type(app))
 
 
         self.log = self.app.log
         self.log = self.app.log