Example #1
0
 def _read_matt5(self, data, n):
     """
     MATT5(2403,24,238)
     checked NX-10.1, MSC-2016
     """
     s = Struct(self._endian + b'10i')
     ntotal = 40  # 10*4
     ncards = (len(data) - n) // ntotal
     for i in range(ncards):
         edata = data[n:n + ntotal]
         out = s.unpack(edata)
         if self.is_debug_file:
             self.binary_debug.write('  MATT4=%s\n' % str(out))
         #(mid, tk1, tk2, tk3, tk4, tk5, tk6, tcp, null, thgen) = out
         mat = MATT5.add_op2_data(out)
         self._add_material_dependence_object(mat)
         n += ntotal
     self.increase_card_count('MATT5', ncards)
     return n
Example #2
0
    def _read_matt5(self, data: bytes, n: int) -> int:
        """
        MATT5(2403,24,238)
        checked NX-10.1, MSC-2016

        """
        s = Struct(self._endian + b'10i')
        ntotal = 40  # 10*4
        ncards = (len(data) - n) // ntotal
        for unused_i in range(ncards):
            edata = data[n:n + ntotal]
            out = s.unpack(edata)
            if self.is_debug_file:
                self.binary_debug.write('  MATT4=%s\n' % str(out))
            #(mid, kxx_table, kxy_table, kxz_table, kyy_table, kyz_table, kzz_table,
            # cp_table, null, hgen_table) = out
            mat = MATT5.add_op2_data(out)
            self._add_material_dependence_object(mat)
            n += ntotal
        self.increase_card_count('MATT5', ncards)
        return n