FEM: utils, add a method to get the Part to mesh
This commit is contained in:
@@ -152,6 +152,23 @@ def get_pref_working_dir(solver_obj):
|
||||
|
||||
|
||||
# other
|
||||
def get_part_to_mesh(mesh_obj):
|
||||
'''
|
||||
gmsh mesh object: the Attribute is Part
|
||||
netgen mesh object: the Attribute is Shape
|
||||
other mesh objects: do not have a Attribute which holds the part to mesh
|
||||
'''
|
||||
if is_derived_from(mesh_obj, "Fem::FemMeshGmsh"):
|
||||
return mesh_obj.Part
|
||||
elif is_derived_from(mesh_obj, "Fem::FemMeshShapeNetgenObject"):
|
||||
return mesh_obj.Shape
|
||||
else:
|
||||
return None
|
||||
# TODO: the Attributes should be named with the same name
|
||||
# should it be Shape or Part?
|
||||
# IMHO Part since the Attributes references the document object and not a Shape
|
||||
|
||||
|
||||
def getBoundBoxOfAllDocumentShapes(doc):
|
||||
overalboundbox = None
|
||||
for o in doc.Objects:
|
||||
|
||||
Reference in New Issue
Block a user