diff --git a/src/Mod/Path/CMakeLists.txt b/src/Mod/Path/CMakeLists.txt index 6eed03090e..6ac2ad6507 100644 --- a/src/Mod/Path/CMakeLists.txt +++ b/src/Mod/Path/CMakeLists.txt @@ -52,19 +52,19 @@ SET(PathPythonDressupGui_SRCS ) SET(PathPythonTools_SRCS - Path/Tools/__init__.py - Path/Tools/Bit.py - Path/Tools/Controller.py + Path/Tool/__init__.py + Path/Tool/Bit.py + Path/Tool/Controller.py ) SET(PathPythonToolsGui_SRCS - Path/Tools/Gui/__init__.py - Path/Tools/Gui/Bit.py - Path/Tools/Gui/BitCmd.py - Path/Tools/Gui/BitEdit.py - Path/Tools/Gui/BitLibraryCmd.py - Path/Tools/Gui/BitLibrary.py - Path/Tools/Gui/Controller.py + Path/Tool/Gui/__init__.py + Path/Tool/Gui/Bit.py + Path/Tool/Gui/BitCmd.py + Path/Tool/Gui/BitEdit.py + Path/Tool/Gui/BitLibraryCmd.py + Path/Tool/Gui/BitLibrary.py + Path/Tool/Gui/Controller.py ) SET(PathPythonPost_SRCS @@ -420,14 +420,14 @@ INSTALL( FILES ${PathPythonTools_SRCS} DESTINATION - Mod/Path/Path/Tools + Mod/Path/Path/Tool ) INSTALL( FILES ${PathPythonToolsGui_SRCS} DESTINATION - Mod/Path/Path/Tools/Gui + Mod/Path/Path/Tool/Gui ) INSTALL( diff --git a/src/Mod/Path/InitGui.py b/src/Mod/Path/InitGui.py index 87f8ef2536..4d9fb22440 100644 --- a/src/Mod/Path/InitGui.py +++ b/src/Mod/Path/InitGui.py @@ -83,8 +83,8 @@ class PathWorkbench(Workbench): from PathScripts import PathGuiInit from PathScripts import PathJobCmd - from Path.Tools.Gui import BitCmd as PathToolBitCmd - from Path.Tools.Gui import BitLibraryCmd as PathToolBitLibraryCmd + from Path.Tool.Gui import BitCmd as PathToolBitCmd + from Path.Tool.Gui import BitLibraryCmd as PathToolBitLibraryCmd from PySide.QtCore import QT_TRANSLATE_NOOP @@ -338,7 +338,7 @@ class PathWorkbench(Workbench): for cmd in self.dressupcmds: self.appendContextMenu("", [cmd]) menuAppended = True - if isinstance(obj.Proxy, Path.Tools.Bit.ToolBit): + if isinstance(obj.Proxy, Path.Tool.Bit.ToolBit): self.appendContextMenu("", ["Path_ToolBitSave", "Path_ToolBitSaveAs"]) menuAppended = True if menuAppended: diff --git a/src/Mod/Path/Path/Post/UtilsExport.py b/src/Mod/Path/Path/Post/UtilsExport.py index 64abafbf2c..aa525aac18 100644 --- a/src/Mod/Path/Path/Post/UtilsExport.py +++ b/src/Mod/Path/Path/Post/UtilsExport.py @@ -33,8 +33,7 @@ import os import FreeCAD import Path.Post.Utils as PostUtils import Path.Post.UtilsParse as PostUtilsParse - -import Path.Tools.Controller as PathToolController +import Path.Tool.Controller as PathToolController # to distinguish python built-in open function from the one declared below diff --git a/src/Mod/Path/Path/Post/scripts/centroid_post.py b/src/Mod/Path/Path/Post/scripts/centroid_post.py index 6608dcf168..b61899da5f 100644 --- a/src/Mod/Path/Path/Post/scripts/centroid_post.py +++ b/src/Mod/Path/Path/Post/scripts/centroid_post.py @@ -35,7 +35,7 @@ TOOLTIP = """ This is a postprocessor file for the Path workbench. It is used to take a pseudo-gcode fragment outputted by a Path object, and output real GCode suitable for a centroid 3 axis mill. This postprocessor, once placed -in the appropriate Path/Tools folder, can be used directly from inside +in the appropriate Path/Tool folder, can be used directly from inside FreeCAD, via the GUI importer or via python scripts with: import centroid_post @@ -188,7 +188,7 @@ def export(objectslist, filename, argstring): if OUTPUT_COMMENTS: for item in objectslist: if hasattr(item, "Proxy") and isinstance( - item.Proxy, Path.Tools.Controller.ToolController + item.Proxy, Path.Tool.Controller.ToolController ): gcode += ";T{}={}\n".format(item.ToolNumber, item.Name) gcode += linenumber() + ";begin preamble\n" diff --git a/src/Mod/Path/Path/Post/scripts/heidenhain_post.py b/src/Mod/Path/Path/Post/scripts/heidenhain_post.py index e42bda59f1..418db4ea64 100644 --- a/src/Mod/Path/Path/Post/scripts/heidenhain_post.py +++ b/src/Mod/Path/Path/Post/scripts/heidenhain_post.py @@ -187,7 +187,7 @@ TOOLTIP = """ This is a postprocessor file for the Path workbench. It is used to take a pseudo-gcode fragment outputted by a Path object, and output real GCode suitable for a heidenhain 3 axis mill. This postprocessor, once placed -in the appropriate Path/Tools folder, can be used directly from inside +in the appropriate Path/Tool folder, can be used directly from inside FreeCAD, via the GUI importer or via python scripts with: import heidenhain_post @@ -344,7 +344,7 @@ def export(objectslist, filename, argstring): LBLIZE_STAUS = False # useful to get idea of object kind - if isinstance(obj.Proxy, Path.Tools.Controller.ToolController): + if isinstance(obj.Proxy, Path.Tool.Controller.ToolController): Object_Kind = "TOOL" # like we go to change tool position MACHINE_LAST_POSITION["X"] = 99999 diff --git a/src/Mod/Path/Path/Post/scripts/uccnc_post.py b/src/Mod/Path/Path/Post/scripts/uccnc_post.py index 1185a710f3..3a70425294 100644 --- a/src/Mod/Path/Path/Post/scripts/uccnc_post.py +++ b/src/Mod/Path/Path/Post/scripts/uccnc_post.py @@ -46,7 +46,7 @@ TOOLTIP = """ Post processor for UC-CNC. This is a postprocessor file for the Path workbench. It is used to take a pseudo-gcode fragment outputted by a Path object, and output real GCode. This postprocessor, once placed in the appropriate -Path/Tools folder, can be used directly from inside FreeCAD, +Path/Tool folder, can be used directly from inside FreeCAD, via the GUI importer or via python scripts with: import UCCNC_post @@ -453,7 +453,7 @@ def export(objectslist, filename, argstring): if OUTPUT_COMMENTS: gcode += append("(preamble: begin)\n") # for obj in objectslist: - # if isinstance(obj.Proxy, Path.Tools.Controller.ToolController): + # if isinstance(obj.Proxy, Path.Tool.Controller.ToolController): # gcode += append("(T{}={})\n".format(obj.ToolNumber, item.Name)) # error: global name 'PathScripts' is not defined for line in PREAMBLE.splitlines(False): diff --git a/src/Mod/Path/Path/Tools/Bit.py b/src/Mod/Path/Path/Tool/Bit.py similarity index 100% rename from src/Mod/Path/Path/Tools/Bit.py rename to src/Mod/Path/Path/Tool/Bit.py diff --git a/src/Mod/Path/Path/Tools/Controller.py b/src/Mod/Path/Path/Tool/Controller.py similarity index 98% rename from src/Mod/Path/Path/Tools/Controller.py rename to src/Mod/Path/Path/Tool/Controller.py index 90fc86898f..27ea829d06 100644 --- a/src/Mod/Path/Path/Tools/Controller.py +++ b/src/Mod/Path/Path/Tool/Controller.py @@ -25,7 +25,7 @@ from PySide.QtCore import QT_TRANSLATE_NOOP import FreeCAD import Path -import Path.Tools.Bit as PathToolBit +import Path.Tool.Bit as PathToolBit import PathScripts.PathPreferences as PathPreferences from Generators import toolchange_generator as toolchange_generator from Generators.toolchange_generator import SpindleDirection @@ -341,6 +341,6 @@ def FromTemplate(template, assignViewProvider=True): if FreeCAD.GuiUp: # need ViewProvider class in this file to support loading of old files - from Path.Tools.Gui.Controller import ViewProvider + from Path.Tool.Gui.Controller import ViewProvider -FreeCAD.Console.PrintLog("Loading Path.Tools.Gui.Controller... done\n") +FreeCAD.Console.PrintLog("Loading Path.Tool.Gui.Controller... done\n") diff --git a/src/Mod/Path/Path/Tools/Gui/Bit.py b/src/Mod/Path/Path/Tool/Gui/Bit.py similarity index 99% rename from src/Mod/Path/Path/Tools/Gui/Bit.py rename to src/Mod/Path/Path/Tool/Gui/Bit.py index 3bb33f7dbb..dd19c85ae3 100644 --- a/src/Mod/Path/Path/Tools/Gui/Bit.py +++ b/src/Mod/Path/Path/Tool/Gui/Bit.py @@ -25,8 +25,8 @@ from PySide.QtCore import QT_TRANSLATE_NOOP import FreeCAD import FreeCADGui import Path -import Path.Tools.Bit as PathToolBit -import Path.Tools.Gui.BitEdit as PathToolBitEdit +import Path.Tool.Bit as PathToolBit +import Path.Tool.Gui.BitEdit as PathToolBitEdit import PathScripts.PathIconViewProvider as PathIconViewProvider import PathScripts.PathPreferences as PathPreferences import os diff --git a/src/Mod/Path/Path/Tools/Gui/BitCmd.py b/src/Mod/Path/Path/Tool/Gui/BitCmd.py similarity index 96% rename from src/Mod/Path/Path/Tools/Gui/BitCmd.py rename to src/Mod/Path/Path/Tool/Gui/BitCmd.py index 9b6934a268..61ceda5093 100644 --- a/src/Mod/Path/Path/Tools/Gui/BitCmd.py +++ b/src/Mod/Path/Path/Tool/Gui/BitCmd.py @@ -23,7 +23,7 @@ import FreeCAD import FreeCADGui import Path -import Path.Tools +import Path.Tool import os from PySide import QtCore from PySide.QtCore import QT_TRANSLATE_NOOP @@ -56,7 +56,7 @@ class CommandToolBitCreate: return FreeCAD.ActiveDocument is not None def Activated(self): - obj = Path.Tools.Bit.Factory.Create() + obj = Path.Tool.Bit.Factory.Create() obj.ViewObject.Proxy.setCreate(obj.ViewObject) @@ -84,7 +84,7 @@ class CommandToolBitSave: def selectedTool(self): sel = FreeCADGui.Selection.getSelectionEx() if 1 == len(sel) and isinstance( - sel[0].Object.Proxy, Path.Tools.Bit.ToolBit + sel[0].Object.Proxy, Path.Tool.Bit.ToolBit ): return sel[0].Object return None @@ -146,7 +146,7 @@ class CommandToolBitLoad: def selectedTool(self): sel = FreeCADGui.Selection.getSelectionEx() if 1 == len(sel) and isinstance( - sel[0].Object.Proxy, Path.Tools.Bit.ToolBit + sel[0].Object.Proxy, Path.Tool.Bit.ToolBit ): return sel[0].Object return None @@ -155,7 +155,7 @@ class CommandToolBitLoad: return FreeCAD.ActiveDocument is not None def Activated(self): - if Path.Tools.Bit.Gui.LoadTools(): + if Path.Tool.Bit.Gui.LoadTools(): FreeCAD.ActiveDocument.recompute() diff --git a/src/Mod/Path/Path/Tools/Gui/BitEdit.py b/src/Mod/Path/Path/Tool/Gui/BitEdit.py similarity index 100% rename from src/Mod/Path/Path/Tools/Gui/BitEdit.py rename to src/Mod/Path/Path/Tool/Gui/BitEdit.py diff --git a/src/Mod/Path/Path/Tools/Gui/BitLibrary.py b/src/Mod/Path/Path/Tool/Gui/BitLibrary.py similarity index 99% rename from src/Mod/Path/Path/Tools/Gui/BitLibrary.py rename to src/Mod/Path/Path/Tool/Gui/BitLibrary.py index 1fc3a9eff6..2c0a4f1442 100644 --- a/src/Mod/Path/Path/Tools/Gui/BitLibrary.py +++ b/src/Mod/Path/Path/Tool/Gui/BitLibrary.py @@ -25,10 +25,10 @@ import FreeCAD import FreeCADGui import Path -import Path.Tools.Bit as PathToolBit -import Path.Tools.Gui.Bit as PathToolBitGui -import Path.Tools.Gui.BitEdit as PathToolBitEdit -import Path.Tools.Gui.Controller as PathToolControllerGui +import Path.Tool.Bit as PathToolBit +import Path.Tool.Gui.Bit as PathToolBitGui +import Path.Tool.Gui.BitEdit as PathToolBitEdit +import Path.Tool.Gui.Controller as PathToolControllerGui import PathGui as PGui # ensure Path/Gui/Resources are loaded import PathScripts.PathPreferences as PathPreferences import PathScripts.PathUtilsGui as PathUtilsGui @@ -97,7 +97,7 @@ def checkWorkingDir(): PathPreferences.setLastPathToolBit("{}{}Bit".format(workingdir, os.path.sep)) Path.Log.debug("setting workingdir to: {}".format(workingdir)) - # Copy only files of default Path\Tools folder to working directory (targeting the README.md help file) + # Copy only files of default Path/Tool folder to working directory (targeting the README.md help file) src_toolfiles = os.listdir(defaultdir) for file_name in src_toolfiles: if file_name in ["README.md"]: diff --git a/src/Mod/Path/Path/Tools/Gui/BitLibraryCmd.py b/src/Mod/Path/Path/Tool/Gui/BitLibraryCmd.py similarity index 96% rename from src/Mod/Path/Path/Tools/Gui/BitLibraryCmd.py rename to src/Mod/Path/Path/Tool/Gui/BitLibraryCmd.py index a27f388432..d141894220 100644 --- a/src/Mod/Path/Path/Tools/Gui/BitLibraryCmd.py +++ b/src/Mod/Path/Path/Tool/Gui/BitLibraryCmd.py @@ -55,7 +55,7 @@ class CommandToolBitSelectorOpen: return FreeCAD.ActiveDocument is not None def Activated(self): - import Path.Tools.Gui.BitLibrary as PathToolBitLibraryGui + import Path.Tool.Gui.BitLibrary as PathToolBitLibraryGui dock = PathToolBitLibraryGui.ToolBitSelector() dock.open() @@ -85,7 +85,7 @@ class CommandToolBitLibraryOpen: return FreeCAD.ActiveDocument is not None def Activated(self): - import Path.Tools.Gui.BitLibrary as PathToolBitLibraryGui + import Path.Tool.Gui.BitLibrary as PathToolBitLibraryGui library = PathToolBitLibraryGui.ToolBitLibrary() diff --git a/src/Mod/Path/Path/Tools/Gui/Controller.py b/src/Mod/Path/Path/Tool/Gui/Controller.py similarity index 99% rename from src/Mod/Path/Path/Tools/Gui/Controller.py rename to src/Mod/Path/Path/Tool/Gui/Controller.py index 0f023a1dfe..7f2e9f7bcc 100644 --- a/src/Mod/Path/Path/Tools/Gui/Controller.py +++ b/src/Mod/Path/Path/Tool/Gui/Controller.py @@ -25,8 +25,8 @@ from PySide.QtCore import QT_TRANSLATE_NOOP import FreeCAD import FreeCADGui import Path -import Path.Tools.Controller as PathToolController -import Path.Tools.Gui.Bit as PathToolBitGui +import Path.Tool.Controller as PathToolController +import Path.Tool.Gui.Bit as PathToolBitGui import PathGui as PGui # ensure Path/Gui/Resources are loaded import PathScripts.PathGui as PathGui import PathScripts.PathUtil as PathUtil diff --git a/src/Mod/Path/Path/Tools/Gui/__init__.py b/src/Mod/Path/Path/Tool/Gui/__init__.py similarity index 100% rename from src/Mod/Path/Path/Tools/Gui/__init__.py rename to src/Mod/Path/Path/Tool/Gui/__init__.py diff --git a/src/Mod/Path/Path/Tools/__init__.py b/src/Mod/Path/Path/Tool/__init__.py similarity index 100% rename from src/Mod/Path/Path/Tools/__init__.py rename to src/Mod/Path/Path/Tool/__init__.py diff --git a/src/Mod/Path/PathScripts/PathGuiInit.py b/src/Mod/Path/PathScripts/PathGuiInit.py index 169754331e..cf2711f110 100644 --- a/src/Mod/Path/PathScripts/PathGuiInit.py +++ b/src/Mod/Path/PathScripts/PathGuiInit.py @@ -61,8 +61,8 @@ def Startup(): from Path.Op.Gui import ThreadMilling from Path.Op.Gui import Vcarve from Path.Post import Command - from Path.Tools import Controller - from Path.Tools.Gui import Controller + from Path.Tool import Controller + from Path.Tool.Gui import Controller from PathScripts import PathArray from PathScripts import PathComment from PathScripts import PathFixture diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py index 5ef9c94ebe..3060247e23 100644 --- a/src/Mod/Path/PathScripts/PathJob.py +++ b/src/Mod/Path/PathScripts/PathJob.py @@ -25,7 +25,7 @@ from PySide.QtCore import QT_TRANSLATE_NOOP import FreeCAD import Path from Path.Post.Processor import PostProcessor -import Path.Tools.Controller as PathToolController +import Path.Tool.Controller as PathToolController import PathScripts.PathPreferences as PathPreferences import PathScripts.PathSetupSheet as PathSetupSheet import PathScripts.PathStock as PathStock diff --git a/src/Mod/Path/PathScripts/PathJobGui.py b/src/Mod/Path/PathScripts/PathJobGui.py index d9d74fdbda..e172646a7d 100644 --- a/src/Mod/Path/PathScripts/PathJobGui.py +++ b/src/Mod/Path/PathScripts/PathJobGui.py @@ -28,8 +28,8 @@ from pivy import coin import FreeCAD import FreeCADGui import Path -import Path.Tools.Gui.Bit as PathToolBitGui -import Path.Tools.Gui.Controller as PathToolControllerGui +import Path.Tool.Gui.Bit as PathToolBitGui +import Path.Tool.Gui.Controller as PathToolControllerGui import PathScripts.PathGeom as PathGeom import PathScripts.PathGuiInit as PathGuiInit import PathScripts.PathJob as PathJob diff --git a/src/Mod/Path/PathScripts/PathUtilsGui.py b/src/Mod/Path/PathScripts/PathUtilsGui.py index 5fedf7caee..dd758d1972 100644 --- a/src/Mod/Path/PathScripts/PathUtilsGui.py +++ b/src/Mod/Path/PathScripts/PathUtilsGui.py @@ -23,7 +23,7 @@ import FreeCADGui import FreeCAD import Path -import Path.Tools.Controller as PathToolController +import Path.Tool.Controller as PathToolController import PathGui as PGui # ensure Path/Gui/Resources are loaded import PathScripts.PathJobCmd as PathJobCmd import PathScripts.PathUtils as PathUtils diff --git a/src/Mod/Path/PathTests/TestPathDeburr.py b/src/Mod/Path/PathTests/TestPathDeburr.py index 78dd2f776d..716f1feb53 100644 --- a/src/Mod/Path/PathTests/TestPathDeburr.py +++ b/src/Mod/Path/PathTests/TestPathDeburr.py @@ -22,7 +22,7 @@ import Path import Path.Op.Deburr as PathDeburr -import Path.Tools.Bit as PathToolBit +import Path.Tool.Bit as PathToolBit import PathTests.PathTestUtils as PathTestUtils Path.Log.setLevel(Path.Log.Level.INFO, Path.Log.thisModule()) diff --git a/src/Mod/Path/PathTests/TestPathHelpers.py b/src/Mod/Path/PathTests/TestPathHelpers.py index 3e2b62221d..50835bb47d 100644 --- a/src/Mod/Path/PathTests/TestPathHelpers.py +++ b/src/Mod/Path/PathTests/TestPathHelpers.py @@ -23,8 +23,8 @@ import FreeCAD import Part import Path -import Path.Tools.Bit as PathToolBit -import Path.Tools.Controller as PathToolController +import Path.Tool.Bit as PathToolBit +import Path.Tool.Controller as PathToolController import PathFeedRate import PathMachineState import PathScripts.PathGeom as PathGeom diff --git a/src/Mod/Path/PathTests/TestPathToolBit.py b/src/Mod/Path/PathTests/TestPathToolBit.py index c58d6b04ea..1b477d3f7e 100644 --- a/src/Mod/Path/PathTests/TestPathToolBit.py +++ b/src/Mod/Path/PathTests/TestPathToolBit.py @@ -20,7 +20,7 @@ # * * # *************************************************************************** -import Path.Tools.Bit as PathToolBit +import Path.Tool.Bit as PathToolBit import PathTests.PathTestUtils as PathTestUtils import glob import os diff --git a/src/Mod/Path/PathTests/TestPathToolController.py b/src/Mod/Path/PathTests/TestPathToolController.py index a7c4a90c12..de008da8dd 100644 --- a/src/Mod/Path/PathTests/TestPathToolController.py +++ b/src/Mod/Path/PathTests/TestPathToolController.py @@ -22,8 +22,8 @@ import FreeCAD import Path -import Path.Tools.Bit as PathToolBit -import Path.Tools.Controller as PathToolController +import Path.Tool.Bit as PathToolBit +import Path.Tool.Controller as PathToolController import PathScripts.PathPreferences as PathPreferences from PathTests.PathTestUtils import PathTestBase diff --git a/src/Mod/Path/PathTests/TestPathVcarve.py b/src/Mod/Path/PathTests/TestPathVcarve.py index 09d112590a..0744fd32b8 100644 --- a/src/Mod/Path/PathTests/TestPathVcarve.py +++ b/src/Mod/Path/PathTests/TestPathVcarve.py @@ -22,7 +22,7 @@ import FreeCAD import Path.Op.Vcarve as PathVcarve -import Path.Tools.Bit as PathToolBit +import Path.Tool.Bit as PathToolBit import PathScripts.PathGeom as PathGeom import math