FEM: use python base constraint class, mesh result mesh
This commit is contained in:
@@ -28,27 +28,11 @@ __url__ = "http://www.freecadweb.org"
|
||||
# \ingroup FEM
|
||||
# \brief FreeCAD FEM _ViewProviderFemMeshResult
|
||||
|
||||
from . import ViewProviderFemConstraint
|
||||
|
||||
class _ViewProviderFemMeshResult:
|
||||
|
||||
class _ViewProviderFemMeshResult(ViewProviderFemConstraint.ViewProxy):
|
||||
"A View Provider for the FemMeshResult object"
|
||||
def __init__(self, vobj):
|
||||
vobj.Proxy = self
|
||||
|
||||
def getIcon(self):
|
||||
return ":/icons/fem-femmesh-result.svg"
|
||||
|
||||
def attach(self, vobj):
|
||||
self.ViewObject = vobj
|
||||
self.Object = vobj.Object
|
||||
|
||||
def updateData(self, obj, prop):
|
||||
return
|
||||
|
||||
def onChanged(self, vobj, prop):
|
||||
return
|
||||
|
||||
def __getstate__(self):
|
||||
return None
|
||||
|
||||
def __setstate__(self, state):
|
||||
return None
|
||||
|
||||
@@ -27,22 +27,14 @@ __url__ = "http://www.freecadweb.org"
|
||||
# \ingroup FEM
|
||||
# \brief FreeCAD FEM _FemMeshResult
|
||||
|
||||
from . import FemConstraint
|
||||
|
||||
class _FemMeshResult():
|
||||
|
||||
class _FemMeshResult(FemConstraint.Proxy):
|
||||
"""The Fem::FemMeshObject's Proxy python type, add Result specific object type
|
||||
"""
|
||||
|
||||
Type = "Fem::FemMeshResult"
|
||||
|
||||
def __init__(self, obj):
|
||||
self.Type = "Fem::FemMeshResult"
|
||||
self.Object = obj # keep a ref to the DocObj for nonGui usage
|
||||
obj.Proxy = self # link between App::DocumentObject to this object
|
||||
|
||||
def execute(self, obj):
|
||||
return
|
||||
|
||||
def __getstate__(self):
|
||||
return self.Type
|
||||
|
||||
def __setstate__(self, state):
|
||||
if state:
|
||||
self.Type = state
|
||||
super(_FemMeshResult, self).__init__(obj)
|
||||
|
||||
Reference in New Issue
Block a user