def _read_pfast_nx(self, data, n): """ PFAST(3601,36,55) NX only """ ntotal = 48 s = Struct(b(self._endian + 'ifii 8f')) nproperties = (len(data) - n) // ntotal delta = (len(data) - n) % ntotal assert delta == 0, 'len(data)-n=%s n=%s' % (len(data) - n, (len(data) - n) / 48.) for i in range(nproperties): edata = data[n:n + ntotal] out = s.unpack(edata) if self.is_debug_file: self.binary_debug.write(' PFAST=%s\n' % str(out)) (pid, d, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, mass, ge) = out data_in = (pid, d, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, mass, ge) prop = PFAST.add_op2_data(data_in) self._add_op2_property(prop) n += ntotal self.card_count['PFAST'] = nproperties return n
def _read_pfast_msc(self, data, n): ntotal = 92 # 23*4 s = Struct(b(self._endian + "ifii 4f")) nproperties = (len(data) - n) // ntotal for i in range(nproperties): edata = data[n : n + ntotal] out = s.unpack(edata) if self.is_debug_file: self.binary_debug.write(" PFAST=%s\n" % str(out)) ( pid, d, mcid, connbeh, conntype, extcon, condtype, weldtype, minlen, maxlen, gmcheck, spcgs, mass, ge, aa, bb, cc, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, ) = out data_in = (pid, d, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, mass, ge) prop = PFAST.add_op2_data(data_in) self._add_op2_property(prop) n += ntotal self.card_count["PFAST"] = nproperties return n
def _read_pfast_msc(self, data, n): ntotal = 92 # 23*4 s = Struct(b(self._endian + 'ifii 4f')) nproperties = (len(data) - n) // ntotal for i in range(nproperties): edata = data[n:n + ntotal] out = s.unpack(edata) if self.is_debug_file: self.binary_debug.write(' PFAST=%s\n' % str(out)) (pid, d, mcid, connbeh, conntype, extcon, condtype, weldtype, minlen, maxlen, gmcheck, spcgs, mass, ge, aa, bb, cc, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3) = out data_in = (pid, d, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, mass, ge) prop = PFAST.add_op2_data(data_in) self._add_op2_property(prop) n += ntotal self.card_count['PFAST'] = nproperties return n
def _read_pfast_nx(self, data, n): """ PFAST(3601,36,55) NX only """ ntotal = 48 s = Struct(b(self._endian + 'ifii 4f')) nproperties = (len(data) - n) // ntotal for i in range(nproperties): edata = data[n:n+ntotal] out = s.unpack(edata) if self.is_debug_file: self.binary_debug.write(' PFAST=%s\n' % str(out)) (pid, d, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, mass, ge) = out data_in = (pid, d, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, mass, ge) prop = PFAST.add_op2_data(data_in) self._add_op2_property(prop) n += ntotal self.card_count['PFAST'] = nproperties return n