import salome
salome.salome_init()
-theStudy = salome.myStudy
#----------------------
# --- HYDRO
from PyQt5.QtCore import *
from PyQt5.QtGui import *
-hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
+hydro_doc = HYDROData_Document.Document()
hydro_doc.SetLocalCS( 430000, 6.35e+06 )
garonne_1_riveGauche.SetName("garonne_1_riveGauche")
# Export of the calculation case
-garonne_1_entry = garonne_1.Export( theStudy._get_StudyId() )
+garonne_1_entry = garonne_1.Export()
#----------------------
# --- Geometry
import SALOMEDS
from salome.hydrotools.controls import controlGeomProps
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
print("Entry:", garonne_1_entry)
HYDRO_garonne_1 = salome.IDToObject( str( garonne_1_entry ) )
from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
import tempfile
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
# --- algorithms and hypothesis
garonne_1 = smesh.Mesh(HYDRO_garonne_1)
controlSubMeshStats(riveGauche_1, 2871)
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(1)
+ salome.sg.updateObjBrowser()
#----------------------
# --- Z interpolation with HYDRO
statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef, interpolMethod, m3d)
#print statz
refstatz = {'riveDroite': (10.88, 32.61, 24.17, 5.12, 17.57, 31.33, 0.25),
- 'riveGauche': (7.72, 71.86, 24.51, 12.18, 12.90, 60.36, 0.25),
+ 'riveGauche': (7.72, 71.86, 24.51, 12.18, 12.90, 60.36, 0.4),
'litMineur': (2.06, 25.41, 13.93, 4.33, 8.47, 21.78)}
controlStatZ(statz, refstatz)