Exemplo n.º 1
0
 def accept(self):
     load_combinations = None
     selected_beams = self.form.selected_beams.isChecked()
     exclude_selected_beams = self.form.exclude_selected_beams.isChecked()
     beams_names = None
     if (selected_beams or exclude_selected_beams):
         beams, _  = self.etabs.frame_obj.get_beams_columns()
         names = self.etabs.select_obj.get_selected_obj_type(2)
         names = [name for name in names if self.etabs.frame_obj.is_beam(name)]
         if selected_beams:
             beams_names = set(names).intersection(beams)
         elif exclude_selected_beams:
             beams_names = set(beams).difference(names)
     phi = self.form.phi_spinbox.value()
     num_iteration = self.form.iteration_spinbox.value()
     tolerance = self.form.tolerance_spinbox.value()
     j_max_value = self.form.maxj_spinbox.value()
     j_min_value = self.form.minj_spinbox.value()
     initial_j = self.form.initial_checkbox.isChecked()
     initial_j = self.form.initial_spinbox.value() if initial_j else None
     decimals = self.form.rounding.isChecked()
     decimals = self.form.round_decimals.value() if decimals else None
     df = self.etabs.frame_obj.correct_torsion_stiffness_factor(
         load_combinations,
         beams_names,
         phi,
         num_iteration,
         tolerance,
         j_max_value,
         j_min_value,
         initial_j,
         decimals,
         )
     import table_model
     table_model.show_results(df, None, table_model.BeamsJModel, self.etabs.view.show_frame)
Exemplo n.º 2
0
    def accept(self):
        data, headers = self.etabs.database.get_hight_pressure_columns()
        import table_model
        table_model.show_results(
            data,
            headers,
            model=table_model.HighPressureColumnModel,
            function=self.etabs.view.show_frame,
        )

        def get_high_pressure_names():
            filt = data['high pressure'] == True
            df = data.loc[filt]
            return df['UniqueName']

        group_name = self.form.group_name.text(
        ) if self.form.group_checkbox.isChecked() else None
        if group_name:
            frame_names = get_high_pressure_names()
            if len(frame_names) == 0:
                return
            self.etabs.group.add(group_name)
            for name in frame_names:
                self.etabs.SapModel.FrameObj.SetGroupAssign(name, group_name)
        if self.form.select_all.isChecked():
            if group_name is None:
                frame_names = get_high_pressure_names()
            if len(frame_names) == 0:
                return
            self.etabs.view.show_frames(frame_names)
Exemplo n.º 3
0
    def accept(self):

        loadcases = []
        for lw in (self.form.x_loadcase_list, self.form.y_loadcase_list):
            for i in range(lw.count()):
                item = lw.item(i)
                if item.checkState() == Qt.Checked:
                    loadcases.append(item.text())
        data, headers = self.etabs.get_story_forces_with_percentages(
            loadcases=loadcases)
        import table_model
        table_model.show_results(data, headers, table_model.StoryForcesModel)
Exemplo n.º 4
0
 def accept(self):
     import table_model
     loadcases = []
     for lw in (self.form.x_loadcase_list, self.form.y_loadcase_list):
         for i in range(lw.count()):
             item = lw.item(i)
             if item.checkState() == Qt.Checked:
                 loadcases.append(item.text())
     df = self.etabs.get_diaphragm_max_over_avg_drifts(loadcases=loadcases)
     data, headers = df.values, list(df.columns)
     table_model.show_results(data, headers, table_model.TorsionModel,
                              self.etabs.view.show_point)
 def accept(self):
     if self.form.radio_button_2800.isChecked():
         way = '2800'
     if self.form.radio_button_modal.isChecked():
         way = 'modal'
     if self.form.radio_button_earthquake.isChecked():
         way = 'earthquake'
     ret = self.etabs.get_story_stiffness_table(way)
     if not ret:
         err = "Please Activate Calculate Diaphragm Center of Rigidity in ETABS!"
         QMessageBox.critical(None, "Error", err)
         return None
     data, headers = ret
     import table_model
     table_model.show_results(data, headers,
                              table_model.StoryStiffnessModel)
