def add_card(cls, card, comment=''): components = fcomponents_or_blank(card, 1, 'components', 0) nfields = len(card) ids = [] i = 1 for ifield in range(2, nfields): idi = integer_string_or_blank(card, ifield, 'ID%i' % i) if idi: i += 1 ids.append(idi) return cls(components, ids, comment=comment)
def add_card(cls, card, comment=''): seid = integer(card, 1, 'seid') components = fcomponents_or_blank(card, 2, 'components', 0) nfields = len(card) ids = [] i = 1 for ifield in range(3, nfields): idi = integer_string_or_blank(card, ifield, 'ID%i' % i) if idi: i += 1 ids.append(idi) ids = expand_thru(ids) return cls(seid, components, ids, comment=comment)
def add_card(cls, card, comment=''): """ Adds a USET1 card from ``BDF.add_card(...)`` Parameters ---------- card : BDFCard() a BDFCard object comment : str; default='' a comment for the card """ name = string(card, 1, 'name') components = fcomponents_or_blank(card, 2, 'components', 0) nfields = len(card) ids = [] i = 1 for ifield in range(3, nfields): idi = integer_string_or_blank(card, ifield, 'ID%i' % i) if idi: i += 1 ids.append(idi) return USET1(name, components, ids, comment=comment)