FEM: mesh tools, better type checking
This commit is contained in:
@@ -732,15 +732,16 @@ def get_elset_short_name(
|
||||
obj,
|
||||
i
|
||||
):
|
||||
if hasattr(obj, "Proxy") and obj.Proxy.Type == "Fem::Material":
|
||||
from femtools.femutils import is_of_type
|
||||
if is_of_type(obj, "Fem::Material"):
|
||||
return "M" + str(i)
|
||||
elif hasattr(obj, "Proxy") and obj.Proxy.Type == "Fem::FemElementGeometry1D":
|
||||
elif is_of_type(obj, "Fem::FemElementGeometry1D"):
|
||||
return "B" + str(i)
|
||||
elif hasattr(obj, "Proxy") and obj.Proxy.Type == "Fem::FemElementRotation1D":
|
||||
elif is_of_type(obj, "Fem::FemElementRotation1D"):
|
||||
return "R" + str(i)
|
||||
elif hasattr(obj, "Proxy") and obj.Proxy.Type == "Fem::FemElementFluid1D":
|
||||
elif is_of_type(obj, "Fem::FemElementFluid1D"):
|
||||
return "F" + str(i)
|
||||
elif hasattr(obj, "Proxy") and obj.Proxy.Type == "Fem::FemElementGeometry2D":
|
||||
elif is_of_type(obj, "Fem::FemElementGeometry2D"):
|
||||
return "S" + str(i)
|
||||
else:
|
||||
FreeCAD.Console.PrintError(
|
||||
|
||||
Reference in New Issue
Block a user