Open meyer-nils opened 1 year ago
Hi, I also encountered this issue. Have you published your fixes somewhere or could you share them with me? Thanks!
I don't recall my exact solution, but you can find a similar treatment of floating point orientation vectors for 1D elements in the same file.
Simply adjust it to something like this:
if keyword in ["CBAR", "CBEAM", "CBUSH", "CBUSH1D", "CGAP"]:
cell = chunks[3:5]
if keyword in ["CQUAD4"]:
cell = chunks[3:7]
else:
cell = chunks[3:]
You may want to adjust the list of keywords or the slice.
Describe the bug Conversion of NASTRAN files with floats for THETA, MCID or ZOFFS results in a ValueError.
To Reproduce This should be a valid NASTRAN file, but results in the error above:
Diagnose Obviously the mapping to integer fails in line 74 of _nastran.py
list(map(int, cell))
, if the last entries are no integers. I propose to check for shell elements similar to the check for 1D elements and to strip the last chunks, if they are floats. If you agree with this suggestion or have another suggestion, I could prepare a pull request.