theStudy = salome.myStudy
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
theStudy = salome.myStudy
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
theStudy = salome.myStudy
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
theStudy = salome.myStudy
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
theStudy = salome.myStudy
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
theStudy = salome.myStudy
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
theStudy = salome.myStudy
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
#----------------------
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
#----------------------
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
#----------------------
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
#----------------------
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
#----------------------
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
#----------------------
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
#----------------------
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
#----------------------
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
###
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
###
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
import sys
import salome
+import os
+HYDRO_SAMPLES = os.path.join( os.environ["HYDRO_ROOT_DIR"], "bin/salome/test/HYDRO")
+
+
salome.salome_init()
theStudy = salome.myStudy
import salome_notebook
notebook = salome_notebook.NoteBook(theStudy)
-sys.path.insert( 0, r'/local00/home/B27118/projets/salome_hydro/bugs/V780H2016')
+#sys.path.insert( 0, r'/local00/home/B27118/projets/salome_hydro/bugs/V780H2016')
###
### HYDRO component
###
from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
bathyFlat.SetName( "bathyFlat" )
bathyFlat.SetAltitudesInverted( 0 )
-if not(bathyFlat.ImportFromFile( "/local00/home/B27118/projets/salome_hydro/bugs/V780H2016/bathyFlat.xyz" )):
+if not(bathyFlat.ImportFromFile( os.path.join(HYDRO_SAMPLES, "bathyFlat.xyz" ))):
raise ValueError('problem while loading bathymetry')
bathyFlat.Update()
profiles.SetName( "profiles" )
badProfilesIds=[]
isToProject=True
-nbp = profiles.ImportFromFile(hydro_doc, "/local00/home/B27118/projets/salome_hydro/V780H2016/modules/src/HYDRO/doc/salome/examples/profilsStream.xyz", badProfilesIds, isToProject)
+nbp = profiles.ImportFromFile(hydro_doc, os.path.join(HYDRO_SAMPLES, "profilsStream.xyz"), badProfilesIds, isToProject)
print "nombre profils: " , nbp
if not(nbp):
raise ValueError('problem while loading profiles')
smesh.SetName(plaine, 'plaine')
try:
- plaine.ExportMED( r'/local00/home/B27118/projets/salome_hydro/bugs/V780H2016/plaine.med', 0, SMESH.MED_V2_2, 1, None ,1)
+ plaine.ExportMED( r'plaine.med', 0, SMESH.MED_V2_2, 1, None ,1)
except:
print 'ExportToMEDX() failed. Invalid file name?'
print "value: ", vals, " reference: ", valsref
raise ValueError("z interpolation error")
-from MEDLoader import MEDLoader, MEDCouplingFieldDouble, ON_NODES, DataArrayDouble, MEDFileMesh
+import MEDLoader
+from MEDLoader import MEDCouplingFieldDouble, ON_NODES, DataArrayDouble, MEDFileMesh
import os, time
def controlTelemacResult(aMedFile, refs):
# -----------------------------------------------------------------------------
-from MEDLoader import MEDLoader, MEDCouplingFieldDouble, ON_NODES, DataArrayDouble, MEDFileMesh
+import MEDLoader
+from MEDLoader import MEDCouplingFieldDouble, ON_NODES, DataArrayDouble, MEDFileMesh
def createZfield2(fichierMaillage):
"""