Skip to content

Commit

Permalink
Merge pull request #1097 from michejansen/treat_nastran_lcs_lines
Browse files Browse the repository at this point in the history
Deal with orientation nodes of nastran 1D elements
  • Loading branch information
nschloe authored May 7, 2021
2 parents e8a5079 + b50fd3d commit d0cac27
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/meshio/nastran/_nastran.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,15 @@ def add_cell(nastran_type, cell, cell_type, cell_ref):
cell_ref = chunks[2].strip()
cell_ref = int(cell_ref) if len(cell_ref) > 0 else None

if keyword == "CBAR":
# A CBAR line can be
if keyword in ["CBAR", "CBEAM", "CBUSH", "CBUSH1D", "CGAP"]:
# Most Nastran 1D elements contain a third node (in the form of a node id or coordinates) to specify the local coordinate system:
# https://docs.plm.automation.siemens.com/data_services/resources/nxnastran/10/help/en_US/tdocExt/pdf/QRG.pdf
# For example, a CBAR line can be
# ```
# CBAR 37 3 11.0 0.0 0.0
# ```
# No idea what the last three floats are. Just remove them.
# where the last three floats specify the orientation vector.
# This information is removed.
cell = chunks[3:5]
else:
cell = chunks[3:]
Expand Down

0 comments on commit d0cac27

Please sign in to comment.