Exemplo n.º 6
0
 def check(self):
     filename = self.form.filename.text()
     file_path = Path(filename)
     if file_path.exists():
         filename = file_path
     data = self.etabs.frame_obj.require_100_30(
         self.ex,
         self.ey,
         filename,
         self.type_,
         self.code,
     )
     headers = list(data.columns)
     import table_model
     table_model.show_results(
         data,
         headers,
         model=table_model.Column100_30Model,
     )
Exemplo n.º 7
0
 def accept(self):
     use_json_file = self.form.file_groupbox.isChecked()
     dir_ = 'x' if self.form.x_radio_button.isChecked() else 'y'
     if use_json_file:
         json_file = Path(self.form.json_file.text())
     else:
         json_file = Path(self.etabs.SapModel.GetModelFilepath()
                          ) / f'columns_pmm_beams_rebars_{dir_}.json'
     if json_file.exists():
         import table_model
         ret = self.etabs.load_from_json(json_file)
         data, headers, data2, headers2 = ret
         table_model.show_results(data, headers,
                                  table_model.ColumnsRatioModel)
         table_model.show_results(data2, headers2,
                                  table_model.BeamsRebarsModel)
     else:
         err = "Please first get weakness ration, then show it!"
         QMessageBox.critical(self, "Error", str(err))
         return None
Exemplo n.º 8
0
 def accept(self):
     import table_model
     if not self.etabs.success:
         QMessageBox.warning(None, 'ETABS', 'Please open etabs file!')
         return False
     use_weakness_file = self.form.file_groupbox.isChecked()
     dir_ = 'x' if self.form.x_radio_button.isChecked() else 'y'
     if use_weakness_file:
         weakness_filepath = Path(self.form.weakness_file.text())
         if weakness_filepath.exists():
             ret = self.etabs.frame_obj.get_beams_columns_weakness_structure(
                 weakness_filename=weakness_filepath, dir_=dir_)
     else:
         ret = self.etabs.frame_obj.get_beams_columns_weakness_structure(
             dir_=dir_)
     if not ret:
         err = "Please select one beam in ETABS model!"
         QMessageBox.critical(self, "Error", str(err))
         return None
     data, headers, data2, headers2 = ret
     table_model.show_results(data, headers, table_model.ColumnsRatioModel)
     table_model.show_results(data2, headers2, table_model.BeamsRebarsModel)
 def accept(self):
     if self.form.radio_button_2800.isChecked():
         way = '2800'
     elif self.form.radio_button_modal.isChecked():
         way = 'modal'
     elif self.form.radio_button_earthquake.isChecked():
         way = 'earthquake'
     elif self.form.radio_button_file.isChecked():
         way = 'file'
     if way != 'file':
         e_name = self.etabs.get_file_name_without_suffix()
         name = f'{e_name}_story_stiffness_{way}_table.json'
         json_file = Path(self.etabs.SapModel.GetModelFilepath()) / name
     else:
         json_file = self.form.json_line_edit.text()
     ret = self.etabs.load_from_json(json_file)
     if not ret:
         err = "Can not find the results!"
         QMessageBox.critical(self, "Error", str(err))
         return None
     data, headers = ret
     import table_model
     table_model.show_results(data, headers, table_model.StoryStiffnessModel)
Exemplo n.º 10
0
 def accept(self):
     d = config.load(self.json_file)
     no_of_stories = d['no_of_story_x']
     cdx = d['cdx']
     cdy = d['cdy']
     bot_story = d["bot_x_combo"]
     top_story = d["top_x_combo"]
     create_t_file = self.form.create_t_file_box.isChecked()
     loadcases = []
     for lw in (self.form.x_loadcase_list, self.form.y_loadcase_list):
         for i in range(lw.count()):
             item = lw.item(i)
             if item.checkState() == Qt.Checked:
                 loadcases.append(item.text())
     if create_t_file:
         tx, ty, _ = self.etabs.get_drift_periods()
         config.save_analytical_periods(self.json_file, tx, ty)
         building = self.current_building(tx, ty)
         self.etabs.apply_cfactor_to_edb(building, bot_story, top_story)
     drifts, headers = self.etabs.get_drifts(no_of_stories, cdx, cdy,
                                             loadcases)
     import table_model
     table_model.show_results(drifts, headers, table_model.DriftModel)