]> SALOME platform Git repositories - modules/hydrosolver.git/commitdiff
Salome HOME
renaming
authorPaul RASCLE <paul.rascle@edf.fr>
Fri, 26 Oct 2018 14:22:10 +0000 (16:22 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Fri, 26 Oct 2018 14:47:18 +0000 (16:47 +0200)
src/HYDROGUI/HYDROSOLVERGUI.py
src/salome_hydro/CMakeLists.txt
src/salome_hydro/assignStrickler.template [new file with mode: 0644]
src/salome_hydro/assignStrickler.ui [new file with mode: 0644]
src/salome_hydro/assignStrickler_gui.py [new file with mode: 0644]
src/salome_hydro/interpolks.ui [deleted file]
src/salome_hydro/interpolks_gui.py [deleted file]

index c45182dc2714fc0c7baa6aabee8cc5cabb9999a3..1e82b6c5a9fe7d5409b8386e48d729ff9fb73cc5 100755 (executable)
@@ -35,7 +35,7 @@ logger = Logger("HYDROGUI", color = termcolor.BLUE)
 import HYDROSOLVER_ORB
 
 from salome.hydro.interpolz_gui import InterpolzDlg
-from salome.hydro.interpolks_gui import InterpolksDlg
+from salome.hydro.assignStrickler_gui import assignStricklerDlg
 
 from salome.hydro.gui_utils import HSGUIException, wait_cursor, get_and_check_selected_file_path
 import salome.hydro.study as hydro_study
@@ -77,7 +77,7 @@ class GUIcontext:
     GEN_TELEMAC2D_PYTHON_ID = 958
     GEN_TELEMAC2D_YACS_ID = 959
     #DEFINE_CAS_FILE_FR = 960
-    GENERATE_INTERPOLKS_PY_ID = 961
+    GENERATE_ASSIGNSTRICKLER_PY_ID = 961
     EDIT_LIQUID_BOUNDARIES_FILE_ID = 962
     EDIT_BREACHES_FILE_ID = 962
     EDIT_INITIAL_CONDITIONS_FILE_ID = 963
@@ -100,9 +100,9 @@ class GUIcontext:
         sgPyQt.createMenu( a, mid )
         sgPyQt.createTool( a, tid )
 
-        a = sgPyQt.createAction( GUIcontext.GENERATE_INTERPOLKS_PY_ID,
-                                 "Generate interpolKS.py", "Generate interpolKS.py",
-                                 "Generate interpolation script for bottom friction coefficients",
+        a = sgPyQt.createAction( GUIcontext.GENERATE_ASSIGNSTRICKLER_PY_ID,
+                                 "Generate assignStrickler.py", "Generate assignStrickler.py",
+                                 "Generate assignation script for bottom friction coefficients",
                                  "generate_interpolz_py.png" )
         sgPyQt.createMenu( a, mid )
         sgPyQt.createTool( a, tid )
@@ -521,11 +521,11 @@ def generate_interpolz_py():
     dlg.show()
 
 ###
-# Open dialog for interpolks.py script generation
+# Open dialog for assignStrickler.py script generation
 ###
-def generate_interpolks_py():
+def generate_assignStrickler_py():
     desktop = sgPyQt.getDesktop()
-    dlg = InterpolksDlg(desktop)
+    dlg = assignStricklerDlg(desktop)
     dlg.show()
 
 ###
@@ -558,7 +558,7 @@ dict_command = {
     GUIcontext.EDIT_LIQUID_BOUNDARIES_FILE_ID: edit_liquid_boundaries_file,
     GUIcontext.EDIT_BREACHES_FILE_ID: edit_breaches_file,
     GUIcontext.EDIT_INITIAL_CONDITIONS_FILE_ID: edit_initial_conditions_file,
-    GUIcontext.GENERATE_INTERPOLKS_PY_ID: generate_interpolks_py,
+    GUIcontext.GENERATE_ASSIGNSTRICKLER_PY_ID: generate_assignStrickler_py,
     GUIcontext.GENERATE_INTERPOLZ_PY_ID: generate_interpolz_py,
     GUIcontext.DEFINE_CAS_FILE_EN: eficas_for_cas_Telemac2D_en,
     #GUIcontext.DEFINE_CAS_FILE_FR: eficas_for_cas_Telemac2D_fr,
index a459b9d86b1f32e7b78a2a9ee360b2758a970e38..0137546930f4e9dc72ca9e1b23748da094057600 100644 (file)
@@ -27,17 +27,18 @@ SET(PYFILES
   study.py
   gui_utils.py
   generate_interpolz.py
-  interpolks_gui.py
+  assignStrickler_gui.py
   interpolz_gui.py
 )
 
 SET(UIFILES
-  interpolks.ui
+  assignStrickler.ui
   interpolz.ui
 )
 
 SET(TEMPLFILES
   interpolz.template
+  assignStrickler.template
 )
 
 # --- rules ---
diff --git a/src/salome_hydro/assignStrickler.template b/src/salome_hydro/assignStrickler.template
new file mode 100644 (file)
index 0000000..a172e16
--- /dev/null
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+
+# ===== Assign Strickler coefficients script, to be edited =====
+#===============================================================
+
+# --- name of the case in HYDRO module
+caseName = <case_name_from_dlg>
+
+# --- input file: MED file with mesh and optional Z interpolation field,
+#     to be completed with Strickler coefficients field (default name 'BOTTOM FRICTION')
+
+meshFile_in = <MED_file_path_from_dlg>
+
+from salome.hydrotools.interpolS import assignStrickler
+
+assignStrickler(caseName, meshFile_in)
+
+"""
+# --- it is possible to write everything in a new file instead of adding a field to the existing file,
+#     it is also possible to use a different field name than the default ('BOTTOM FRICTION')
+# --- output_file_name : optional:
+      output_file_name = meshFile_in
+# --- med_field_name : optional, Strickler coefficients field name, default = 'BOTTOM FRICTION':
+      med_field_name = 'BOTTOM FRICTION'
+assignStrickler(caseName, meshFile_in, output_file_name=meshfile_out, med_field_name=fieldName)
+"""
\ No newline at end of file
diff --git a/src/salome_hydro/assignStrickler.ui b/src/salome_hydro/assignStrickler.ui
new file mode 100644 (file)
index 0000000..34f6d48
--- /dev/null
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>496</width>
+    <height>201</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0">
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="1">
+      <widget class="QLabel" name="lblCalcCase">
+       <property name="toolTip">
+        <string>calculation case selected in HYDRO module</string>
+       </property>
+       <property name="text">
+        <string>Calculation case:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="2">
+      <widget class="QLineEdit" name="CalcCase">
+       <property name="toolTip">
+        <string>calculation case selected in HYDRO module</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <widget class="QGroupBox" name="grpPaths">
+     <property name="title">
+      <string>Paths</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_4">
+      <item row="0" column="0">
+       <layout class="QGridLayout" name="gridLayout_3">
+        <item row="0" column="0">
+         <widget class="QLabel" name="lblOutputPath">
+          <property name="toolTip">
+           <string>path of the script to create, for generation of Strickler coefficients</string>
+          </property>
+          <property name="text">
+           <string>Output path:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2">
+         <widget class="QLineEdit" name="OutputPath">
+          <property name="toolTip">
+           <string>path of the script to create, for generation of Strickler coefficients</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="lblMEDFile">
+          <property name="toolTip">
+           <string>MED file containing the mesh, that will receive a new field on nodes, for Strickler coefficients</string>
+          </property>
+          <property name="text">
+           <string>MED file:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2">
+         <widget class="QLineEdit" name="MEDFile">
+          <property name="toolTip">
+           <string>MED file containing the mesh, that will receive a new field on nodes, for Strickler coefficients</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="3">
+         <widget class="QToolButton" name="btnOutputPath">
+          <property name="text">
+           <string>...</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3">
+         <widget class="QToolButton" name="btnMEDFile">
+          <property name="text">
+           <string>...</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QCheckBox" name="cb_scriptExec">
+     <property name="toolTip">
+      <string>if checked the script is generated and executed on apply, otherwise it is only generated for later use</string>
+     </property>
+     <property name="text">
+      <string>Execute the script</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QFrame" name="frame">
+     <property name="frameShape">
+      <enum>QFrame::NoFrame</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Plain</enum>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <property name="spacing">
+       <number>0</number>
+      </property>
+      <property name="leftMargin">
+       <number>0</number>
+      </property>
+      <property name="topMargin">
+       <number>0</number>
+      </property>
+      <property name="rightMargin">
+       <number>0</number>
+      </property>
+      <property name="bottomMargin">
+       <number>0</number>
+      </property>
+      <item>
+       <widget class="QPushButton" name="ApplyClose">
+        <property name="text">
+         <string>Apply and Close</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Apply">
+        <property name="text">
+         <string>Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Close">
+        <property name="text">
+         <string>Close</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Help">
+        <property name="text">
+         <string>Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/salome_hydro/assignStrickler_gui.py b/src/salome_hydro/assignStrickler_gui.py
new file mode 100644 (file)
index 0000000..9eb791d
--- /dev/null
@@ -0,0 +1,155 @@
+# -*- coding: utf-8 -*-
+
+import sys, os
+import string
+
+hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome', 'salome', 'hydro')
+
+import salome
+salome.salome_init()
+
+import HYDROPy
+from salome.hydrotools.interpolS import assignStrickler
+
+from generate_interpolz import replace
+
+from PyQt5.QtWidgets import QDialog, QFileDialog, QTableWidgetItem, QComboBox, QMessageBox
+from PyQt5 import uic
+
+import SalomePyQt
+import libSALOME_Swig
+salome_gui = libSALOME_Swig.SALOMEGUI_Swig()
+
+
+def get_selected_calc_case():
+    ind = SalomePyQt.SalomePyQt.getObjectBrowser().selectionModel().selectedIndexes()
+    aStudyId = salome.myStudyId
+    doc = HYDROPy.HYDROData_Document.Document( aStudyId )
+    for i in ind:
+        if i.column()==0:
+            name = str(i.data())
+            case = doc.FindObjectByName( name )
+            if isinstance(case, HYDROPy.HYDROData_CalculationCase):
+                return name
+    return None
+
+class assignStricklerDlg( QDialog ):
+    def __init__(self, parent = None):
+        QDialog.__init__( self, parent )
+        p = hydro_solver_root
+        uic.loadUi( p+'/assignStrickler.ui', self )
+        self.setWindowTitle( 'Generate assignStrickler script' )
+        SalomePyQt.SalomePyQt.getObjectBrowser().selectionChanged.connect(self.onSelectionChanged)
+        self.btnOutputPath.clicked.connect(self.onOutputFile)
+        self.btnMEDFile.clicked.connect(self.onMEDFile)
+        self.CalcCase.textChanged.connect(self.onCalcCaseChanged)
+        self.MEDFile.textChanged.connect(self.onMEDChanged)
+        self.ApplyClose.clicked.connect(self.onApplyClose)
+        self.Apply.clicked.connect(self.onApply)
+        self.Close.clicked.connect(self.onClose)
+        self.Help.clicked.connect(self.onHelp)
+        self.onSelectionChanged()
+
+    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!="":
+        if string.split(fname, '.')[-1] != 'py':
+          fname += '.py'
+        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.onMEDChanged()
+
+    def onMEDChanged( self ):
+      pass
+                 
+    def onApplyClose( self ):
+        if self.onApply():
+            self.onClose()
+
+    def generateScript( self, path, calc_case, med_file ):
+      f = open( path, "w" )
+      tf = open( hydro_solver_root+"/assignStrickler.template", "r" )
+      templ = tf.readlines()
+      replace( templ, "<case_name_from_dlg>", calc_case )
+      replace( templ, "<MED_file_path_from_dlg>", med_file )
+      for line in templ:
+        f.write( line )
+      f.close()
+
+    def onApply( self ):
+        path = str(self.OutputPath.text())
+        calc_case = str(self.CalcCase.text())
+        med_file = str(self.MEDFile.text())
+        isScriptExec = self.cb_scriptExec.isChecked()
+        msg = ""
+        if len(path)==0:
+            msg = "Please input the output path"
+        elif len(calc_case)==0:
+            msg = "Please choose the calculation case"
+        elif len(med_file)==0:
+            msg = "Please choose the MED file"
+
+        result = False
+        
+        if len(msg)==0:
+            self.generateScript( path, calc_case, med_file )
+            msg = "Strickler script is successfully generated"
+            if isScriptExec:
+              assignStrickler(calc_case, med_file) #, output_file_name=fichierMaillage_out, verbose=True)
+              msg = "Strickler script is successfully generated and executed"
+            result = True
+
+        QMessageBox.information( self, "", msg )
+        return result
+
+    def onClose( self ):
+        self.close()
+
+    """Shows help page"""
+    def onHelp( self ):
+        msg = """
+        <h2>assignStrickler dialog</h2>
+
+        This dialog is a tool for automation the writing of the script <b>assignStrickler.py</b>.
+
+        <h3>Calculation case</h3>
+        The name of the calculation case. It can be filled automatically on the base of selection or can be input by user.
+
+        <h3>Output path</h3>
+        The path for the output, i.e. the path of the target script assignStrickler.
+
+        <h3>MED file</h3>
+        The path to MED file where MED groups are extracted.
+
+        <h3>Method</h3>
+        The interpolation method (interpolation at the nearest point and linear interpolation from a triangulation of the cloud of points).
+
+        <h3>Undefined Z</h3>
+        The Z value for nodes outside the regions.
+
+        <h3>Table</h3>
+        The table with MED groups and regions names.
+
+        When the data is input, the user clicks on "Apply" or "Apply and Close" button to perform the script generation.
+        """
+        QMessageBox.about(self, self.tr("About boundary conditions dialog"), msg);
+
+
+if __name__=='__main__':
+  dlg = assignStricklerDlg()
+  dlg.show()
diff --git a/src/salome_hydro/interpolks.ui b/src/salome_hydro/interpolks.ui
deleted file mode 100644 (file)
index 796ce5f..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Dialog</class>
- <widget class="QDialog" name="Dialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>695</width>
-    <height>174</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout_2">
-   <item row="1" column="0">
-    <widget class="QGroupBox" name="grpPaths">
-     <property name="title">
-      <string>Paths</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout_4">
-      <item row="0" column="0">
-       <layout class="QGridLayout" name="gridLayout_3">
-        <item row="0" column="0">
-         <widget class="QLabel" name="lblOutputPath">
-          <property name="text">
-           <string>Output path:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QLineEdit" name="OutputPath"/>
-        </item>
-        <item row="1" column="0">
-         <widget class="QLabel" name="lblMEDFile">
-          <property name="text">
-           <string>MED file:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="2">
-         <widget class="QLineEdit" name="MEDFile"/>
-        </item>
-        <item row="0" column="3">
-         <widget class="QToolButton" name="btnOutputPath">
-          <property name="text">
-           <string>...</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="3">
-         <widget class="QToolButton" name="btnMEDFile">
-          <property name="text">
-           <string>...</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="0" column="0">
-    <layout class="QGridLayout" name="gridLayout">
-     <item row="0" column="1">
-      <widget class="QLabel" name="lblCalcCase">
-       <property name="text">
-        <string>Calculation case:</string>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="2">
-      <widget class="QLineEdit" name="CalcCase"/>
-     </item>
-    </layout>
-   </item>
-   <item row="2" column="0">
-    <widget class="QFrame" name="frame">
-     <property name="frameShape">
-      <enum>QFrame::NoFrame</enum>
-     </property>
-     <property name="frameShadow">
-      <enum>QFrame::Plain</enum>
-     </property>
-     <layout class="QHBoxLayout" name="horizontalLayout_2">
-      <property name="spacing">
-       <number>0</number>
-      </property>
-      <property name="leftMargin">
-       <number>0</number>
-      </property>
-      <property name="topMargin">
-       <number>0</number>
-      </property>
-      <property name="rightMargin">
-       <number>0</number>
-      </property>
-      <property name="bottomMargin">
-       <number>0</number>
-      </property>
-      <item>
-       <widget class="QPushButton" name="ApplyClose">
-        <property name="text">
-         <string>Apply and Close</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="Apply">
-        <property name="text">
-         <string>Apply</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="Close">
-        <property name="text">
-         <string>Close</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <spacer name="horizontalSpacer">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QPushButton" name="Help">
-        <property name="text">
-         <string>Help</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/salome_hydro/interpolks_gui.py b/src/salome_hydro/interpolks_gui.py
deleted file mode 100644 (file)
index 8bcd626..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import sys, os
-import string
-
-hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome', 'salome', 'hydro')
-
-import salome
-salome.salome_init()
-
-import HYDROPy
-from salome.hydrotools.interpolS import assignStrickler
-
-from PyQt5.QtWidgets import QDialog, QFileDialog, QTableWidgetItem, QComboBox, QMessageBox
-from PyQt5 import uic
-
-import SalomePyQt
-import libSALOME_Swig
-salome_gui = libSALOME_Swig.SALOMEGUI_Swig()
-
-
-def get_selected_calc_case():
-    ind = SalomePyQt.SalomePyQt.getObjectBrowser().selectionModel().selectedIndexes()
-    aStudyId = salome.myStudyId
-    doc = HYDROPy.HYDROData_Document.Document( aStudyId )
-    for i in ind:
-        if i.column()==0:
-            name = str(i.data())
-            case = doc.FindObjectByName( name )
-            if isinstance(case, HYDROPy.HYDROData_CalculationCase):
-                return name
-    return None
-
-class InterpolksDlg( QDialog ):
-    def __init__(self, parent = None):
-        QDialog.__init__( self, parent )
-        p = hydro_solver_root
-        uic.loadUi( p+'/interpolks.ui', self )
-        self.setWindowTitle( 'Generate interpolks script' )
-        SalomePyQt.SalomePyQt.getObjectBrowser().selectionChanged.connect(self.onSelectionChanged)
-        self.btnOutputPath.clicked.connect(self.onOutputFile)
-        self.btnMEDFile.clicked.connect(self.onMEDFile)
-        self.CalcCase.textChanged.connect(self.onCalcCaseChanged)
-        self.MEDFile.textChanged.connect(self.onMEDChanged)
-        self.ApplyClose.clicked.connect(self.onApplyClose)
-        self.Apply.clicked.connect(self.onApply)
-        self.Close.clicked.connect(self.onClose)
-        self.Help.clicked.connect(self.onHelp)
-        self.onSelectionChanged()
-
-    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!="":
-        if string.split(fname, '.')[-1] != 'py':
-          fname += '.py'
-        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.onMEDChanged()
-
-    def onMEDChanged( self ):
-      pass
-                 
-    def onApplyClose( self ):
-        if self.onApply():
-            self.onClose()
-
-    def onApply( self ):
-        path = str(self.OutputPath.text())
-        calc_case = str(self.CalcCase.text())
-        med_file = str(self.MEDFile.text())
-
-        msg = ""
-        if len(path)==0:
-            msg = "Please input the output path"
-        elif len(calc_case)==0:
-            msg = "Please choose the calculation case"
-        elif len(med_file)==0:
-            msg = "Please choose the MED file"
-
-        result = False
-        if len(msg)==0:
-            assignStrickler(calc_case, med_file) #, output_file_name=fichierMaillage_out, verbose=True)
-            msg = "InterpolKs script is successfully generated"
-            result = True
-
-        QMessageBox.information( self, "", msg )
-        return result
-
-    def onClose( self ):
-        self.close()
-
-    """Shows help page"""
-    def onHelp( self ):
-        msg = """
-        <h2>Interpolks dialog</h2>
-
-        This dialog is a tool for automation the writing of the script <b>interpolks.py</b>.
-
-        <h3>Calculation case</h3>
-        The name of the calculation case. It can be filled automatically on the base of selection or can be input by user.
-
-        <h3>Output path</h3>
-        The path for the output, i.e. the path of the target script interpolks.
-
-        <h3>MED file</h3>
-        The path to MED file where MED groups are extracted.
-
-        <h3>Method</h3>
-        The interpolation method (interpolation at the nearest point and linear interpolation from a triangulation of the cloud of points).
-
-        <h3>Undefined Z</h3>
-        The Z value for nodes outside the regions.
-
-        <h3>Table</h3>
-        The table with MED groups and regions names.
-
-        When the data is input, the user clicks on "Apply" or "Apply and Close" button to perform the script generation.
-        """
-        QMessageBox.about(self, self.tr("About boundary conditions dialog"), msg);
-
-
-if __name__=='__main__':
-  dlg = InterpolksDlg()
-  dlg.show()