Fem: Move MeshGmsh proxy from Fem::FemMeshObject to Fem::FemMeshShapeBaseObject - fixes #14897

This commit is contained in:
marioalexis
2024-07-25 14:02:34 -03:00
parent 56001d3f74
commit 0e6d1cf5f9
16 changed files with 292 additions and 337 deletions

View File

@@ -85,7 +85,7 @@ class _TaskPanel:
self.form = [self.refWidget, propWidget]
analysis = obj.getParentGroup()
self._mesh = membertools.get_single_member(analysis, "Fem::FemMeshObject")
self._part = self._mesh.Part if self._mesh is not None else None
self._part = self._mesh.Shape if self._mesh is not None else None
self._partVisible = None
self._meshVisible = None

View File

@@ -758,24 +758,24 @@ class Writer:
obj = self.getSingleMember("Fem::FemMeshObject")
bodyCount = 0
prefix = ""
if obj.Part.Shape.Solids:
if obj.Shape.Shape.Solids:
prefix = "Solid"
bodyCount = len(obj.Part.Shape.Solids)
elif obj.Part.Shape.Faces:
bodyCount = len(obj.Shape.Shape.Solids)
elif obj.Shape.Shape.Faces:
prefix = "Face"
bodyCount = len(obj.Part.Shape.Faces)
elif obj.Part.Shape.Edges:
bodyCount = len(obj.Shape.Shape.Faces)
elif obj.Shape.Shape.Edges:
prefix = "Edge"
bodyCount = len(obj.Part.Shape.Edges)
bodyCount = len(obj.Shape.Shape.Edges)
return [prefix + str(i + 1) for i in range(bodyCount)]
def getMeshDimension(self):
obj = self.getSingleMember("Fem::FemMeshObject")
if obj.Part.Shape.Solids:
if obj.Shape.Shape.Solids:
return 3
if obj.Part.Shape.Faces:
if obj.Shape.Shape.Faces:
return 2
if obj.Part.Shape.Edges:
if obj.Shape.Shape.Edges:
return 1
return None