umvarma / pynastran

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

make the ENDDATA line optional #161

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current implementation of write_bdf() writes the ENDDATA line at all times. 
This is done in line 190 of bdf_writeMesh.py in the bdfInterface package.
The feature request suggests the following:
Make writing ENDDATA optional by adding a simple logical attribute 
(default=True). The attribute would need a simple set and get method to make it 
accessible for users. The code of write_bdf() can be altered like this: 

        if self.writeEnddata == true:       
           msg += 'ENDDATA\n'
        outfile.write(msg)
        outfile.close()

Original issue reported on code.google.com by martinsc...@gmail.com on 1 Oct 2014 at 10:34

GoogleCodeExporter commented 9 years ago
I assume you're using v0.6.  I really need to do a v0.7 release.  In the 
meantime, I recommend downloading the source from subversion.

The write_bdf method now has the signature of:

    def write_bdf(self, out_filename=None, interspersed=True,
                  size=8, precision='single', enddata=None):

where:

out_filename: is optional (None pops a GUI)
interspersed: True groups elements with their property, while False is faster
size: 8 or 16 (small field vs. large field)
precision: 'single' or 'double' where a double precision float looks like 1.0D8 
and matters for things like DMIGs
enddata: None/True/False where None is the default for your bdf

Original comment by mesheb82 on 1 Oct 2014 at 4:48