Skip to content

Commit

Permalink
FEM: beam section: use circle if width is not given
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed May 23, 2016
1 parent 7b195eb commit 9601916
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Mod/Fem/FemInputWriterCcx.py
Expand Up @@ -173,8 +173,15 @@ def write_femelementsets(self, f):
beamsec_obj = ccx_elset['beamsection_obj']
elsetdef = 'ELSET=' + ccx_elset['ccx_elset_name'] + ', '
material = 'MATERIAL=' + ccx_elset['mat_obj_name']
setion_def = '*BEAM SECTION, ' + elsetdef + material + ', SECTION=RECT\n'
setion_geo = str(beamsec_obj.Height.getValueAs('mm')) + ', ' + str(beamsec_obj.Width.getValueAs('mm')) + '\n'
height = beamsec_obj.Height.getValueAs('mm')
width = beamsec_obj.Width.getValueAs('mm')
if width == 0:
section_type = ', SECTION=CIRC'
setion_geo = str(height) + '\n'
else:
section_type = ', SECTION=RECT'
setion_geo = str(height) + ', ' + str(width) + '\n'
setion_def = '*BEAM SECTION, ' + elsetdef + material + section_type + '\n'
f.write(setion_def)
f.write(setion_geo)
elif 'shellthickness_obj'in ccx_elset: # shell mesh
Expand Down

0 comments on commit 9601916

Please sign in to comment.