Exemple #1
0
    def run(self, *event):
        if self.bolt_count < 2:
            pass

        else:
            xloc = []
            yloc = []

            p_xloc = float(self.load_x_gui.get())
            p_yloc = float(self.load_y_gui.get())
            p_angle = float(self.load_angle_gui.get())

            for x in self.bolt_x_gui:
                xloc.append(float(x.get()))

            for y in self.bolt_y_gui:
                yloc.append(float(y.get()))
            tol = self.tol_overide_gui.get()
            if tol == "--":
                tol = 0.000001
            else:
                tol = float(tol)

            res = bolt_ic.brandt(xloc, yloc, p_xloc, p_yloc, p_angle, tol)

            self.IC = res[1]
            self.Cu = res[2]
            self.detailed_out = res[0]

            self.ic_x_gui.set("{0:.3f}".format(self.IC[0]))
            self.ic_y_gui.set("{0:.3f}".format(self.IC[1]))
            self.cu_gui.set("{0:.3f}".format(self.Cu))
            self.solution_gui.set(self.detailed_out[12][1])
            self.cu_maybe_gui.set("{0:.3f}".format(self.detailed_out[15][1]))
            self.tol_achieved_gui.set("{:.3E}".format(
                min(self.detailed_out[17][0])))

            self.hasrun = 1
            self.draw_bolts()
            self.fill_details()
            self.draw_converge()
            self.draw_c_stability()
Exemple #2
0
    def run_aisc(self, *events):
        self.aisc_has_run = 0
        for element in self.aisc_result_labels:
            element.destroy()

        del self.aisc_result_labels[:]

        cols = int(self.aisc_numCols.get())
        rows = int(self.aisc_numRows.get())
        colspacing = float(self.aisc_colspacing.get())
        rowspacing = float(self.aisc_rowspacing.get())
        angle_input = float(self.aisc_loadangle.get())
        angle_use = 90 - angle_input

        if cols == 0 or rows == 0:
            pass
        else:

            x, y = bolt_ic.build_bolt_group(cols, rows, colspacing, rowspacing)

            cg = bolt_ic.bolt_group_center(x, y)

            i = 4
            for ex in self.aisc_ex:

                p_xloc = cg[0] + ex
                p_yloc = cg[1]
                p_angle = angle_use
                tol = 0.00001
                res = bolt_ic.brandt(x, y, p_xloc, p_yloc, p_angle, tol)

                c_string = '{0:.2f}'.format(res[2])
                label = tk.Label(self.aisc_verify_frame,
                                 text=c_string,
                                 font=self.helv)
                label.grid(row=i, column=1)
                self.aisc_result_labels.append(label)

                i += 1

            self.aisc_has_run = 1
            self.send_aisc_geometry(x, y)