umvarma / pynastran

Automatically exported from code.google.com/p/pynastran
1 stars 0 forks source link

write_bdf() should not automatically add ENDDATA #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I use read_bdf() and write_bdf() to process blocks of bulk data. These files do 
not have ENDDATA cards at the end. However, writing the file out using 
write_bdf() includes an ENDDATA that must then be manually stripped out.

One option would be to include the ENDDATA if it was there in the original 
file. Another option would be to add a parameter to the write_bdf function like:

mesh.write_bdf('filename.bdf', enddata=False)

Original issue reported on code.google.com by jeffrey....@gmail.com on 30 Apr 2014 at 10:56

GoogleCodeExporter commented 9 years ago
You're right, that definitely should be supported.  Once it's implemented:

mesh.write_bdf('filename.bdf', enddata=None)

will be the default and correspond to what the user had in their input file.  
Alternatively enddata can be True/False for the user who wants to have more 
control.

Original comment by mesheb82 on 1 May 2014 at 12:51

GoogleCodeExporter commented 9 years ago
The task has been implemented as previously discussed.  The None check is based 
on the existence of card_count['ENDDATA'].  The self.foundEndData parameter has 
been removed as it's unnecessary.

Original comment by mesheb82 on 5 May 2014 at 4:55