Salome HOME
calculation of areas was incorrect (lack of precision) with SALOME V7.7.1: bug mantis...
[modules/hydro.git] / doc / salome / examples / h015_normalCaseManualTelemac.py
index 4df4002f9c5af2e231378315aefff669cfe22763..10d67570bc25772ba61525fe08b1acab7acdd06d 100644 (file)
@@ -27,7 +27,8 @@ garonne_ign_01.SetName( "garonne_ign_01" )
 garonne_ign_01.SetZLevel( 0 )
 
 
-garonne_ign_01.LoadImage(os.path.join(HYDRO_SAMPLES, "garonne_ign_01.png" ))
+if not(garonne_ign_01.LoadImage(os.path.join(HYDRO_SAMPLES, "garonne_ign_01.png" ))):
+  raise ValueError('problem while loading image')
 
 garonne_ign_01.SetLocalPoints( QPoint( 40, 817 ),
                                QPoint( 1325, 85 ) )
@@ -44,7 +45,8 @@ garonne_ign_02.SetName( "garonne_ign_02" )
 garonne_ign_02.SetZLevel( 1 )
 
 
-garonne_ign_02.LoadImage( os.path.join(HYDRO_SAMPLES, "garonne_ign_02.png" ))
+if not(garonne_ign_02.LoadImage( os.path.join(HYDRO_SAMPLES, "garonne_ign_02.png" ))):
+  raise ValueError('problem while loading image')
 
 garonne_ign_02.SetLocalPoints( QPoint( 1389, 447 ),
                                QPoint( 784, 481 ) )
@@ -197,7 +199,8 @@ Cloud_02 = hydro_doc.CreateObject( KIND_BATHYMETRY )
 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()
 
@@ -206,7 +209,8 @@ garonne_point_L93 = hydro_doc.CreateObject( KIND_BATHYMETRY )
 garonne_point_L93.SetName( "garonne_point_L93" )
 
 garonne_point_L93.SetAltitudesInverted( 0 )
-garonne_point_L93.ImportFromFile( os.path.join(HYDRO_SAMPLES, "garonne_point_L93.xyz" ))
+if not(garonne_point_L93.ImportFromFile( os.path.join(HYDRO_SAMPLES, "garonne_point_L93.xyz" ))):
+  raise ValueError('problem while loading bathymetry')
 
 garonne_point_L93.Update()
 
@@ -338,9 +342,9 @@ geompy.addToStudyInFather( HYDRO_garonne_1, bordGaucheDomaine, 'bordGaucheDomain
 geompy.addToStudyInFather( HYDRO_garonne_1, bordDroiteDomaine, 'bordDroiteDomaine' )
 
 # --- basic properties control: edges length, surfaces
-controlGeomProps(geompy, riveGauche,  29149.36918,  35992556.454929)
-controlGeomProps(geompy, litMineur,   30337.548492,  3646827.749809)
-controlGeomProps(geompy, riveDroite,  32012.343241, 26177085.460092)
+controlGeomProps(geompy, riveGauche,  29149.36918,  35948828.352061)
+controlGeomProps(geompy, litMineur,   30337.548492,  3488480.304388)
+controlGeomProps(geompy, riveDroite,  32012.343241, 25998769.23615)
 
 #----------------------
 # --- Meshing 
@@ -479,6 +483,8 @@ print jdc
 
 from salome.hydro.study import jdc_to_dict
 param_dict = jdc_to_dict(jdc, ["PYTEL", "_F"])
+# --- close xterm automatically after Telemac execution
+param_dict['batchExec'] = True
 print param_dict
 
 from salome.hydro.pytel.launcher import run_pytel