pyNastran
0.5.0
pyNastran BDF Reader/Writer, OP2 Parser, and GUI
|
Public Member Functions | |
def | __init__ |
def | print_filename |
Takes a path such as C:/work/fem.bdf and locates the file using relative paths. | |
def | open_file |
Takes a filename and opens the file. | |
def | get_file_stats |
gets information about the active BDF file being read | |
def | get_line_number |
Gets the line number of the active BDF (used for debugging). | |
def | get_next_line |
Gets the next line in the BDF. | |
def | close_file |
Closes the active file object. | |
Public Attributes | |
relpath | |
log | |
doneReading | |
determines if self.activefilename should be closed at the next opportunity | |
autoReject | |
automatically rejects every parsable card (default=False) | |
foundEndData | |
was an ENDDATA card found | |
bdf_filename | |
the active filename (string) | |
includeDir | |
the directory of the 1st BDF (include BDFs are relative to this one) | |
infilesPack | |
list of infile objects (needed for INCLUDE files) | |
linesPack | |
list of lines from self.activeFilename that are stored | |
lineNumbers | |
stores the line number of self.activefilename that the parser is on very helpful when debugging | |
isOpened | |
dictionary that says whether self.bdf_filename is open/close (boolean) | |
cardCount | |
list of all read in cards - useful in determining if entire BDF was read & really useful in debugging | |
rejectCount | |
stores the cardCount of cards that have been rejected |
Definition at line 31 of file bdf_Reader.py.
def pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.__init__ | ( | self, | |
debug, | |||
log | |||
) |
Definition at line 32 of file bdf_Reader.py.
def pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.print_filename | ( | self, | |
filename | |||
) |
Takes a path such as C:/work/fem.bdf and locates the file using relative paths.
If it's on another drive, the path is not modified.
self | the object pointer |
filename | a filename string |
filenameString | a shortened representation of the filename |
Definition at line 58 of file bdf_Reader.py.
References pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.open_file(), and pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.relpath.
Referenced by pyNastran.bdf.bdf.BDF.readBDF(), pyNastran.bdf.bdfInterface.bdf_writeMesh.WriteMesh.write_as_CTRIA3(), pyNastran.bdf.bdfInterface.bdf_writeMesh.WriteMesh.writeBDF(), and pyNastran.bdf.bdfInterface.bdf_writeMesh.WriteMesh.writeBDFAsPatran().
def pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.open_file | ( | self, | |
infileName | |||
) |
Takes a filename and opens the file.
This method is used in order to support INCLUDE files.
Definition at line 71 of file bdf_Reader.py.
References pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader._active_filenames, pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_file_stats(), pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_line_number(), and pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.isOpened.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.print_filename(), pyNastran.bdf.bdf.BDF.readBDF_Punch(), and pyNastran.bdf.bdf.BDF.set_dynamic_syntax().
gets information about the active BDF file being read
self | the object pointer |
lineNumber | the active file's line number |
Definition at line 97 of file bdf_Reader.py.
References pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_line_number(), and pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.lineNumbers.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.open_file().
Gets the line number of the active BDF (used for debugging).
self | the object pointer |
returns | the line number of the active BDF filename |
Definition at line 107 of file bdf_Reader.py.
References pyNastran.bdf.bdfInterface.bdf_cardMethods.CardMethods._make_lines_pack(), pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_next_line(), and pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.lineNumbers.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_file_stats(), pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.open_file(), and pyNastran.bdf.bdf.BDF.readBDF_Punch().
def pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_next_line | ( | self, | |
debug = False |
|||
) |
Gets the next line in the BDF.
self | the BDF object |
debug | developer debug |
line | the next line in the BDF or None if it's the end of the current file |
Definition at line 121 of file bdf_Reader.py.
References pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.close_file(), and pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.infilesPack.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_line_number(), pyNastran.bdf.bdf.BDF.readBDF_Punch(), and pyNastran.bdf.bdf.BDF.set_dynamic_syntax().
def pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.close_file | ( | self, | |
debug = False |
|||
) |
Closes the active file object.
If no files are open, the function is skipped. This method is used in order to support INCLUDE files.
self | the object pointer |
debug | developer debug |
Definition at line 144 of file bdf_Reader.py.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_next_line().
Definition at line 32 of file bdf_Reader.py.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader::print_filename().
Definition at line 32 of file bdf_Reader.py.
Referenced by pyNastran.converters.panair.panairGrid.PanairGrid.addWakePatch(), pyNastran.f06.tables.oes.OES.getBarHeader(), pyNastran.f06.tables.oug.OUG.getComplexDisplacement(), pyNastran.f06.tables.oug.OUG.getDisplacement(), pyNastran.f06.tables.oqg.OQG.getMpcForces(), pyNastran.f06.tables.oes.OES.getQuadCompositeStress(), pyNastran.f06.tables.oes.OES.getQuadHeader(), pyNastran.f06.f06.F06.getRealEigenvectors(), pyNastran.f06.tables.oes.OES.getRodHeader(), pyNastran.f06.tables.oqg.OQG.getSpcForces(), pyNastran.f06.tables.oug.OUG.getTemperatureVector(), pyNastran.f06.tables.oes.OES.getTriHeader(), pyNastran.bdf.bdf_Methods.BDFMethods.MassProperties(), pyNastran.bdf.bdfInterface.bdf_cardMethods.CardMethods.processCard(), pyNastran.f06.tables.oes.OES.readSolidStrain(), pyNastran.converters.panair.panairGrid.PanairGrid.splitPoints(), and pyNastran.f06.f06.F06.startLog().
determines if self.activefilename should be closed at the next opportunity
is the active file done reading
Definition at line 146 of file bdf_Reader.py.
automatically rejects every parsable card (default=False)
Definition at line 189 of file bdf_Reader.py.
Referenced by pyNastran.bdf.bdfInterface.bdf_writeMesh.WriteMesh::echoBDF().
was an ENDDATA card found
Definition at line 191 of file bdf_Reader.py.
the active filename (string)
Definition at line 192 of file bdf_Reader.py.
the directory of the 1st BDF (include BDFs are relative to this one)
Definition at line 193 of file bdf_Reader.py.
list of infile objects (needed for INCLUDE files)
Definition at line 194 of file bdf_Reader.py.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_next_line(), and pyNastran.bdf.bdf.BDF.readBDF_Punch().
list of lines from self.activeFilename that are stored
Definition at line 195 of file bdf_Reader.py.
stores the line number of self.activefilename that the parser is on very helpful when debugging
Definition at line 198 of file bdf_Reader.py.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_file_stats(), and pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.get_line_number().
dictionary that says whether self.bdf_filename is open/close (boolean)
Definition at line 200 of file bdf_Reader.py.
Referenced by pyNastran.bdf.bdfInterface.bdf_Reader.BDFReader.open_file().
list of all read in cards - useful in determining if entire BDF was read & really useful in debugging
Definition at line 202 of file bdf_Reader.py.
stores the cardCount of cards that have been rejected
Definition at line 203 of file bdf_Reader.py.