def _read_cord3g(self, data, n): """ (14301,143,651) - the marker for Record 7 .. todo:: isnt this a CORD3G, not a CORD3R ??? """ s = Struct(b(self._endian + '4i')) nentries = (len(data) - n) // 16 for i in range(nentries): edata = data[n:n + 16] # 4*4 out = s.unpack(edata) (cid, n1, n2, n3) = out coord = CORD3G.add_op2_data(out) if self.is_debug_file: self.binary_debug.write(' CORD3G=%s\n' % str(out)) self.add_coord(coord, allow_overwrites=True) n += 16 self._increase_card_count('CORD3G', nentries) return n
def _read_cord3g(self, data, n): """ (14301,143,651) - the marker for Record 7 .. todo:: isnt this a CORD3G, not a CORD3R ??? """ struct_4i = Struct(self._endian + b'4i') nentries = (len(data) - n) // 16 for i in range(nentries): edata = data[n:n + 16] # 4*4 out = struct_4i.unpack(edata) (cid, n1, n2, n3) = out coord = CORD3G.add_op2_data(out) if self.is_debug_file: self.binary_debug.write(' CORD3G=%s\n' % str(out)) self._add_coord_object(coord, allow_overwrites=True) n += 16 self.increase_card_count('CORD3G', nentries) return n
def _read_cord3g(self, data: bytes, n: int) -> int: """ (14301,143,651) - the marker for Record 7 .. todo:: isnt this a CORD3G, not a CORD3R ??? """ ntotal = 16 * self.factor struct_4i = Struct(self._endian + b'4i') nentries = (len(data) - n) // ntotal for unused_i in range(nentries): edata = data[n:n + ntotal] # 4*4 out = struct_4i.unpack(edata) #(cid, n1, n2, n3) = out coord = CORD3G.add_op2_data(out) if self.is_debug_file: self.binary_debug.write(' CORD3G=%s\n' % str(out)) self._add_coord_object(coord, allow_overwrites=False) n += ntotal self.increase_card_count('CORD3G', nentries) return n