utils
Module
- Defines various utilities for BDF parsing including:
to_fields
- pyNastran.bdf.bdf_interface.utils.expand_tabs(line: str) str [source]
expands the tabs; breaks if you mix commas and tabs
- pyNastran.bdf.bdf_interface.utils.fill_dmigs(model: BDF) None [source]
fills the DMIx cards with the column data that’s been stored
- pyNastran.bdf.bdf_interface.utils.parse_executive_control_deck(executive_control_lines: list[str]) tuple[int | None, str | None, int | None, str] [source]
Extracts the solution from the executive control deck
- pyNastran.bdf.bdf_interface.utils.print_filename(filename: str, relpath: bool = True) str [source]
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.
- Parameters:
- filenamestr
a filename string
- Returns:
- filename_stringstr
a shortened representation of the filename
- pyNastran.bdf.bdf_interface.utils.to_fields(card_lines: list[str], card_name: str) list[str] [source]
Converts a series of lines in a card into string versions of the field. Handles large, small, and CSV formatted cards.
- Parameters:
- lineslist[str]
the lines of the BDF card object
- card_namestr
the card_name -> ‘GRID’
- Returns:
- fieldslist[str]
the string formatted fields of the card
Warning
this function is used by the reader and isn’t intended to be called by a separate process