FEM: solver calcilix, implement missing document restore for missing attributes for buckling analyisie FINISH BITTE

This commit is contained in:
Bernd Hahnebach
2021-06-16 17:58:43 +02:00
parent f9a6dd77eb
commit 49ce8dcab9
2 changed files with 64 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ import FreeCAD
from . import base_fempythonobject
from femsolver.calculix.solver import add_attributes
from femsolver.calculix.solver import on_restore_of_document
class SolverCcxTools(base_fempythonobject.BaseFemPythonObject):
@@ -46,6 +47,10 @@ class SolverCcxTools(base_fempythonobject.BaseFemPythonObject):
ccx_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem/Ccx")
# add attributes
# implemented in framework calculix solver module
add_attributes(obj, ccx_prefs)
obj.addProperty(
"App::PropertyPath",
"WorkingDir",
@@ -55,5 +60,9 @@ class SolverCcxTools(base_fempythonobject.BaseFemPythonObject):
# the working directory is not set, the solver working directory is
# only used if the preferences working directory is left blank
# add attributes from framework calculix solver
add_attributes(obj, ccx_prefs)
def onDocumentRestored(self, obj):
ccx_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem/Ccx")
# implemented in framework calculix solver module
on_restore_of_document(obj, ccx_prefs)