Exemple #1
0
 def rawFields(self):
     spoints = list(self.spoints)
     spoints.sort()
     #print("self.spoints = %s" % self.spoints)
     spoints = collapse_thru(spoints)
     list_fields = ['SPOINT'] + spoints
     return list_fields
Exemple #2
0
 def write_bdf(self, f, size=8, is_double=False):
     #..todo:: collapse the IDs
     if self.n:
         spoint = list(self.spoint)
         spoint.sort()
         card = ['SPOINT'] + collapse_thru(spoint)
         f.write(print_card_8(card))
Exemple #3
0
 def write_card(self, f, size=8, is_double=False):
     #.. todo:: collapse the IDs
     if self.n:
         spoint = list(self.spoint)
         spoint.sort()
         card = ['SPOINT'] + collapse_thru(spoint)
         f.write(print_card_8(card))
Exemple #4
0
 def rawFields(self):
     #print("SPOINTi")
     spoints = list(self.spoints)
     spoints.sort()
     #print("self.spoints = %s" %(self.spoints))
     spoints = collapse_thru(spoints)
     fields = ['SPOINT'] + spoints
     return fields
Exemple #5
0
    def __repr__(self):
        thru_fields = collapse_thru(self.IDs)
        #list_fields = ['SESET', self.seid]

        cards = []
        while 'THRU' in thru_fields:
            ithru = thru_fields.index('THRU')
            card = print_card_8(['SESET', self.seid] +
                                thru_fields[ithru - 1:ithru + 2])
            cards.append(card)
            thru_fields = thru_fields[0:ithru - 1]+thru_fields[ithru + 2:]
        if thru_fields:
            card = print_card_8(['SESET', self.seid] + thru_fields)
            cards.append(card)
        return ''.join(cards)
Exemple #6
0
    def __repr__(self):
        thruFields = collapse_thru(self.IDs)

        #list_fields = ['SESET', self.seid]

        #i = 0
        cards = []
        #print("thruFields", thruFields)
        while 'THRU' in thruFields:
            #print("thruFields", thruFields)
            iThru = thruFields.index('THRU')
            card = print_card_8(['SESET', self.seid] + 
                                thruFields[iThru - 1:iThru + 2])
            cards.append(card)
            thruFields = thruFields[0:iThru - 1]+thruFields[iThru + 2:]
        #print("thruFields", thruFields)
        if thruFields:
            card = print_card_8(['SESET', self.seid] + thruFields)
            cards.append(card)
        #print("cards",cards)
        return ''.join(cards)
Exemple #7
0
    def __repr__(self):
        thruFields = collapse_thru(self.IDs)

        #list_fields = ['SESET', self.seid]

        #i = 0
        cards = []
        #print("thruFields", thruFields)
        while 'THRU' in thruFields:
            #print("thruFields", thruFields)
            iThru = thruFields.index('THRU')
            card = print_card_8(['SESET', self.seid] +
                                thruFields[iThru - 1:iThru + 2])
            cards.append(card)
            thruFields = thruFields[0:iThru - 1] + thruFields[iThru + 2:]
        #print("thruFields", thruFields)
        if thruFields:
            card = print_card_8(['SESET', self.seid] + thruFields)
            cards.append(card)
        #print("cards",cards)
        return ''.join(cards)
Exemple #8
0
 def write_bdf(self, f, size=8):
     #..todo:: collapse the IDs
     if self.n:
         card = ['SPOINT'] + collapse_thru(self.spoint)
         f.write(print_card(card))
Exemple #9
0
 def rawFields(self):
     """gets the "raw" card without any processing as a list for printing"""
     list_fields = ['SEQSET1', self.components] + collapse_thru(self.IDs)
     return list_fields
Exemple #10
0
 def SetIDs(self):
     """gets the IDs of the SETx"""
     return collapse_thru(self.IDs)
Exemple #11
0
 def rawFields(self):
     return ['SESET', self.seid] + collapse_thru(self.IDs)
Exemple #12
0
 def rawFields(self):
     """gets the "raw" card without any processing as a list for printing"""
     fields = [self.type, self.components] + collapse_thru(self.IDs)
     return fields
Exemple #13
0
 def raw_fields(self):
     """gets the "raw" card without any processing as a list for printing"""
     list_fields = ['SEQSET1', self.components] + collapse_thru(self.IDs)
     return list_fields
Exemple #14
0
 def raw_fields(self):
     return ['SESET', self.seid] + collapse_thru(self.IDs)
Exemple #15
0
 def SetIDs(self):
     """gets the IDs of the SETx"""
     return collapse_thru(self.IDs)
Exemple #16
0
 def rawFields(self):
     if isinstance(self.nid, int):
         fields = ['SPOINT'] + self.nid
     else:
         fields = ['SPOINT'] + collapse_thru(self.nid)
     return fields
Exemple #17
0
 def rawFields(self):
     if isinstance(self.nid, int):
         list_fields = ['SPOINT', self.nid]
     else:
         list_fields = ['SPOINT'] + collapse_thru(self.nid)
     return list_fields
Exemple #18
0
 def raw_fields(self):
     """gets the "raw" card without any processing as a list for printing"""
     list_fields = [self.type, self.components] + collapse_thru(self.node_ids)
     return list_fields