예제 #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
예제 #2
0
파일: spoint.py 프로젝트: umvarma/pynastran
 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))
예제 #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))
예제 #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
예제 #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)
예제 #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)
예제 #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)
예제 #8
0
파일: spoint.py 프로젝트: afcarl/cyNastran
 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))
예제 #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
예제 #10
0
 def SetIDs(self):
     """gets the IDs of the SETx"""
     return collapse_thru(self.IDs)
예제 #11
0
 def rawFields(self):
     return ['SESET', self.seid] + collapse_thru(self.IDs)
예제 #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
예제 #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
예제 #14
0
 def raw_fields(self):
     return ['SESET', self.seid] + collapse_thru(self.IDs)
예제 #15
0
 def SetIDs(self):
     """gets the IDs of the SETx"""
     return collapse_thru(self.IDs)
예제 #16
0
 def rawFields(self):
     if isinstance(self.nid, int):
         fields = ['SPOINT'] + self.nid
     else:
         fields = ['SPOINT'] + collapse_thru(self.nid)
     return fields
예제 #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
예제 #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