Renamed Path.Tools module to Path.Tool

This commit is contained in:
Markus Lampert
2022-10-11 21:43:08 -07:00
parent 29a7dc144e
commit 9925c71d36
25 changed files with 54 additions and 55 deletions
+12 -12
View File
@@ -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(
+3 -3
View File
@@ -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:
+1 -2
View File
@@ -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
@@ -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"
@@ -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
+2 -2
View File
@@ -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):
@@ -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")
@@ -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
@@ -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()
@@ -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"]:
@@ -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()
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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())
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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
+1 -1
View File
@@ -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