expand_card
Module
- defines:
expand_thru
expand_thru_by
- pyNastran.bdf.cards.expand_card._remove_blanks_capitalize(fields: list[str | None]) list[str | None] [source]
remove any blanks and capitalize any strings
- pyNastran.bdf.cards.expand_card.expand_thru(fields: list[str], set_fields: bool = True, sort_fields: bool = False) list[int] [source]
Expands a list of values of the form [1,5,THRU,9,13] to be [1,5,6,7,8,9,13]
- Parameters:
- fieldslist[int/str]
the fields to expand
- set_fieldsbool; default=True
Should the fields be converted to a set and then back to a list? This is useful for [2, ‘THRU’ 5, 1]
- sort_fieldsbool; default=False
Should the fields be sorted at the end?
- pyNastran.bdf.cards.expand_card.expand_thru_by(fields: list[str], set_fields: bool = True, sort_fields: bool = True, require_int: bool = True, allow_blanks: bool = False) list[int] [source]
Expands a list of values of the form [1,5,THRU,9,BY,2,13] to be [1,5,7,9,13]
- Parameters:
- fieldslist[int/str]
the fields to expand
- set_fieldsbool; default=True
Should the fields be converted to a set and then back to a list to remove duplicates? This is useful for [2, ‘THRU’ 5, 1]
- sort_fieldsbool; default=False
Should the fields be sorted at the end?
- require_intbool; default=True
True : all data must be integers False : floats are allowed (e.g., DDVAL)
- allow_blanksbool; default=Fals
True : blank/Nones are ignored (e.g., NSM1/NSML1) False : crash
- .. todo:: not tested
Notes
- used for:
BLSEG, DDVAL, NSM1, ACCEL1 QVECT, QBDY3, RADBC, QVOL
what else ???