added CAM to precommit
This commit is contained in:
committed by
Adrian Insaurralde Avalos
parent
853e3ee672
commit
90e24232a0
@@ -10,6 +10,7 @@ files: |
|
||||
tests/src|
|
||||
src/Mod/AddonManager|
|
||||
src/Mod/Assembly|
|
||||
src/Mod/CAM|
|
||||
src/Mod/Cloud|
|
||||
src/Mod/Drawing|
|
||||
src/Mod/Fem|
|
||||
|
||||
@@ -49,9 +49,7 @@ class CAMWorkbench(Workbench):
|
||||
"CAM workbench"
|
||||
|
||||
def __init__(self):
|
||||
self.__class__.Icon = (
|
||||
FreeCAD.getResourceDir() + "Mod/CAM/Resources/icons/CAMWorkbench.svg"
|
||||
)
|
||||
self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/CAM/Resources/icons/CAMWorkbench.svg"
|
||||
self.__class__.MenuText = "CAM"
|
||||
self.__class__.ToolTip = "CAM workbench"
|
||||
|
||||
@@ -85,9 +83,13 @@ class CAMWorkbench(Workbench):
|
||||
import subprocess
|
||||
from packaging.version import Version, parse
|
||||
|
||||
FreeCADGui.addPreferencePage(PathPreferencesPathJob.JobPreferencesPage, QT_TRANSLATE_NOOP("QObject", "CAM"))
|
||||
FreeCADGui.addPreferencePage(
|
||||
PathPreferencesPathDressup.DressupPreferencesPage, QT_TRANSLATE_NOOP("QObject", "CAM")
|
||||
PathPreferencesPathJob.JobPreferencesPage,
|
||||
QT_TRANSLATE_NOOP("QObject", "CAM"),
|
||||
)
|
||||
FreeCADGui.addPreferencePage(
|
||||
PathPreferencesPathDressup.DressupPreferencesPage,
|
||||
QT_TRANSLATE_NOOP("QObject", "CAM"),
|
||||
)
|
||||
|
||||
Path.GuiInit.Startup()
|
||||
@@ -190,13 +192,9 @@ class CAMWorkbench(Workbench):
|
||||
QT_TRANSLATE_NOOP("Workbench", "New Operations"),
|
||||
twodopcmdlist + engravecmdgroup + threedcmdgroup,
|
||||
)
|
||||
self.appendToolbar(
|
||||
QT_TRANSLATE_NOOP("Workbench", "Path Modification"), modcmdlist
|
||||
)
|
||||
self.appendToolbar(QT_TRANSLATE_NOOP("Workbench", "Path Modification"), modcmdlist)
|
||||
if extracmdlist:
|
||||
self.appendToolbar(
|
||||
QT_TRANSLATE_NOOP("Workbench", "Helpful Tools"), extracmdlist
|
||||
)
|
||||
self.appendToolbar(QT_TRANSLATE_NOOP("Workbench", "Helpful Tools"), extracmdlist)
|
||||
|
||||
self.appendMenu(
|
||||
[QT_TRANSLATE_NOOP("Workbench", "&CAM")],
|
||||
@@ -263,7 +261,8 @@ class CAMWorkbench(Workbench):
|
||||
from Path.Preferences import preferences
|
||||
|
||||
FreeCADGui.addPreferencePage(
|
||||
PathPreferencesAdvanced.AdvancedPreferencesPage, QT_TRANSLATE_NOOP("QObject", "CAM")
|
||||
PathPreferencesAdvanced.AdvancedPreferencesPage,
|
||||
QT_TRANSLATE_NOOP("QObject", "CAM"),
|
||||
)
|
||||
Log("Loading CAM workbench... done\n")
|
||||
|
||||
@@ -292,14 +291,10 @@ class CAMWorkbench(Workbench):
|
||||
if "Remote" in selectedName:
|
||||
self.appendContextMenu("", ["Refresh_Path"])
|
||||
if "Job" in selectedName:
|
||||
self.appendContextMenu(
|
||||
"", ["CAM_ExportTemplate"] + self.toolbitctxmenu
|
||||
)
|
||||
self.appendContextMenu("", ["CAM_ExportTemplate"] + self.toolbitctxmenu)
|
||||
menuAppended = True
|
||||
if isinstance(obj.Proxy, Path.Op.Base.ObjectOp):
|
||||
self.appendContextMenu(
|
||||
"", ["CAM_OperationCopy", "CAM_OpActiveToggle"]
|
||||
)
|
||||
self.appendContextMenu("", ["CAM_OperationCopy", "CAM_OpActiveToggle"])
|
||||
menuAppended = True
|
||||
if obj.isDerivedFrom("Path::Feature"):
|
||||
if (
|
||||
@@ -322,4 +317,7 @@ class CAMWorkbench(Workbench):
|
||||
|
||||
Gui.addWorkbench(CAMWorkbench())
|
||||
|
||||
FreeCAD.addImportType("GCode (*.nc *.NC *.gc *.GC *.ncc *.NCC *.ngc *.NGC *.cnc *.CNC *.tap *.TAP *.gcode *.GCODE)", "PathGui")
|
||||
FreeCAD.addImportType(
|
||||
"GCode (*.nc *.NC *.gc *.GC *.ncc *.NCC *.ngc *.NGC *.cnc *.CNC *.tap *.TAP *.gcode *.GCODE)",
|
||||
"PathGui",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user