main.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:ugm-kayu-nde 作者: mappuji 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号