-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathInitGui.py
More file actions
83 lines (67 loc) · 3.87 KB
/
Copy pathInitGui.py
File metadata and controls
83 lines (67 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# ***************************************************************************
# * Copyright (c) 2009 Juergen Riegel <juergen.riegel@web.de> *
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * Copyright (c) 2020 FrontISTR Commons <https://www.frontistr.com/> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU Lesser General Public License (LGPL) *
# * as published by the Free Software Foundation; either version 2 of *
# * the License, or (at your option) any later version. *
# * for detail see the LICENCE text file. *
# * *
# * This program is distributed in the hope that it will be useful, *
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
# * GNU Library General Public License for more details. *
# * *
# * You should have received a copy of the GNU Library General Public *
# * License along with this program; if not, write to the Free Software *
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
# * USA *
# * *
# ***************************************************************************
__title__="FreeCAD FrontISTR Workbench GUI"
__author__ = "FrontISTR Commons"
__url__ = "https://www.frontistr.com/"
class FrontISTR(Workbench):
"FrontISTR workbench object"
def __init__(self):
self.__class__.Icon = FreeCAD.getUserAppDataDir()+ "Mod/FEM_FrontISTR/Resources/FrontISTR.svg"
self.__class__.MenuText = "FrontISTR"
self.__class__.ToolTip = "Parallel FEM solver workbench"
def Initialize(self):
# load the module
import Fem
import FemGui
import femcommands.commands
import FISTR_solver
def QT_TRANSLATE_NOOP(scope, text): return text
#FreeCADGui.addCommand("FEM_SolverFrontISTR",_SolverFrontISTR())
self.fstrtools = [
"FISTR_solver", "FISTR_ConstraintTemperature",
"FISTR_MaterialHyperelastic",
"FISTR_MaterialViscoelastic", "FISTR_MaterialCreep"
]
self.appendToolbar(QT_TRANSLATE_NOOP("Workbench","FrontISTR tools"),self.fstrtools)
#self.appendToolbar(QT_TRANSLATE_NOOP("Workbench","E.M. FastHenry tools"),self.emfhtools)
#self.appendMenu(QT_TRANSLATE_NOOP("EM","&EM"),self.emfhtools + self.emvhtools + self.emtools)
#FreeCADGui.addIconPath(":/icons")
#FreeCADGui.addLanguagePath(":/translations")
#FreeCADGui.addPreferencePage(":/ui/preferences-EM.ui","EM")
#FreeCADGui.addPreferencePage(":/ui/preferences-aEMdefaults.ui","EM")
Log ('Loading FrontISTR module... done\n')
def Activated(self):
Log("FrontISTR workbench activated\n")
def Deactivated(self):
Log("FrontISTR workbench deactivated\n")
# def ContextMenu(self, recipient):
# self.appendContextMenu("Utilities",self.EMcontexttools)
# needed if this is a pure Python workbench
def GetClassName(self):
return "Gui::PythonWorkbench"
FreeCADGui.addWorkbench(FrontISTR)
# File format pref pages are independent and can be loaded at startup
#import EM_rc
#FreeCADGui.addPreferencePage(":/ui/preferences-inp.ui","Import-Export")