Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modification cas telemac, non fonctionnel
[modules/hydro.git]
/
doc
/
salome
/
examples
/
h004_importBathyXYZ.py
diff --git
a/doc/salome/examples/h004_importBathyXYZ.py
b/doc/salome/examples/h004_importBathyXYZ.py
index 6dc8d6991189c8e224c94a15955c169639228b7a..c4041bc1fb5f4622417bc6515d60118e3329354a 100644
(file)
--- a/
doc/salome/examples/h004_importBathyXYZ.py
+++ b/
doc/salome/examples/h004_importBathyXYZ.py
@@
-10,8
+10,8
@@
salome.salome_init()
theStudy = salome.myStudy
from HYDROPy import *
theStudy = salome.myStudy
from HYDROPy import *
-from PyQt
4
.QtCore import *
-from PyQt
4
.QtGui import *
+from PyQt
5
.QtCore import *
+from PyQt
5
.QtGui import *
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
@@
-21,7
+21,8
@@
Cloud_02 = hydro_doc.CreateObject( KIND_BATHYMETRY )
Cloud_02.SetName( "Cloud_02" )
Cloud_02.SetAltitudesInverted( 0 );
Cloud_02.SetName( "Cloud_02" )
Cloud_02.SetAltitudesInverted( 0 );
-Cloud_02.ImportFromFile( os.path.join(HYDRO_SAMPLES, "Cloud_02.xyz" ))
+if not(Cloud_02.ImportFromFile( os.path.join(HYDRO_SAMPLES, "Cloud_02.xyz" ))):
+ raise ValueError('problem while loading bathymetry')
Cloud_02.Update()
Cloud_02.Update()