Salome HOME
adaptation cas tests
[modules/hydro.git] / doc / salome / examples / h008_simpleCase.py
index c0536177241f1a200d61a896c0fcf1d83d25f69b..c714049ea03c659259bb0db4dca345bd3ec0a5b5 100644 (file)
@@ -5,14 +5,14 @@ import salome
 
 salome.salome_init()
 theStudy = salome.myStudy
-  
+
 #----------------------
-# --- HYDRO 
+# --- HYDRO
 #----------------------
 
 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() )
 
@@ -53,9 +53,10 @@ Case_1 = hydro_doc.CreateObject( KIND_CALCULATION )
 Case_1.SetName( "Case_1" )
 
 Case_1.SetAssignmentMode( HYDROData_CalculationCase.AUTOMATIC )
-Case_1.SetAssignmentLandCoverMode( HYDROData_CalculationCase.AUTOMATIC )
 Case_1.AddGeometryObject( Immersible_zone_1 )
 
+case_geom_group = Immersible_zone_1.GetGroup( 0 );
+Case_1.AddGeometryGroup( case_geom_group );
 Case_1.SetBoundaryPolyline( Polyline_1 )
 
 # Start the algorithm of the partition and assignment
@@ -65,7 +66,7 @@ Case_1.Update()
 Case_1_entry = Case_1.Export( theStudy._get_StudyId() )
 
 #----------------------
-# --- Geometry 
+# --- Geometry
 #----------------------
 
 # Get geometry shape and print debug information
@@ -82,7 +83,8 @@ Case_1_geom = salome.IDToObject( str( Case_1_entry ) )
 print "Geom shape:", Case_1_geom
 print "Geom shape name:", Case_1_geom.GetName()
 
-controlGeomProps(geompy, Case_1_geom, 1218.7373973, 49697.2117918)
-   
+#controlGeomProps(geompy, Case_1_geom, 1218.7373973, 49697.2117918)
+controlGeomProps(geompy, Case_1_geom, 1218.7373973, 49578.1516521)
+
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)