Merge pull request #21425 from knipknap/btl

CAM: Integration of the tool and shape editors from BTL (Better Tool Library)
This commit is contained in:
sliptonic
2025-06-02 10:37:38 -05:00
committed by GitHub
194 changed files with 22969 additions and 2943 deletions

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * *
@@ -20,6 +21,10 @@
# * USA *
# * *
# ***************************************************************************
import FreeCAD
FreeCAD.__unit_test__ += ["TestCAMGui"]
class PathCommandGroup:
@@ -58,6 +63,7 @@ class CAMWorkbench(Workbench):
# Add preferences pages - before loading PathGui to properly order pages of Path group
import Path.Dressup.Gui.Preferences as PathPreferencesPathDressup
import Path.Tool.assets.ui.preferences as AssetPreferences
import Path.Main.Gui.PreferencesJob as PathPreferencesPathJob
translate = FreeCAD.Qt.translate
@@ -74,8 +80,8 @@ class CAMWorkbench(Workbench):
from Path.Main.Gui import JobCmd as PathJobCmd
from Path.Main.Gui import SanityCmd as SanityCmd
from Path.Tool.Gui import BitCmd as PathToolBitCmd
from Path.Tool.Gui import BitLibraryCmd as PathToolBitLibraryCmd
from Path.Tool.toolbit.ui import cmd as PathToolBitCmd
from Path.Tool.library.ui import cmd as PathToolBitLibraryCmd
from PySide.QtCore import QT_TRANSLATE_NOOP
@@ -87,6 +93,10 @@ class CAMWorkbench(Workbench):
PathPreferencesPathJob.JobPreferencesPage,
QT_TRANSLATE_NOOP("QObject", "CAM"),
)
FreeCADGui.addPreferencePage(
AssetPreferences.AssetPreferencesPage,
QT_TRANSLATE_NOOP("QObject", "CAM"),
)
FreeCADGui.addPreferencePage(
PathPreferencesPathDressup.DressupPreferencesPage,
QT_TRANSLATE_NOOP("QObject", "CAM"),
@@ -335,7 +345,7 @@ class CAMWorkbench(Workbench):
for cmd in self.dressupcmds:
self.appendContextMenu("Dressup", [cmd])
menuAppended = True
if isinstance(obj.Proxy, Path.Tool.Bit.ToolBit):
if isinstance(obj.Proxy, Path.Tool.ToolBit):
self.appendContextMenu("", ["CAM_ToolBitSave", "CAM_ToolBitSaveAs"])
menuAppended = True
if menuAppended: