diff --git a/src/Model/Geometry/ProfileXYZ.py b/src/Model/Geometry/ProfileXYZ.py index 7036750ab887bf15cab587e903057da059358c41..fcf3b62c29f99042d4534836577e0471275630c9 100644 --- a/src/Model/Geometry/ProfileXYZ.py +++ b/src/Model/Geometry/ProfileXYZ.py @@ -73,7 +73,10 @@ class ProfileXYZ(Profile): Returns: Profile header. """ - return np.array([self._num, self._code1, self._code2, self._nb_points, self._kp, self._name]) + return np.array( + [self._num, self._code1, self._code2, + self._nb_points, self._kp, self._name] + ) def import_points(self, list_points: list): """Import a list of points to profile @@ -100,7 +103,7 @@ class ProfileXYZ(Profile): try: return self._list_points[index] except IndexError: - raise IndexError(f"Le profil a moins de {index} points !") + raise IndexError(f"Invalid point index: {index}") def add(self): """Add a new PointXYZ to profile. @@ -123,7 +126,7 @@ class ProfileXYZ(Profile): try: self._list_points.pop(index) except IndexError: - raise IndexError(f"Suppression échouée, l'indice {index} n'existe pas !") + raise IndexError(f"Invalid point index: {index}") def insert(self, index: int): """Insert a new profile at index. @@ -154,10 +157,12 @@ class ProfileXYZ(Profile): try: self._list_points.pop(idx) except IndexError: - print("Liste vide, rien à supprimer !") + print("Empty list, nothing to delete") except TypeError: if isinstance(list_index, int): self._list_points.pop(list_index) - print(f"\nSuppression --> attention !!!!\nL'argument {list_index} doit être une liste!\n") + print(f"\n{list_index} is not a list\n") else: - raise TypeError(f"L'argument {list_index} fourni est de type incorrect") + raise TypeError( + f"{list_index} is instance of unexpected type '{type(list_index)}'" + ) diff --git a/src/Model/Geometry/Reach.py b/src/Model/Geometry/Reach.py index bceab6cd4b1af918b2e3ede2c406b30977f27d43..eca5a529e4d82f4bdaae5b048d02aa1f19a7cd77 100644 --- a/src/Model/Geometry/Reach.py +++ b/src/Model/Geometry/Reach.py @@ -10,6 +10,8 @@ from operator import itemgetter from Model.Geometry.Profile import Profile from Model.Geometry.ProfileXYZ import ProfileXYZ +from Model.Except import FileFormatError, exception_message_box + class Reach: def __init__(self, edge): self._edge = edge @@ -45,7 +47,7 @@ class Reach: try: return self._list_profiles[i] except IndexError: - raise IndexError(f"Le bief a moins de {i} profil(s)") + raise IndexError(f"Invalid profile index: {i}") def add_XYZ(self): """Add a new profile at the end of profiles list @@ -98,14 +100,13 @@ class Reach: self._list_profiles.pop(idx) self._update_profile_numbers() except IndexError: - print("Liste vide, rien à supprimer !") + print(f"Invalid profile index: {idx}") except TypeError: if isinstance(list_index, int): self._list_profiles.pop(list_index) self._update_profile_numbers() - print(f"\nSuppression --> attention !!!!\nL'argument {list_index} doit être une liste!\n") else: - raise TypeError(f"L'argument {list_index} fourni est de type incorrect") + raise TypeError(f"{list_index} is instance of unexpected type '{type(list_index)}'") def _sort(self, is_reversed: bool = False): self._list_profiles = sorted( @@ -137,13 +138,12 @@ class Reach: try: self.__list_copied_profiles.append(deepcopy(self.get_profile_i(index))) except IndexError: - raise IndexError(f"Echec de la copie, l'indice {index} n'existe pas !") + raise IndexError(f"Invalid profile index: {index}") def paste(self): if self.__list_copied_profiles: for profile in self.__list_copied_profiles: self._list_profiles.append(profile) - print("self.__list_copied_profiles", self.__list_copied_profiles, "\n *****") def import_geometry(self, file_path_name: str): """Import a geometry from file (.ST or .st) @@ -154,16 +154,21 @@ class Reach: Returns: Nothing. """ - list_profile, list_header = self.read_file_st(str(file_path_name)) - - if list_profile and list_header: - for ind, profile in enumerate(list_profile): - prof = ProfileXYZ(*list_header[ind]) - prof.import_points(profile) - self._list_profiles.append(prof) - self._update_profile_numbers() - else: - print("Fichier introuvable ou non conforme !") + try: + list_profile, list_header = self.read_file_st(str(file_path_name)) + + if list_profile and list_header: + for ind, profile in enumerate(list_profile): + prof = ProfileXYZ(*list_header[ind]) + prof.import_points(profile) + self._list_profiles.append(prof) + self._update_profile_numbers() + except FileNotFoundError as e: + print(e) + exception_message_box(e) + except FileFormatError as e: + print(e) + e.alert() def read_file_st(self): """Read the ST file @@ -177,43 +182,45 @@ class Reach: list_profile = [] list_header = [] stop_code = "999.999" - try: - with open(self.file_st, encoding="utf-8") as file_st: - for line in file_st: - if not (line.startswith("#") or line.startswith("*")): - line = line.split() - if line_is_header: - if len(line) >= 6: - list_header.append(line[:6]) - elif len(line) == 5: + + with open(self.file_st, encoding="utf-8") as file_st: + for line in file_st: + if not (line.startswith("#") or line.startswith("*")): + line = line.split() + + if line_is_header: + if len(line) >= 6: + list_header.append(line[:6]) + elif len(line) == 5: + line.append("") + list_header.append(line) + else: + print(f"Point {line} invalide ==> pas pris en compte") + line_is_header = False + else: + # Read until "999.9990 999.9990" as found + if len(line) == 3: + x, y, z = line + if stop_code in x and stop_code in y: + line_is_header = True + list_profile.append(list_point_profile) + list_point_profile = [] + else: line.append("") - list_header.append(line) + list_point_profile.append(line) + elif len(line) == 4: + x, y, z, ld = line + if stop_code in x and stop_code in y: + list_profile.append(list_point_profile) + list_point_profile = [] + line_is_header = True else: - print(f"Point {line} invalide ==> pas pris en compte") - line_is_header = False + list_point_profile.append(line) else: - # Read until "999.9990 999.9990" as found - if len(line) == 3: - x, y, z = line - if stop_code in x and stop_code in y: - line_is_header = True - list_profile.append(list_point_profile) - list_point_profile = [] - else: - line.append("") - list_point_profile.append(line) - elif len(line) == 4: - x, y, z, ld = line - if stop_code in x and stop_code in y: - list_profile.append(list_point_profile) - list_point_profile = [] - line_is_header = True - else: - list_point_profile.append(line) - else: - pass + pass + + if list_profile and list_header: + raise FileFormatError(self.file_st, f"{list_profile}, {list_header}") - except FileNotFoundError: - print(f"\n \n %%%%%% Fichier : {self.file_st} introuvable !! %%%%%%") print("****** Fichier {} lu et traité en {} secondes *******".format(self.file_st, time() - t0)) return list_profile, list_header diff --git a/src/View/ASubWindow.py b/src/View/ASubWindow.py index a2bd75492167012cc91d2bb299c823dc6fcb1082..cbb49ae13782a01efa98c4196496053d181ece4f 100644 --- a/src/View/ASubWindow.py +++ b/src/View/ASubWindow.py @@ -60,7 +60,11 @@ class ASubWindow(QDialog): Returns: Nothing """ - self.find(QLineEdit, name).setText(text) + try: + self.find(QLineEdit, name).setText(text) + except AttributeError as e: + print(e) + print(f"{name}") def get_line_edit_text(self, name:str): """Get text of line edit component @@ -283,7 +287,7 @@ class ASubWindow(QDialog): msg.setInformativeText(f"{informative_text}") msg.setWindowTitle(f"{window_title}") # msg.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel) - _width = len(f"{text} : {value}") - msg.setStyleSheet("QLabel{min-width:200 px; font-size: 13px;} QPushButton{width:10px; font-size: 12px};" - "background-color: Ligthgray; color : gray; font-size: 8pt; color: #888a80;") + # _width = len(f"{text} : {value}") + # msg.setStyleSheet("QLabel{min-width:200 px; font-size: 13px;} QPushButton{width:10px; font-size: 12px};" + # "background-color: Ligthgray; color : gray; font-size: 8pt; color: #888a80;") msg.exec_() diff --git a/src/View/ConfigureWindow.py b/src/View/ConfigureWindow.py index 80ef05af7aab4ca6921067bd0a7598d7b1841ec4..ff3f1b94531ba5cae47d66e068aad8f3f5d7446c 100644 --- a/src/View/ConfigureWindow.py +++ b/src/View/ConfigureWindow.py @@ -75,8 +75,8 @@ class ConfigureWindow(ASubWindow, ListedSubWindow): self.find(QTableView, "tableView_solver")\ .setSelectionBehavior(QAbstractItemView.SelectRows) - # Mailleur - self.set_line_edit_text("lineEdit_mailleur", self.conf.mailleur) + # Meshing_Tool + self.set_line_edit_text("lineEdit_meshing_tool", self.conf.meshing_tool) # Const self.set_line_edit_text("lineEdit_segment", str(self.conf.segment)) @@ -109,10 +109,10 @@ class ConfigureWindow(ASubWindow, ListedSubWindow): "lineEdit_backup_path", f[0] ) ), - "pushButton_mailleur" : lambda: self.file_dialog( + "pushButton_meshing_tool" : lambda: self.file_dialog( select_file = True, callback = lambda f: self.set_line_edit_text( - "lineEdit_mailleur", f[0] + "lineEdit_meshing_tool", f[0] ) ), } @@ -124,8 +124,8 @@ class ConfigureWindow(ASubWindow, ListedSubWindow): # Solvers self.conf.solvers = self.solver_table_model.rows.copy() - # Mailleur - self.conf.mailleur = self.get_line_edit_text("lineEdit_mailleur") + # Meshing_Tool + self.conf.meshing_tool = self.get_line_edit_text("lineEdit_meshing_tool") # Const self.conf.segment = self.get_line_edit_text("lineEdit_segment") diff --git a/src/View/ui/ConfigureDialog.ui b/src/View/ui/ConfigureDialog.ui index 2332d7f4e29c9265a494e64d8672dd7080e1c4ac..5ddf767a7672eb390a65e2a44d5ee39aea23279d 100644 --- a/src/View/ui/ConfigureDialog.ui +++ b/src/View/ui/ConfigureDialog.ui @@ -127,10 +127,10 @@ </widget> </item> <item> - <widget class="QLineEdit" name="lineEdit_mailleur_2"/> + <widget class="QLineEdit" name="lineEdit_meshing_tool"/> </item> <item> - <widget class="QPushButton" name="pushButton_mailleur_2"> + <widget class="QPushButton" name="pushButton_meshing_tool"> <property name="text"> <string/> </property> diff --git a/src/View/ui/MainWindow_old.ui b/src/View/ui/MainWindow_old.ui deleted file mode 100644 index 3824a981a413d57f0c864da88a97a6109ec09af7..0000000000000000000000000000000000000000 --- a/src/View/ui/MainWindow_old.ui +++ /dev/null @@ -1,908 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>MainWindow</class> - <widget class="QMainWindow" name="MainWindow"> - <property name="windowModality"> - <enum>Qt::ApplicationModal</enum> - </property> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>850</width> - <height>646</height> - </rect> - </property> - <property name="font"> - <font> - <family>Serif</family> - <weight>75</weight> - <bold>true</bold> - <kerning>false</kerning> - </font> - </property> - <property name="mouseTracking"> - <bool>true</bool> - </property> - <property name="contextMenuPolicy"> - <enum>Qt::NoContextMenu</enum> - </property> - <property name="acceptDrops"> - <bool>true</bool> - </property> - <property name="windowTitle"> - <string>PAMHYR</string> - </property> - <property name="windowIcon"> - <iconset> - <normaloff>ressources/M_icon.png</normaloff>ressources/M_icon.png</iconset> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="documentMode"> - <bool>false</bool> - </property> - <widget class="QWidget" name="centralwidget"> - <property name="contextMenuPolicy"> - <enum>Qt::NoContextMenu</enum> - </property> - </widget> - <widget class="QMenuBar" name="menubar"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>850</width> - <height>23</height> - </rect> - </property> - <property name="font"> - <font> - <family>Sans Serif</family> - </font> - </property> - <widget class="QMenu" name="menu_File"> - <property name="title"> - <string>&Fichier</string> - </property> - <addaction name="actionR_seau"/> - <addaction name="actionNouvelle_tude_RubarBE"/> - <addaction name="separator"/> - <addaction name="actionOuvrir_une_tude_2"/> - <addaction name="separator"/> - <addaction name="actionImporter_un_jeu_de_donn_es_MAGE"/> - <addaction name="actionImporter_un_jeu_de_donn_es_RubarBE"/> - <addaction name="separator"/> - <addaction name="separator"/> - <addaction name="actionFermer"/> - <addaction name="separator"/> - <addaction name="actionEnregistrer"/> - <addaction name="actionEnregistrer_2"/> - <addaction name="actionEnregistrer_sous"/> - <addaction name="actionArchiver"/> - <addaction name="separator"/> - <addaction name="separator"/> - <addaction name="actionConfiguration_de_Pamhyr"/> - <addaction name="separator"/> - <addaction name="actionQuitter"/> - <addaction name="separator"/> - </widget> - <widget class="QMenu" name="menu_R_seau"> - <property name="title"> - <string>&Réseau</string> - </property> - <addaction name="actionEditer_le_r_seau"/> - </widget> - <widget class="QMenu" name="menuG_om_trie"> - <property name="title"> - <string>&Géométrie</string> - </property> - <widget class="QMenu" name="menuComparer"> - <property name="title"> - <string>Comparer</string> - </property> - <widget class="QMenu" name="menuProfil_en_travers"> - <property name="title"> - <string>Profil en travers</string> - </property> - <addaction name="actionAbscisse_Cote"/> - <addaction name="actionXYZ"/> - </widget> - <addaction name="menuProfil_en_travers"/> - </widget> - <addaction name="action_diter_la_g_om_trie"/> - <addaction name="separator"/> - <addaction name="actionImporter_la_g_om_trie"/> - <addaction name="actionExporter_la_g_om_trie"/> - <addaction name="separator"/> - <addaction name="actionLancer_le_mailleur_externe"/> - <addaction name="actionChoix_du_maileur_par_bief"/> - <addaction name="actionVisulaiser_la_g_om_trie_maill_e"/> - <addaction name="actionExporter_le_maillage"/> - <addaction name="actionSupprimer_le_maillage_du_bief_courant"/> - <addaction name="actionSupprimer_l_ensemble_du_maillage"/> - <addaction name="separator"/> - <addaction name="separator"/> - <addaction name="menuComparer"/> - </widget> - <widget class="QMenu" name="menu_x_cuter"> - <property name="title"> - <string>&Exécuter</string> - </property> - <widget class="QMenu" name="menuSous_tude_Rubar3"> - <property name="title"> - <string>Sous-étude Rubar3</string> - </property> - <addaction name="actionOuvrir"/> - <addaction name="actionFermer_2"/> - </widget> - <addaction name="actionParam_tres_num_riques_du_solveur_MAGE"/> - <addaction name="actionSolveur_MAGE"/> - <addaction name="actionStop_solveur"/> - <addaction name="actionAfficher_les_listings"/> - <addaction name="actionGestion_de_r_pertoire_de_simulation"/> - <addaction name="separator"/> - <addaction name="menuSous_tude_Rubar3"/> - </widget> - <widget class="QMenu" name="menu_Hydraulique"> - <property name="title"> - <string>&Hydraulique</string> - </property> - <addaction name="actionConditions_aux_limites_Apports_lat_raux"/> - <addaction name="separator"/> - <addaction name="actionConditions_initiales"/> - <addaction name="actionActiver_D_sactiver_l_export"/> - <addaction name="actionImporter_l_tat_final_comme_tat_initial"/> - <addaction name="separator"/> - <addaction name="action_dition_des"/> - <addaction name="action_dition_des_Apports_Lat_raux"/> - <addaction name="action_dition_des_d_versements"/> - <addaction name="separator"/> - <addaction name="action_dition_des_ouvrages_en_travers"/> - </widget> - <widget class="QMenu" name="menuGraphiques"> - <property name="title"> - <string>&Graphiques</string> - </property> - <addaction name="actionHydrogramme"/> - <addaction name="actionLimnigramme"/> - <addaction name="actionLigne_d_eau"/> - <addaction name="actionLigne_d_eau_finale"/> - <addaction name="actionLigne_d_eau_enveloppe"/> - <addaction name="actionVitesse_Pk_t_fix"/> - <addaction name="actionVitesse_t_Pk_fix"/> - <addaction name="actionCharge_hydraulique_Pk_t_fix"/> - <addaction name="actionCharge_hydraulique_t_Pk_fix"/> - <addaction name="actionVoir_l_animation_MAGE"/> - <addaction name="actionAutres_r_sulats_MAGE"/> - </widget> - <widget class="QMenu" name="menuCartographie"> - <property name="title"> - <string>&Cartographie</string> - </property> - <addaction name="actionCartographier_le_bief_courant"/> - </widget> - <widget class="QMenu" name="menuAide"> - <property name="title"> - <string>&Aide</string> - </property> - <addaction name="actionAide_de_PAMHYR"/> - <addaction name="actionAide_de_MAGE"/> - <addaction name="actionA_propos"/> - </widget> - <addaction name="menu_File"/> - <addaction name="menu_R_seau"/> - <addaction name="menuG_om_trie"/> - <addaction name="menu_Hydraulique"/> - <addaction name="menu_x_cuter"/> - <addaction name="menuGraphiques"/> - <addaction name="menuCartographie"/> - <addaction name="menuAide"/> - </widget> - <widget class="QStatusBar" name="statusbar"/> - <widget class="QToolBar" name="toolBar"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <weight>50</weight> - <bold>false</bold> - <kerning>true</kerning> - </font> - </property> - <property name="mouseTracking"> - <bool>true</bool> - </property> - <property name="focusPolicy"> - <enum>Qt::ClickFocus</enum> - </property> - <property name="contextMenuPolicy"> - <enum>Qt::NoContextMenu</enum> - </property> - <property name="windowTitle"> - <string>toolBar</string> - </property> - <property name="whatsThis"> - <string/> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="movable"> - <bool>true</bool> - </property> - <property name="floatable"> - <bool>false</bool> - </property> - <attribute name="toolBarArea"> - <enum>TopToolBarArea</enum> - </attribute> - <attribute name="toolBarBreak"> - <bool>false</bool> - </attribute> - <addaction name="actionOuvrir_une_tude"/> - <addaction name="actionenregistrer_etude_en_cours"/> - <addaction name="actionfermer_etude_en_cours"/> - <addaction name="actionquitter_application"/> - <addaction name="actionlancer_solveur"/> - <addaction name="actioninterrompt_simulation_en_cours"/> - <addaction name="actionafficher_listings_simulation"/> - <addaction name="separator"/> - <addaction name="actionReseau"/> - <addaction name="actionGeometrie"/> - <addaction name="actionMaillage"/> - <addaction name="actionlancer_mailleur_externe"/> - </widget> - <widget class="QToolBar" name="toolBar_2"> - <property name="font"> - <font> - <family>Sans Serif</family> - <pointsize>9</pointsize> - <weight>50</weight> - <italic>false</italic> - <bold>false</bold> - </font> - </property> - <property name="windowTitle"> - <string>toolBar_2</string> - </property> - <attribute name="toolBarArea"> - <enum>TopToolBarArea</enum> - </attribute> - <attribute name="toolBarBreak"> - <bool>true</bool> - </attribute> - <addaction name="actionCond_Limites"/> - <addaction name="separator"/> - <addaction name="actionApp_Lat_raux"/> - <addaction name="separator"/> - <addaction name="actionDeversements"/> - <addaction name="separator"/> - <addaction name="actionTroncons"/> - <addaction name="separator"/> - <addaction name="actionFrottements"/> - <addaction name="separator"/> - <addaction name="actionOuvrages"/> - <addaction name="separator"/> - </widget> - <action name="actionR_seau"> - <property name="checkable"> - <bool>false</bool> - </property> - <property name="icon"> - <iconset> - <normaloff>ressources/edit.png</normaloff>ressources/edit.png</iconset> - </property> - <property name="text"> - <string>Nouvelle étude MAGE</string> - </property> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="shortcut"> - <string>Ctrl+N</string> - </property> - </action> - <action name="actionOuvrir_une_tude"> - <property name="icon"> - <iconset> - <normaloff>ressources/open.png</normaloff>ressources/open.png</iconset> - </property> - <property name="text"> - <string>Ouvrir une étude</string> - </property> - </action> - <action name="actionNouvelle_tude_RubarBE"> - <property name="text"> - <string>Nouvelle étude RubarBE</string> - </property> - <property name="shortcut"> - <string>Ctrl+R</string> - </property> - </action> - <action name="actionOuvrir_une_tude_2"> - <property name="icon"> - <iconset> - <normalon>ressources/open.png</normalon> - </iconset> - </property> - <property name="text"> - <string>Ouvrir une étude</string> - </property> - <property name="shortcut"> - <string>Ctrl+O</string> - </property> - </action> - <action name="actionImporter_un_jeu_de_donn_es_MAGE"> - <property name="text"> - <string>Importer un jeu de données MAGE</string> - </property> - <property name="statusTip"> - <string/> - </property> - </action> - <action name="actionImporter_un_jeu_de_donn_es_RubarBE"> - <property name="text"> - <string>Importer un jeu de données RubarBE</string> - </property> - </action> - <action name="actionFermer"> - <property name="icon"> - <iconset> - <normaloff>../ressources/menu/gtk-close.png</normaloff>../ressources/menu/gtk-close.png</iconset> - </property> - <property name="text"> - <string>Fermer</string> - </property> - </action> - <action name="actionEnregistrer"> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Enregistrer le maillage</string> - </property> - </action> - <action name="actionEnregistrer_2"> - <property name="icon"> - <iconset> - <normaloff>ressources/gtk-save.png</normaloff>ressources/gtk-save.png</iconset> - </property> - <property name="text"> - <string>Enregistrer</string> - </property> - <property name="shortcut"> - <string>Ctrl+S</string> - </property> - </action> - <action name="actionEnregistrer_sous"> - <property name="icon"> - <iconset> - <normaloff>ressources/gtk-save-as.png</normaloff>ressources/gtk-save-as.png</iconset> - </property> - <property name="text"> - <string>Enregistrer sous ...</string> - </property> - <property name="shortcut"> - <string>Ctrl+Shift+S</string> - </property> - </action> - <action name="actionArchiver"> - <property name="text"> - <string>Archiver</string> - </property> - </action> - <action name="actionConfiguration_de_Pamhyr"> - <property name="text"> - <string>Configuration de Pamhyr</string> - </property> - </action> - <action name="actionQuitter"> - <property name="icon"> - <iconset> - <normaloff>../ressources/menu/gtk-quit.png</normaloff>../ressources/menu/gtk-quit.png</iconset> - </property> - <property name="text"> - <string>Quitter</string> - </property> - <property name="shortcut"> - <string>Ctrl+F4</string> - </property> - </action> - <action name="actionEditer_le_r_seau"> - <property name="text"> - <string> Éditer le réseau</string> - </property> - </action> - <action name="action_diter_la_g_om_trie"> - <property name="text"> - <string>Éditer la géométrie </string> - </property> - </action> - <action name="actionImporter_la_g_om_trie"> - <property name="text"> - <string>Importer une géométrie</string> - </property> - </action> - <action name="actionExporter_la_g_om_trie"> - <property name="text"> - <string>Exporter la géométrie</string> - </property> - </action> - <action name="actionLancer_le_mailleur_externe"> - <property name="text"> - <string>Lancer le mailleur externe</string> - </property> - </action> - <action name="actionChoix_du_maileur_par_bief"> - <property name="text"> - <string>Choix du mailleur par bief</string> - </property> - </action> - <action name="actionVisulaiser_la_g_om_trie_maill_e"> - <property name="text"> - <string>Visualiser la géométrie maillée</string> - </property> - </action> - <action name="actionExporter_le_maillage"> - <property name="text"> - <string>Exporter le maillage </string> - </property> - </action> - <action name="actionSupprimer_le_maillage_du_bief_courant"> - <property name="text"> - <string>Supprimer le maillage du bief courant</string> - </property> - </action> - <action name="actionSupprimer_l_ensemble_du_maillage"> - <property name="text"> - <string>Supprimer l'ensemble des maillages</string> - </property> - </action> - <action name="actionAbscisse_Cote"> - <property name="text"> - <string>Abscisse - Cote</string> - </property> - </action> - <action name="actionXYZ"> - <property name="text"> - <string>XYZ</string> - </property> - </action> - <action name="actionParam_tres_num_riques_du_solveur_MAGE"> - <property name="text"> - <string>Paramètres numériques du solveur MAGE</string> - </property> - </action> - <action name="actionConditions_aux_limites_Apports_lat_raux"> - <property name="text"> - <string>Conditions aux Limites & Apports Ponctuels</string> - </property> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - </action> - <action name="actionConditions_initiales"> - <property name="text"> - <string>Conditions initiales</string> - </property> - </action> - <action name="actionActiver_D_sactiver_l_export"> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="text"> - <string>Activer/Désactiver l'export des conditions initiales</string> - </property> - </action> - <action name="actionImporter_l_tat_final_comme_tat_initial"> - <property name="text"> - <string>Importer l'état final comme état initial</string> - </property> - </action> - <action name="action_dition_des"> - <property name="text"> - <string>Édition des Frottements</string> - </property> - </action> - <action name="action_dition_des_Apports_Lat_raux"> - <property name="text"> - <string>Édition des Apports Latéraux</string> - </property> - </action> - <action name="action_dition_des_d_versements"> - <property name="text"> - <string>Édition des déversements</string> - </property> - </action> - <action name="action_dition_des_Tron_ons"> - <property name="text"> - <string>Édition des Tronçons</string> - </property> - </action> - <action name="action_dition_des_ouvrages_en_travers"> - <property name="text"> - <string>Édition des ouvrages en travers</string> - </property> - </action> - <action name="actionSolveur_MAGE"> - <property name="text"> - <string>Solveur MAGE</string> - </property> - </action> - <action name="actionStop_solveur"> - <property name="text"> - <string>Stop Solveur</string> - </property> - </action> - <action name="actionAfficher_les_listings"> - <property name="text"> - <string>Afficher les listings</string> - </property> - </action> - <action name="actionGestion_de_r_pertoire_de_simulation"> - <property name="text"> - <string>Gestion des répertoires de simulation</string> - </property> - </action> - <action name="actionOuvrir"> - <property name="text"> - <string>Ouvrir</string> - </property> - </action> - <action name="actionFermer_2"> - <property name="text"> - <string>Fermer</string> - </property> - </action> - <action name="actionHydrogramme"> - <property name="text"> - <string>Hydrogramme</string> - </property> - <property name="font"> - <font> - <family>Ubuntu</family> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - </action> - <action name="actionLimnigramme"> - <property name="text"> - <string>Limnigramme</string> - </property> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - </action> - <action name="actionLigne_d_eau"> - <property name="text"> - <string>Ligne d'eau</string> - </property> - </action> - <action name="actionLigne_d_eau_finale"> - <property name="text"> - <string>Ligne d'eau finale</string> - </property> - </action> - <action name="actionLigne_d_eau_enveloppe"> - <property name="text"> - <string>Ligne d'eau enveloppe</string> - </property> - </action> - <action name="actionVitesse_Pk_t_fix"> - <property name="text"> - <string>Vitesse(Pk) à t fixé</string> - </property> - </action> - <action name="actionVitesse_t_Pk_fix"> - <property name="text"> - <string>Vitesse(t) à Pk fixé</string> - </property> - </action> - <action name="actionCharge_hydraulique_Pk_t_fix"> - <property name="text"> - <string>Charge hydraulique(Pk) à t fixé</string> - </property> - </action> - <action name="actionCharge_hydraulique_t_Pk_fix"> - <property name="text"> - <string>Charge hydraulique(t) à Pk fixé</string> - </property> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - </action> - <action name="actionVoir_l_animation_MAGE"> - <property name="text"> - <string>Voir l'animation (MAGE)</string> - </property> - </action> - <action name="actionAutres_r_sulats_MAGE"> - <property name="text"> - <string>Autres résulats MAGE</string> - </property> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - </action> - <action name="actionCartographier_le_bief_courant"> - <property name="text"> - <string>Cartographier le bief courant</string> - </property> - </action> - <action name="actionAide_de_PAMHYR"> - <property name="text"> - <string>Aide de PAMHYR</string> - </property> - </action> - <action name="actionAide_de_MAGE"> - <property name="text"> - <string>Aide de MAGE</string> - </property> - </action> - <action name="actionA_propos"> - <property name="text"> - <string>À propos</string> - </property> - </action> - <action name="actionouvrir"> - <property name="icon"> - <iconset> - <normaloff>../ressources/menu/open.png</normaloff>../ressources/menu/open.png</iconset> - </property> - <property name="text"> - <string>ouvrir</string> - </property> - <property name="toolTip"> - <string>Ouvrir une étude</string> - </property> - </action> - <action name="actionenregistrer_etude_en_cours"> - <property name="icon"> - <iconset> - <normaloff>ressources/save.png</normaloff>ressources/save.png</iconset> - </property> - <property name="text"> - <string>enregistrer_etude_en_cours</string> - </property> - <property name="toolTip"> - <string>Enrégistrer étude en cours (Ctrl+S)</string> - </property> - <property name="shortcut"> - <string/> - </property> - </action> - <action name="actionfermer_etude_en_cours"> - <property name="icon"> - <iconset> - <normaloff>ressources/gtk-close.png</normaloff>ressources/gtk-close.png</iconset> - </property> - <property name="text"> - <string>fermer_etude_en_cours</string> - </property> - <property name="toolTip"> - <string>Fermer étude en cours (Ctrl+F)</string> - </property> - <property name="shortcut"> - <string>Ctrl+F</string> - </property> - </action> - <action name="actionquitter_application"> - <property name="icon"> - <iconset> - <normaloff>ressources/exit_bis.png</normaloff>ressources/exit_bis.png</iconset> - </property> - <property name="text"> - <string>quitter_application</string> - </property> - <property name="toolTip"> - <string>Quitter l'application (Ctrl+Q)</string> - </property> - <property name="shortcut"> - <string>Ctrl+Q</string> - </property> - </action> - <action name="actionlancer_solveur"> - <property name="icon"> - <iconset> - <normaloff>ressources/gtk-execute.png</normaloff>ressources/gtk-execute.png</iconset> - </property> - <property name="text"> - <string>lancer_solveur</string> - </property> - <property name="toolTip"> - <string>Lancer le solveur pour réaliser une simulation</string> - </property> - <property name="shortcut"> - <string>Ctrl+X</string> - </property> - </action> - <action name="actioninterrompt_simulation_en_cours"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="icon"> - <iconset> - <normaloff>ressources/gtk-stop.png</normaloff>ressources/gtk-stop.png</iconset> - </property> - <property name="text"> - <string>interrompt_simulation_en_cours</string> - </property> - <property name="toolTip"> - <string>Interrompt la simulation en cours</string> - </property> - <property name="shortcut"> - <string>Ctrl+C</string> - </property> - </action> - <action name="actionlancer_mailleur_externe"> - <property name="icon"> - <iconset> - <normaloff>ressources/gnome-stock-insert-table.png</normaloff>ressources/gnome-stock-insert-table.png</iconset> - </property> - <property name="text"> - <string>lancer_mailleur_externe</string> - </property> - <property name="toolTip"> - <string>Lancer le mailleur externe sur la géométrie du bief courant</string> - </property> - </action> - <action name="actionafficher_listings_simulation"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="icon"> - <iconset> - <normaloff>ressources/gnome-stock-edit.png</normaloff>ressources/gnome-stock-edit.png</iconset> - </property> - <property name="text"> - <string>afficher_listings_simulation</string> - </property> - <property name="toolTip"> - <string>Aficher les listings de la simulation courante</string> - </property> - </action> - <action name="actionReseau"> - <property name="icon"> - <iconset> - <normaloff>ressources/reseau3_24.png</normaloff>ressources/reseau3_24.png</iconset> - </property> - <property name="text"> - <string>Réseau</string> - </property> - <property name="toolTip"> - <string>Ouvrir l'éditeur de la topologie du réseau</string> - </property> - </action> - <action name="actionGeometrie"> - <property name="icon"> - <iconset> - <normaloff>ressources/geometrie0.png</normaloff>ressources/geometrie0.png</iconset> - </property> - <property name="text"> - <string>Géométrie</string> - </property> - <property name="toolTip"> - <string>Ouvrir l'éditeur de géométrie</string> - </property> - </action> - <action name="actionMaillage"> - <property name="icon"> - <iconset> - <normaloff>ressources/mailles-50.png</normaloff>ressources/mailles-50.png</iconset> - </property> - <property name="text"> - <string>Maillage</string> - </property> - <property name="toolTip"> - <string>Afficher le maillage</string> - </property> - </action> - <action name="actionCond_Limites"> - <property name="text"> - <string>Cond. Limites</string> - </property> - <property name="toolTip"> - <string>Ouvir l'éditeur des Conditions aux Limites & Apports Ponctuels</string> - </property> - <property name="font"> - <font/> - </property> - </action> - <action name="actionApp_Lat_raux"> - <property name="text"> - <string>App. Latéraux</string> - </property> - <property name="toolTip"> - <string>Ouvrir l'éditeur des Apports Latéraux Distribués</string> - </property> - </action> - <action name="actionDeversements"> - <property name="text"> - <string>Déversements</string> - </property> - <property name="toolTip"> - <string>Ouvrir l'éditeur des Déversements Latéraux</string> - </property> - </action> - <action name="actionTroncons"> - <property name="text"> - <string>Tronçons</string> - </property> - <property name="toolTip"> - <string>Ouvrir l'éditeur des tronçons pour les frottements et Apports Latéraux</string> - </property> - </action> - <action name="actionFrottements"> - <property name="text"> - <string>Frottements</string> - </property> - <property name="toolTip"> - <string>Ouvrir l'éditeur des frottements au fond</string> - </property> - </action> - <action name="actionOuvrages"> - <property name="text"> - <string>Ouvrages</string> - </property> - <property name="toolTip"> - <string>Ouvrir l'éditeur des ouvrages (seuils, vannes, etc.), singularités et pompes</string> - </property> - </action> - </widget> - <resources/> - <connections> - <connection> - <sender>MainWindow</sender> - <signal>customContextMenuRequested(QPoint)</signal> - <receiver>MainWindow</receiver> - <slot>showMaximized()</slot> - <hints> - <hint type="sourcelabel"> - <x>346</x> - <y>301</y> - </hint> - <hint type="destinationlabel"> - <x>346</x> - <y>301</y> - </hint> - </hints> - </connection> - </connections> -</ui> diff --git a/src/config.py b/src/config.py index 1417e86df1d7620351a107a32ed3a790fbc0523f..79d0da5c889cc057483e8c888d2beb8d586c4390 100644 --- a/src/config.py +++ b/src/config.py @@ -17,8 +17,8 @@ class Config(object): # Solvers self.solvers = [] - # Mailleur - self.mailleur = "" + # Meshing tool + self.meshing_tool = "" # Const self.segment = 1000