utils Module

Defines various utilities for BDF parsing including:
  • to_fields
pyNastran.bdf.bdf_interface.utils.expand_tabs(line)[source]

expands the tabs; breaks if you mix commas and tabs

pyNastran.bdf.bdf_interface.utils.fill_dmigs(model)[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)[source]

Extracts the solution from the executive control deck

pyNastran.bdf.bdf_interface.utils.print_filename(filename, relpath=True)[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:
filename : str

a filename string

Returns:
filename_string : str

a shortened representation of the filename

pyNastran.bdf.bdf_interface.utils.to_fields(card_lines, card_name)[source]

Converts a series of lines in a card into string versions of the field. Handles large, small, and CSV formatted cards.

Parameters:
lines : List[str]

the lines of the BDF card object

card_name : str

the card_name -> ‘GRID’

Returns:
fields : List[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