コード例 #1
0
 def _read_lseq(self, data, n):
     ntotal = 20  # 5*4
     struct_5i = Struct(self._endian + b'5i')
     nentries = (len(data) - n) // ntotal
     for i in range(nentries):
         out = struct_5i.unpack(data[n:n + ntotal])
         (sid, darea, load_id, temperature_id, undef) = out
         if self.is_debug_file:
             self.binary_debug.write('  LSEQ=%s\n' % str(out))
         load = LSEQ.add_op2_data(out)
         n += ntotal
     self.card_count['LSEQ'] = nentries
     return n
コード例 #2
0
ファイル: geom3.py プロジェクト: saullocastro/pyNastran
 def _read_lseq(self, data, n):
     ntotal = 20  # 5*4
     s = Struct(b(self._endian + '5i'))
     nentries = (len(data) - n) // ntotal
     for i in range(nentries):
         out = s.unpack(data[n:n + ntotal])
         (sid, darea, load_id, temperature_id, undef) = out
         if self.is_debug_file:
             self.binary_debug.write('  LSEQ=%s\n' % str(out))
         load = LSEQ.add_op2_data(out)
         self._add_lseq_object(load)
         n += ntotal
     self.card_count['LSEQ'] = nentries
     return n