pybdf
Module¶
- Main BDF class. Defines:
- BDFInputPy
-
class
pyNastran.bdf.bdf_interface.pybdf.
BDFInputPy
(read_includes, dumplines, encoding, nastran_format='msc', consider_superelements=True, log=None, debug=False)[source]¶ Bases:
object
BDF reader class that only handles lines and not building cards or parsing cards
BDF reader class that only handles lines and not building cards or parsing cards
Parameters: - read_includes : bool
should include files be read
- dumplines : bool
Writes ‘pyNastran_dump.bdf’ up to some failed line index
- encoding : str
the character encoding (e.g., utf8, latin1, cp1252)
- nastran_format : str; default=’msc’
‘zona’ has a special read method {msc, nx, zona}
- consider_superelements : bool; default=True
parse ‘begin super=2’
- log : logger(); default=None
a logger for printing INCLUDE files that are loadaed
- debug : bool; default=False
used when testing; for the logger
-
get_lines
(self, bdf_filename, punch=False, make_ilines=True)[source]¶ Opens the bdf and extracts the lines by group
Parameters: - bdf_filename : str
the main bdf_filename
- punch : bool; default=False
is this a punch file True : no executive/case control decks False : executive/case control decks exist
- make_ilines : bool; default=True
flag for bulk_data_ilines
Returns: - system_lines : List[str]
the system control lines (typically empty; used for alters)
- executive_control_lines : List[str]
the executive control lines (stores SOL 101)
- case_control_lines : List[str]
the case control lines (stores subcases)
- bulk_data_lines : List[str]
the bulk data lines (stores geometry, boundary conditions, loads, etc.)
- bulk_data_ilines : None / (nlines, 2) int ndarray
- if make_ilines = True:
the [ifile, iline] pair for each line in the file
- if make_ilines = False:
ilines = None
-
get_main_lines
(self, bdf_filename)[source]¶ Opens the bdf and extracts the lines
Parameters: - bdf_filename : str / StringIO
the main bdf_filename
Returns: - lines : List[str]
all the lines packed into a single line stream
-
lines_to_deck_lines
(self, lines, make_ilines=True)[source]¶ Merges the includes into the main deck.
Parameters: - lines : List[str]
the lines from the main BDF
- make_ilines : bool; default=True
flag for ilines
Returns: - active_lines : List[str]
all the active lines in the deck
- ilines : (nlines, 2) int ndarray
- if make_ilines = True:
the [ifile, iline] pair for each line in the file
- if make_ilines = False:
ilines = None