FEM: improvements for meshes without geometry link

This commit is contained in:
Bernd Hahnebach
2021-07-31 20:09:15 +02:00
parent abcd05b591
commit ce6df4494c
2 changed files with 22 additions and 13 deletions

View File

@@ -78,18 +78,6 @@ class FemInputWriter():
self.ccx_eedges = "Eedges"
self.mat_geo_sets = mat_geo_sets
if self.mesh_object:
if hasattr(self.mesh_object, "Shape"):
self.theshape = self.mesh_object.Shape
elif hasattr(self.mesh_object, "Part"):
self.theshape = self.mesh_object.Part
else:
FreeCAD.Console.PrintWarning(
"A finite mesh without a link to a Shape was given. "
"Happen on pure mesh objects. "
"Not all methods do work without this link.\n"
)
# ATM only used in meshtools.get_femelement_direction1D_set
# TODO somehow this is not smart, rare meshes might be used often
self.femmesh = self.mesh_object.FemMesh
else:
FreeCAD.Console.PrintWarning(