]> SALOME platform Git repositories - modules/hydrosolver.git/commitdiff
Salome HOME
reactiver des imports commentés
authorPaul RASCLE <paul.rascle@edf.fr>
Thu, 2 Feb 2017 09:32:04 +0000 (10:32 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Thu, 2 Feb 2017 09:32:04 +0000 (10:32 +0100)
src/HYDROGUI/HYDROSOLVERGUI.py
src/salome_hydro/interpolz_gui.py

index c921a47368664c005d1f12aef6f802cbef540312..8d59403e0572ec33331bea589dd79ca16bd960dd 100755 (executable)
@@ -36,11 +36,11 @@ import HYDROSOLVER_ORB
 from salome.hydro.interpolz_gui import InterpolzDlg
 from salome.hydro.gui_utils import HSGUIException, wait_cursor, get_and_check_selected_file_path
 import salome.hydro.study as hydro_study
-#from salome.hydro.mascaret.eficas.appli import EficasForMascaretAppli
-#from salome.hydro.telemac2d.eficas.appli import EficasForTelemac2DAppli
-#from salome.hydro.coupling1d2d.eficas.appli import EficasForCoupling1D2DAppli
+from salome.hydro.mascaret.eficas.appli import EficasForMascaretAppli
+from salome.hydro.telemac2d.eficas.appli import EficasForTelemac2DAppli
+from salome.hydro.coupling1d2d.eficas.appli import EficasForCoupling1D2DAppli
 #import salome.hydro.pytel.gui as pytel_gui
-#from salome.hydro.boundary_conditions.eficas.appli import EficasForBoundaryConditionsAppli
+from salome.hydro.boundary_conditions.eficas.appli import EficasForBoundaryConditionsAppli
 
 import BndConditionsDialog
 
@@ -119,7 +119,7 @@ class GUIcontext:
         #a = sgPyQt.createAction( GUIcontext.CREATE_PYTEL_CASE_ID,
         #                         "Create case for Pytel execution", "Create case for Pytel execution",
         #                         "Create a new case for Pytel execution", "create_case_pytel.png" )
-       
+
         #sgPyQt.createMenu( a, mid )
         #sgPyQt.createTool( a, tid )
 
@@ -315,7 +315,7 @@ class MyTextDisplayDialog(Ui_TextDisplayDialog, QDialog):
         Ui_TextDisplayDialog.__init__(self)
         self.setupUi(self)
         (self.closeButton.clicked.connect(self.close)
-    
+
     def set_log(self, log):
         self.contentTextEdit.setPlainText(log)
         self.setWindowTitle("Coupling log")
index a3a5842978a7f3ddcc217b7fad286e404c9a92a8..22510d5a5d32b4bf47e0a62dae7b6a6cac7379c4 100644 (file)
@@ -1,9 +1,9 @@
 
 import sys, os
 #sys.path.append(os.path.join(os.environ['MEDFILE_ROOT_DIR'], 'lib/python2.7/site-packages/med'))
-sys.path.append(os.path.join(os.environ['MEDFICHIER_INSTALL_DIR'], 'lib/python2.7/site-packages/med'))
+#sys.path.append(os.path.join(os.environ['MEDFICHIER_INSTALL_DIR'], 'lib/python2.7/site-packages/med'))
 hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome', 'salome', 'hydro')
-sys.path.append(hydro_solver_root)
+#sys.path.append(hydro_solver_root)
 
 import salome
 salome.salome_init()
@@ -50,12 +50,12 @@ def get_hydro_regions( calc_case_name ):
       for r in regions:
         rname = r.GetName()
         regions_names.append( str(rname) )
-      
+
       shape_groups = case.GetGeometryGroups()
       for sg in shape_groups:
           sgname = sg.GetName()
           regions_names.append( sgname )
-      
+
       return regions_names
     else:
       return []
@@ -71,7 +71,7 @@ def get_selected_calc_case():
             if isinstance(case, HYDROPy.HYDROData_CalculationCase):
                 return name
     return None
-    
+
 class InterpolzDlg( QDialog ):
     def __init__(self, parent = None):
         QDialog.__init__( self, parent )
@@ -90,30 +90,30 @@ class InterpolzDlg( QDialog ):
         self.Apply.clicked.connect(self.onApply)
         self.Close.clicked.connect(self.onClose)
         self.Help.clicked.connect(self.onHelp)
-         
+
     def onSelectionChanged( self ):
         calc_case_name = get_selected_calc_case()
         if calc_case_name is not None:
           self.CalcCase.setText( calc_case_name )
-          
+
     def onOutputFile( self ):
       caption = "Python file"
       mask = "*.py"
       fname, filt = QFileDialog.getSaveFileName( self, caption, ".", mask )
       if fname!=None and fname!="":
         self.OutputPath.setText( fname )
-      
+
     def onMEDFile( self ):
       caption = "MED file"
       mask = "*.med"
       fname, filt = QFileDialog.getOpenFileName( self, caption, ".", mask )
       if fname!=None and fname!="":
         self.MEDFile.setText( fname )
-        
+
     def onCalcCaseChanged( self ):
       self.regions = get_hydro_regions( str(self.CalcCase.text()) )
       self.onMEDChanged()
-        
+
     def onMEDChanged( self ):
       self.med_groups = get_med_groups( str(self.MEDFile.text()) )
       print self.med_groups
@@ -124,7 +124,7 @@ class InterpolzDlg( QDialog ):
           self.Groups.setItem( i, 0, QTableWidgetItem() )
           self.Groups.setItem( i, 1, QTableWidgetItem() )
         self.Groups.item( i, 0 ).setText( self.med_groups[i] )
-        
+
         cb = QComboBox( self.Groups )
         for r in self.regions:
           cb.addItem( r )
@@ -133,7 +133,7 @@ class InterpolzDlg( QDialog ):
     def onApplyClose( self ):
         if self.onApply():
             self.onClose()
-        
+
     def onApply( self ):
         path = str(self.OutputPath.text())
         calc_case = str(self.CalcCase.text())
@@ -146,7 +146,7 @@ class InterpolzDlg( QDialog ):
                 med_groups_regions[med_group] = hydro_reg
         z_undef = self.UndefZ.value()
         interp = str(self.InterpMethod.currentText())
-        
+
         msg = ""
         if len(path)==0:
             msg = "Please input the output path"
@@ -158,18 +158,18 @@ class InterpolzDlg( QDialog ):
             msg = "Please fill groups table"
         elif len(interp)==0:
             msg = "Please choose interpolation method"
-        
+
         result = False
         if len(msg)==0:
             generate( path, calc_case, med_file, med_groups_regions, z_undef, interp )
             msg = "InterpolZ script is successfully generated"
             result = True
-            
+
         QMessageBox.information( self, "", msg )
         return result
-        
+
     def onClose( self ):
-        self.close()     
+        self.close()
 
     """Shows help page"""
     def onHelp( self ):