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.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 eficasSalome import runEficas
CREATE_TELEMAC2D_CASE_ID = 945
RUN_TELEMAC2D_ID = 946
EDIT_TELEMAC2D_CASE_ID = 947
- CREATE_COUPLING1D2D_CASE_ID = 948
- EDIT_COUPLING1D2D_CASE_ID = 949
OPEN_SCHEMA_IN_YACS_ID = 950
CREATE_PYTEL_CASE_ID = 951
RUN_PYTEL_ID = 952
sgPyQt.createMenu( a, mid )
sgPyQt.createTool( a, tid )
- a = sgPyQt.createAction( GUIcontext.CREATE_COUPLING1D2D_CASE_ID,
- "Create 1D / 2D coupling", "Create 1D / 2D coupling",
- "Create a new 1D / 2D coupling", "create_case_couplage.png" )
- sgPyQt.createMenu( a, mid )
- sgPyQt.createTool( a, tid )
-
a = sgPyQt.createSeparator()
a = sgPyQt.createAction( GUIcontext.CREATE_PYTEL_CASE_ID,
sgPyQt.createAction( GUIcontext.SHOW_LOG_ID, "Show log", "Show log",
"Show the log for the selected variable" )
- sgPyQt.createAction( GUIcontext.GEN_TELEMAC2D_PYTHON_ID, "Generate Python script",
+ sgPyQt.createAction( GUIcontext.GEN_TELEMAC2D_PYTHON_ID, "Generate Python script",
"Generate Python script",
"Generate a Python script from the eficas date" )
- sgPyQt.createAction( GUIcontext.GEN_TELEMAC2D_YACS_ID, "Generate YACS script",
+ sgPyQt.createAction( GUIcontext.GEN_TELEMAC2D_YACS_ID, "Generate YACS script",
"Generate YACS script",
"Generate a YACS script from the eficas date" )
sgPyQt.createAction( GUIcontext.RUN_TELEMAC2D_ID, "Compute case", "Compute case",
sgPyQt.createAction( GUIcontext.EDIT_TELEMAC2D_CASE_ID, "Edit case", "Edit case",
"Edit the selected Telemac2D case" )
- sgPyQt.createAction( GUIcontext.EDIT_COUPLING1D2D_CASE_ID, "Edit coupling", "Edit coupling",
- "Edit the selected 1D / 2D coupling" )
- sgPyQt.createAction( GUIcontext.OPEN_SCHEMA_IN_YACS_ID, "Open schema in YACS", "Open schema in YACS",
- "Open the selected 1D / 2D coupling schema in YACS" )
-
sgPyQt.createAction( GUIcontext.RUN_PYTEL_ID, "Compute case", "Compute case",
"Run Pytel launcher to compute the case" )
sgPyQt.createAction( GUIcontext.EDIT_PYTEL_CASE_ID, "Edit case", "Edit case",
popup.addAction(sgPyQt.action(GUIcontext.RUN_TELEMAC2D_ID))
popup.addAction(sgPyQt.action(GUIcontext.GEN_TELEMAC2D_PYTHON_ID))
popup.addAction(sgPyQt.action(GUIcontext.GEN_TELEMAC2D_YACS_ID))
- elif selectedType == hydro_study.COUPLING1D2D_CASE_TYPE_ID:
- popup.addAction(sgPyQt.action(GUIcontext.EDIT_COUPLING1D2D_CASE_ID))
- popup.addAction(sgPyQt.action(GUIcontext.OPEN_SCHEMA_IN_YACS_ID))
elif selectedType == hydro_study.LOG_TYPE_ID:
popup.addAction(sgPyQt.action(GUIcontext.SHOW_LOG_ID))
elif selectedType == hydro_study.PYTEL_CASE_TYPE_ID:
msg += "\n" + exc.details.text
raise HSGUIException(msg)
-###
-# Open Eficas for 1D / 2D Coupling to create a new coupling case
-###
-def create_coupling1d2d_case():
- EficasForCoupling1D2DAppli()
-
-###
-# Open Eficas for 1D / 2D Coupling to edit the selected coupling case
-###
-def edit_coupling1d2d_case():
- EficasForCoupling1D2DAppli(get_and_check_selected_file_path())
-
def open_schema_in_yacs():
ed = getStudyEditor()
sobj = ed.study.FindObjectID(salome.sg.getSelected(0))
def eficas_for_cas_Telemac2D_en():
EficasForTelemac2DAppli(code='TELEMAC', lang = 'en')
-
+
###
# Commands dictionary
###
GUIcontext.GEN_TELEMAC2D_PYTHON_ID: generate_telemac2d_python,
GUIcontext.GEN_TELEMAC2D_YACS_ID: generate_telemac2d_yacs,
GUIcontext.EDIT_TELEMAC2D_CASE_ID: edit_telemac2d_case,
- GUIcontext.CREATE_COUPLING1D2D_CASE_ID: create_coupling1d2d_case,
- GUIcontext.EDIT_COUPLING1D2D_CASE_ID: edit_coupling1d2d_case,
GUIcontext.OPEN_SCHEMA_IN_YACS_ID: open_schema_in_yacs,
GUIcontext.CREATE_PYTEL_CASE_ID: create_case_pytel,
GUIcontext.RUN_PYTEL_ID: run_selected_case_pytel,