forked from youen/assembly_handbook
empty workbench
This commit is contained in:
parent
695005a66a
commit
2ce4102f88
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# ---> Python
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
49
InitGui.py
Normal file
49
InitGui.py
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import os
|
||||||
|
import FreeCADGui as Gui
|
||||||
|
import FreeCAD as App
|
||||||
|
|
||||||
|
import ahb_locator
|
||||||
|
|
||||||
|
global ahb_icon
|
||||||
|
ahb_icon = os.path.join(os.path.dirname(ahb_locator.__file__), "resources/assembly-handbook.svg")
|
||||||
|
|
||||||
|
class AssemblyHandbookWorkbench(Gui.Workbench):
|
||||||
|
"""
|
||||||
|
class which gets initiated at startup of the gui
|
||||||
|
"""
|
||||||
|
|
||||||
|
MenuText = "Assembly handbook"
|
||||||
|
ToolTip = "A workbench for automating creation of an assembly handbook"
|
||||||
|
Icon = ahb_icon
|
||||||
|
toolbox = []
|
||||||
|
|
||||||
|
def GetClassName(self):
|
||||||
|
return "Gui::PythonWorkbench"
|
||||||
|
|
||||||
|
def Initialize(self):
|
||||||
|
"""
|
||||||
|
This function is called at the first activation of the workbench.
|
||||||
|
here is the place to import all the commands
|
||||||
|
"""
|
||||||
|
#from freecad.assembly_handbook import my_numpy_function
|
||||||
|
#App.Console.PrintMessage("switching to workbench_starterkit\n")
|
||||||
|
#App.Console.PrintMessage("run a numpy function: sqrt(100) = {}\n".format(my_numpy_function.my_foo(100)))
|
||||||
|
|
||||||
|
self.appendToolbar("Tools", self.toolbox)
|
||||||
|
self.appendMenu("Tools", self.toolbox)
|
||||||
|
|
||||||
|
def Activated(self):
|
||||||
|
"""
|
||||||
|
code which should be computed when a user switch to this workbench
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
def Deactivated(self):
|
||||||
|
"""
|
||||||
|
code which should be computed when this workbench is deactivated
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
Gui.addWorkbench(AssemblyHandbookWorkbench())
|
||||||
|
|
||||||
|
print("Assembly Handbook workbench GUI loaded")
|
0
ahb_locator.py
Normal file
0
ahb_locator.py
Normal file
1018
resources/assembly-handbook.svg
Normal file
1018
resources/assembly-handbook.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 50 KiB |
Loading…
Reference in New Issue
Block a user