from salome.hydro.telemac2d.eficas.appli import EficasForTelemac2DAppli
from salome.hydro.coupling1d2d.eficas.appli import EficasForCoupling1D2DAppli
from salome.hydro.pytel.gui import create_case_pytel, run_selected_case_pytel, edit_selected_case_pytel, generate_job_for_selected_case_pytel
-from salome.hydro.boundary_conditions.eficas.appli import EficasForBoundaryConditionsAppli
+#from salome.hydro.boundary_conditions.eficas.appli import EficasForBoundaryConditionsAppli
+from eficasSalome import runEficas
import BndConditionsDialog
RUN_PYTEL_ID = 952
EDIT_PYTEL_CASE_ID = 953
GENERATE_JOB = 954
- DEFINE_BOUNDARY_CONDITIONS_ID = 955
+ #DEFINE_BOUNDARY_CONDITIONS_ID = 955
+ DEFINE_CAS_FILE = 955
EDIT_BOUNDARY_CONDITIONS_FILE_ID = 956
GENERATE_INTERPOLZ_PY_ID = 957
# create toolbar
tid = sgPyQt.createTool( "Hydro" )
# create actions and fill menu and toolbar with actions
- a = sgPyQt.createAction( GUIcontext.DEFINE_BOUNDARY_CONDITIONS_ID,
- "Define boundary conditions", "Define boundary conditions",
- "Define the boundary conditions for Telemac",
- "define_boundary_conditions.png" )
+ #a = sgPyQt.createAction( GUIcontext.DEFINE_BOUNDARY_CONDITIONS_ID,
+ # "Define boundary conditions", "Define boundary conditions",
+ # "Define the boundary conditions for Telemac",
+ # "define_boundary_conditions.png" )
sgPyQt.createMenu( a, mid )
sgPyQt.createTool( a, tid )
sgPyQt.createMenu( a, mid )
sgPyQt.createTool( a, tid )
- a = sgPyQt.createSeparator()
- sgPyQt.createMenu( a, mid )
- sgPyQt.createTool( a, tid )
a = sgPyQt.createAction( GUIcontext.CREATE_MASCARET_CASE_ID,
"Create Mascaret case", "Create Mascaret case",
sgPyQt.createTool( a, tid )
a = sgPyQt.createSeparator()
- sgPyQt.createMenu( a, mid )
- sgPyQt.createTool( a, tid )
a = sgPyQt.createAction( GUIcontext.CREATE_PYTEL_CASE_ID,
"Create case for Pytel execution", "Create case for Pytel execution",
sgPyQt.createMenu( a, mid )
sgPyQt.createTool( a, tid )
+ a = sgPyQt.createSeparator()
+ a = sgPyQt.createAction( GUIcontext.DEFINE_CAS_FILE,
+ "Edit cas file", "Edit cas file",
+ "Create/edit a .cas file for Telemac",
+ "define_cas_file.png" )
+ sgPyQt.createMenu( a, mid )
+ sgPyQt.createTool( a, tid )
+
+
# the following action are used in context popup
sgPyQt.createAction( GUIcontext.RUN_MASCARET_ID, "Compute case", "Compute case",
"Run Mascaret solver to compute the case" )
sgPyQt.createAction( GUIcontext.GENERATE_JOB, "Generate batch job", "Generate batch job",
"Generate a batch job to run the selected case")
+ sgPyQt.createAction( GUIcontext.DEFINE_CAS_FILE, "Edit .cas file", "Edit .cas file",
+ "Edit .cas file")
+
+
################################################
# Global variables
################################################
###
# Open Eficas for boundary conditions definition
###
-def define_boundary_conditions():
- EficasForBoundaryConditionsAppli()
+#def define_boundary_conditions():
+# EficasForBoundaryConditionsAppli()
###
# Open dialog for boundary conditions edition
dlg.show()
###
+# Open dialog for boundary conditions edition
+###
+def eficas_for_cas_Telemac2D()
+ runEficas(code='TELEMAC')
+###
# Commands dictionary
###
dict_command = {
GUIcontext.RUN_PYTEL_ID: run_selected_case_pytel,
GUIcontext.EDIT_PYTEL_CASE_ID: edit_selected_case_pytel,
GUIcontext.GENERATE_JOB: generate_job_for_selected_case_pytel,
- GUIcontext.DEFINE_BOUNDARY_CONDITIONS_ID: define_boundary_conditions,
+ #GUIcontext.DEFINE_BOUNDARY_CONDITIONS_ID: define_boundary_conditions,
GUIcontext.EDIT_BOUNDARY_CONDITIONS_FILE_ID: edit_boundary_conditions_file,
GUIcontext.GENERATE_INTERPOLZ_PY_ID: generate_interpolz_py,
+ GUIcontext.GUIcontext.DEFINE_CAS_FILE: eficas_for_cas_Telemac2D,
}