def to_mat8(self) -> MAT8: return MAT8(self.mid, self.E1, self.E2, self.nu12, g12=self.G12, rho=self.rho, a1=self.alpha1, a2=self.alpha2)
def readMAT8(self, data): """ MAT8(2503,25,288) - record 7 """ #print "reading MAT8" while len(data) >= 76: # 19*4 data = data[76:] out = unpack('i18f', data[:76]) (mid, E1, E2, nu12, G12, G1z, G2z, rho, a1, a2, TRef, Xt, Xc, Yt, Yc, S, ge, f12, strn) = out self.addOp2Material(MAT8(None, out))
def _readMAT8(self, data, n): """ MAT8(2503,25,288) - record 7 """ #print "reading MAT8" s = Struct(b'i18f') nmaterials = (len(data) - n) // 76 for i in xrange(nmaterials): out = s.unpack(data[n:n+76]) (mid, E1, E2, nu12, G12, G1z, G2z, rho, a1, a2, TRef, Xt, Xc, Yt, Yc, S, ge, f12, strn) = out self.addOp2Material(MAT8(None, out)) n += 76 self.card_count['MAT8'] = nmaterials
def _read_mat8(self, data, n): """ MAT8(2503,25,288) - record 7 """ s = Struct(self._endian + b'i18f') nmaterials = (len(data) - n) // 76 for i in range(nmaterials): out = s.unpack(data[n:n + 76]) #(mid, E1, E2, nu12, G12, G1z, G2z, rho, a1, a2, # tref, Xt, Xc, Yt, Yc, S, ge, f12, strn) = out mat = MAT8.add_op2_data(out) self.add_op2_material(mat) n += 76 self.card_count['MAT8'] = nmaterials return n
def _read_mat8(self, data, n): """ MAT8(2503,25,288) - record 7 """ s = Struct(b(self._endian + 'i18f')) nmaterials = (len(data) - n) // 76 for i in range(nmaterials): out = s.unpack(data[n:n+76]) (mid, E1, E2, nu12, G12, G1z, G2z, rho, a1, a2, TRef, Xt, Xc, Yt, Yc, S, ge, f12, strn) = out mat = MAT8.add_op2_data(out) self.add_op2_material(mat) n += 76 self.card_count['MAT8'] = nmaterials return n
def _read_mat8(self, data: bytes, n: int) -> int: """ MAT8(2503,25,288) - record 7 """ ntotal = 76 * self.factor s = Struct(mapfmt(self._endian + b'i18f', self.size)) nmaterials = (len(data) - n) // ntotal for unused_i in range(nmaterials): out = s.unpack(data[n:n + ntotal]) #(mid, E1, E2, nu12, G12, G1z, G2z, rho, a1, a2, # tref, Xt, Xc, Yt, Yc, S, ge, f12, strn) = out mat = MAT8.add_op2_data(out) self.add_op2_material(mat) n += ntotal self.card_count['MAT8'] = nmaterials return n