Navigation Menu

Skip to content

Commit

Permalink
FEM: FemMeshTools, fix input file writing if groups have non expected…
Browse files Browse the repository at this point in the history
… group names
  • Loading branch information
berndhahnebach committed Nov 22, 2016
1 parent 8d786be commit af9d137
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mod/Fem/FemMeshTools.py
Expand Up @@ -365,10 +365,11 @@ def get_femnode_set_from_group_data(femmesh, fem_object):
# we assume the mesh group data fits with the reference shapes, no check is done in this regard !!!
# what happens if a reference shape was changed, but the mesh and the mesh groups were not created new !?!
obj = fem_object['Object']
group_nodes = None
if femmesh.GroupCount:
for g in femmesh.Groups:
grp_name = femmesh.getGroupName(g)
if grp_name.startswith(obj.Name + '_'):
if grp_name.startswith(obj.Name):
if femmesh.getGroupElementType(g) == "Node":
print("Constraint: " + obj.Name + " --> " + "mesh group: " + grp_name)
group_nodes = femmesh.getGroupElements(g) # == ref_shape_femelements
Expand All @@ -387,7 +388,7 @@ def get_femelement_sets_from_group_data(femmesh, fem_objects):
if femmesh.GroupCount:
for g in femmesh.Groups:
grp_name = femmesh.getGroupName(g)
if grp_name.startswith(obj.Name + '_'):
if grp_name.startswith(obj.Name):
if femmesh.getGroupElementType(g) == "Volume":
print("Constraint: " + obj.Name + " --> " + "mesh group: " + grp_name)
group_elements = femmesh.getGroupElements(g) # == ref_shape_femelements
Expand Down

0 comments on commit af9d137

Please sign in to comment.