def _read_cord2s(self, data, n): """ (2201,22,10) - the marker for Record 6 """ s = Struct(self._endian + b'4i9f') nentries = (len(data) - n) // 52 for i in range(nentries): edata = data[n:n + 52] # 13*4 out = s.unpack(edata) (cid, sixty5, eight, rid, a1, a2, a3, b1, b2, b3, c1, c2, c3) = out data_in = [cid, rid, a1, a2, a3, b1, b2, b3, c1, c2, c3] if self.is_debug_file: self.binary_debug.write(' CORD2S=%s\n' % str(out)) coord = CORD2S.add_op2_data(data_in) self._add_coord_object(coord, allow_overwrites=True) n += 52 self.increase_card_count('CORD2S', nentries) return n
def _read_cord2s(self, data, n): """ (2201,22,10) - the marker for Record 6 """ s = Struct(b(self._endian + '4i9f')) nentries = (len(data) - n) // 52 for i in range(nentries): edata = data[n:n + 52] # 13*4 out = s.unpack(edata) (cid, sixty5, eight, rid, a1, a2, a3, b1, b2, b3, c1, c2, c3) = out data_in = [cid, rid, a1, a2, a3, b1, b2, b3, c1, c2, c3] if self.is_debug_file: self.binary_debug.write(' CORD2S=%s\n' % str(out)) coord = CORD2S.add_op2_data(data_in) self.add_coord(coord, allow_overwrites=True) n += 52 self._increase_card_count('CORD2S', nentries) return n
def _read_cord2s(self, data, n): """ (2201,22,10) - the marker for Record 6 """ ntotal = 52 * self.factor # 13*4 s = Struct(mapfmt(self._endian + b'4i9f', self.size)) nentries = (len(data) - n) // ntotal for unused_i in range(nentries): edata = data[n:n + ntotal] out = s.unpack(edata) (cid, sixty5, eight, rid, a1, a2, a3, b1, b2, b3, c1, c2, c3) = out data_in = [cid, rid, a1, a2, a3, b1, b2, b3, c1, c2, c3] if self.is_debug_file: self.binary_debug.write(' CORD2S=%s\n' % str(out)) coord = CORD2S.add_op2_data(data_in) self._add_coord_object(coord, allow_overwrites=False) n += ntotal self.increase_card_count('CORD2S', nentries) return n