expand_card
Module¶
- defines:
- expand_thru
- expand_thru_by
-
pyNastran.bdf.cards.expand_card.
expand_thru
(fields, set_fields=True, sort_fields=False)[source]¶ Expands a list of values of the form [1,5,THRU,9,13] to be [1,5,6,7,8,9,13]
Parameters: - fields : List[int/str]
the fields to expand
- set_fields : bool; 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_fields : bool; default=False
Should the fields be sorted at the end?
-
pyNastran.bdf.cards.expand_card.
expand_thru_by
(fields, set_fields=True, sort_fields=True, require_int=True, allow_blanks=False)[source]¶ Expands a list of values of the form [1,5,THRU,9,BY,2,13] to be [1,5,7,9,13]
Parameters: - fields : List[int/str]
the fields to expand
- set_fields : bool; 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_fields : bool; default=False
Should the fields be sorted at the end?
- require_int : bool; default=True
True : all data must be integers False : floats are allowed (e.g., DDVAL)
- allow_blanks : bool; default=Fals
True : blank/Nones are ignored (e.g., NSM1/NSML1) False : crash
- .. todo:: not tested
Notes
used for QBDY3 and what else ???