def calculated_moe(self):
""" Show the calculated MOE
"""
weight = float(self.kayu_weight)
length = float(self.kayu_length)
thick_x = float(self.kayu_thick_x)
thick_y = float(self.kayu_thick_y)
naturfreq = float(self.kayu_naturfreq) / 1000
self.kayu = modules.Kayu(weight, length, \
thick_x, thick_y)
self.kayu.set_freq(naturfreq)
moe = self.kayu.get_moe()
woodname_str = "The " + self.kayu_name + " wood with\n"
naturfreq_str = "Natural Freq = " + str(self.kayu.get_freq()) + FREQ_UNIT + "\n"
length_str = "Length = " + str(self.kayu.length) + LENGTH_UNIT + "\n"
density_str = "Density = " + str(self.kayu.density) + DENSITY_UNIT + "\n"
moe_str = "Has MOE = " + str(moe) + MOE_UNIT +"\n"
moe_sni = "Has SNI CLASS = " + modules.sni_class(moe) +"\n"
messagebox.showinfo("Results!", woodname_str + naturfreq_str \
+ length_str + density_str + moe_str + moe_sni)
评论列表
文章目录