def readCREEP(self, data): """ CREEP(1003,10,245) - record 1 """ #print "reading CREEP" while len(data) >= 64: # 16*4 data = data[64:] out = unpack('iffiiiififffffff', data[:64]) (mid, T0, exp, form, tidkp, tidcp, tidcs, thresh, Type, ag1, ag2, ag3, ag4, ag5, ag6, ag7) = out self.add_creep_material(CREEP(None, out), allowOverwrites=True)
def _read_creep(self, data, n): """ CREEP(1003,10,245) - record 1 """ nmaterials = (len(data) - n) // 64 s = Struct(b(self._endian + 'i2f4ifi7f')) for i in range(nmaterials): edata = data[n:n+64] out = s.unpack(edata) (mid, T0, exp, form, tidkp, tidcp, tidcs, thresh, Type, ag1, ag2, ag3, ag4, ag5, ag6, ag7) = out mat = CREEP.add_op2_data(out) self._add_creep_material_object(mat, allow_overwrites=True) n += 64 self.card_count['CREEP'] = nmaterials return n
def _read_creep(self, data, n): """ CREEP(1003,10,245) - record 1 """ nmaterials = (len(data) - n) // 64 s = Struct(b(self._endian + 'i2f4ifi7f')) for i in range(nmaterials): edata = data[n:n+64] out = s.unpack(edata) (mid, T0, exp, form, tidkp, tidcp, tidcs, thresh, Type, ag1, ag2, ag3, ag4, ag5, ag6, ag7) = out mat = CREEP.add_op2_data(out) self.add_creep_material(mat, allow_overwrites=True) n += 64 self.card_count['CREEP'] = nmaterials return n
def _readCREEP(self, data, n): """ CREEP(1003,10,245) - record 1 """ #print "reading CREEP" nmaterials = (len(data) - n) // 64 s = Struct(b'i2f4ifi7f') for i in xrange(nmaterials): edata = data[n:n+64] out = s.unpack(edata) (mid, T0, exp, form, tidkp, tidcp, tidcs, thresh, Type, ag1, ag2, ag3, ag4, ag5, ag6, ag7) = out self.add_creep_material(CREEP(None, out), allowOverwrites=True) n += 64 self.card_count['CREEP'] = nmaterials return n
def _read_creep(self, data, n): """ CREEP(1003,10,245) - record 1 """ nmaterials = (len(data) - n) // 64 s = Struct(self._endian + b'i2f4ifi7f') for unused_i in range(nmaterials): edata = data[n:n + 64] out = s.unpack(edata) #(mid, T0, exp, form, tidkp, tidcp, tidcs, thresh, #Type, ag1, ag2, ag3, ag4, ag5, ag6, ag7) = out if self.is_debug_file: self.binary_debug.write(' CREEP=%s\n' % str(out)) mat = CREEP.add_op2_data(out) self._add_creep_material_object(mat, allow_overwrites=False) n += 64 self.card_count['CREEP'] = nmaterials return n