Salome HOME
appying 2to3
[modules/hydro.git] / doc / salome / examples / h009_normalCaseManual.py
1 # -*- coding: utf-8 -*-
2
3 import os
4 HYDRO_SAMPLES = os.path.join( os.environ["HYDRO_ROOT_DIR"], "bin/salome/test/HYDRO")
5
6 import sys
7 import salome
8
9 salome.salome_init()
10 theStudy = salome.myStudy
11
12 #----------------------
13 # --- HYDRO
14 #----------------------
15
16 from HYDROPy import *
17 from PyQt5.QtCore import *
18 from PyQt5.QtGui import *
19
20 hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
21
22 hydro_doc.SetLocalCS( 430000, 6.35e+06 )
23
24 garonne_ign_01 = hydro_doc.CreateObject( KIND_IMAGE )
25 garonne_ign_01.SetName( "garonne_ign_01" )
26
27 garonne_ign_01.SetZLevel( 0 )
28
29
30 if not(garonne_ign_01.LoadImage(os.path.join(HYDRO_SAMPLES, "garonne_ign_01.png" ))):
31   raise ValueError('problem while loading image')
32
33 garonne_ign_01.SetLocalPoints( QPoint( 40, 817 ),
34                                QPoint( 1325, 85 ) )
35
36 garonne_ign_01.SetGlobalPoints( 1,
37                                 QPointF( 471562, 6.36775e+06 ),
38                                 QPointF( 489400, 6.37702e+06 ) )
39
40 garonne_ign_01.Update()
41
42 garonne_ign_02 = hydro_doc.CreateObject( KIND_IMAGE )
43 garonne_ign_02.SetName( "garonne_ign_02" )
44
45 garonne_ign_02.SetZLevel( 1 )
46
47
48 if not(garonne_ign_02.LoadImage( os.path.join(HYDRO_SAMPLES, "garonne_ign_02.png" ))):
49   raise ValueError('problem while loading image')
50
51 garonne_ign_02.SetLocalPoints( QPoint( 1389, 447 ),
52                                QPoint( 784, 481 ) )
53
54 garonne_ign_02.SetGlobalPoints( 3,
55                                 QPointF( 631, 95 ),
56                                 QPointF( 26, 129 ) )
57 garonne_ign_02.SetTrsfReferenceImage( garonne_ign_01 )
58
59 garonne_ign_02.Update()
60
61 garonne = hydro_doc.CreateObject( KIND_POLYLINEXY )
62 garonne.SetName( "garonne" )
63
64 garonne.SetZLevel( 2 )
65
66 garonne.AddSection( "Section_1", 1, 1 )
67 garonne.AddPoint( 0, gp_XY( 38191.48, 33184.55 ) )
68 garonne.AddPoint( 0, gp_XY( 38553.78, 33013.53 ) )
69 garonne.AddPoint( 0, gp_XY( 38993.90, 32767.64 ) )
70 garonne.AddPoint( 0, gp_XY( 39678.58, 32533.58 ) )
71 garonne.AddPoint( 0, gp_XY( 40240.26, 32305.27 ) )
72 garonne.AddPoint( 0, gp_XY( 40717.94, 32193.70 ) )
73 garonne.AddPoint( 0, gp_XY( 41361.00, 32464.18 ) )
74 garonne.AddPoint( 0, gp_XY( 41831.41, 32626.69 ) )
75 garonne.AddPoint( 0, gp_XY( 41950.14, 32618.24 ) )
76 garonne.AddPoint( 0, gp_XY( 42524.97, 32419.61 ) )
77 garonne.AddPoint( 0, gp_XY( 42909.80, 32291.33 ) )
78 garonne.AddPoint( 0, gp_XY( 43177.03, 32269.95 ) )
79 garonne.AddPoint( 0, gp_XY( 43465.65, 32344.78 ) )
80 garonne.AddPoint( 0, gp_XY( 43754.27, 32152.37 ) )
81 garonne.AddPoint( 0, gp_XY( 44128.40, 31842.37 ) )
82 garonne.AddPoint( 0, gp_XY( 44003.90, 31269.93 ) )
83 garonne.AddPoint( 0, gp_XY( 44010.82, 30869.63 ) )
84 garonne.AddPoint( 0, gp_XY( 44064.26, 30655.84 ) )
85 garonne.AddPoint( 0, gp_XY( 44434.73, 30366.18 ) )
86 garonne.AddPoint( 0, gp_XY( 45208.04, 30484.81 ) )
87 garonne.AddPoint( 0, gp_XY( 45705.01, 30287.34 ) )
88 garonne.AddPoint( 0, gp_XY( 45933.89, 30046.87 ) )
89 garonne.AddPoint( 0, gp_XY( 46127.34, 29490.68 ) )
90 garonne.AddPoint( 0, gp_XY( 46111.60, 29226.08 ) )
91 garonne.AddPoint( 0, gp_XY( 46228.62, 28784.05 ) )
92 garonne.AddPoint( 0, gp_XY( 46247.64, 28449.75 ) )
93 garonne.AddPoint( 0, gp_XY( 46108.48, 28086.94 ) )
94 garonne.AddPoint( 0, gp_XY( 45618.52, 27553.74 ) )
95 garonne.AddPoint( 0, gp_XY( 45276.77, 27042.78 ) )
96 garonne.AddPoint( 0, gp_XY( 45001.89, 26273.15 ) )
97 garonne.AddPoint( 0, gp_XY( 45167.76, 25975.34 ) )
98 garonne.AddPoint( 0, gp_XY( 46018.15, 25848.84 ) )
99 garonne.AddPoint( 0, gp_XY( 46378.94, 25872.21 ) )
100 garonne.AddPoint( 0, gp_XY( 46885.57, 25937.64 ) )
101 garonne.AddPoint( 0, gp_XY( 47278.36, 25782.88 ) )
102 garonne.AddPoint( 0, gp_XY( 47153.86, 25728.04 ) )
103 garonne.AddPoint( 0, gp_XY( 46987.51, 25749.97 ) )
104 garonne.AddPoint( 0, gp_XY( 46658.26, 25715.71 ) )
105 garonne.AddPoint( 0, gp_XY( 45650.76, 25634.46 ) )
106 garonne.AddPoint( 0, gp_XY( 45122.63, 25748.21 ) )
107 garonne.AddPoint( 0, gp_XY( 44797.63, 26325.09 ) )
108 garonne.AddPoint( 0, gp_XY( 45114.51, 27168.75 ) )
109 garonne.AddPoint( 0, gp_XY( 45508.28, 27713.21 ) )
110 garonne.AddPoint( 0, gp_XY( 45994.19, 28382.53 ) )
111 garonne.AddPoint( 0, gp_XY( 45927.01, 29201.34 ) )
112 garonne.AddPoint( 0, gp_XY( 45756.39, 29859.47 ) )
113 garonne.AddPoint( 0, gp_XY( 45390.76, 30151.97 ) )
114 garonne.AddPoint( 0, gp_XY( 45039.85, 30120.84 ) )
115 garonne.AddPoint( 0, gp_XY( 44513.26, 30084.28 ) )
116 garonne.AddPoint( 0, gp_XY( 43923.42, 30426.28 ) )
117 garonne.AddPoint( 0, gp_XY( 43768.81, 30934.29 ) )
118 garonne.AddPoint( 0, gp_XY( 43820.10, 31425.20 ) )
119 garonne.AddPoint( 0, gp_XY( 43854.78, 31801.12 ) )
120 garonne.AddPoint( 0, gp_XY( 43479.64, 32053.54 ) )
121 garonne.AddPoint( 0, gp_XY( 42923.47, 32051.85 ) )
122 garonne.AddPoint( 0, gp_XY( 42493.64, 32187.97 ) )
123 garonne.AddPoint( 0, gp_XY( 42074.27, 32302.91 ) )
124 garonne.AddPoint( 0, gp_XY( 41624.75, 32330.93 ) )
125 garonne.AddPoint( 0, gp_XY( 41325.93, 32187.97 ) )
126 garonne.AddPoint( 0, gp_XY( 40879.52, 31987.29 ) )
127 garonne.AddPoint( 0, gp_XY( 40308.78, 32018.46 ) )
128 garonne.AddPoint( 0, gp_XY( 39782.86, 32207.17 ) )
129 garonne.AddPoint( 0, gp_XY( 38814.10, 32560.43 ) )
130 garonne.AddPoint( 0, gp_XY( 38302.17, 32903.70 ) )
131
132 garonne.Update()
133
134
135 domaine = hydro_doc.CreateObject( KIND_POLYLINEXY )
136 domaine.SetName( "domaine" )
137
138 domaine.SetZLevel( 3 )
139
140 domaine.AddSection( "Section_1", 0, 1 )
141 domaine.AddPoint( 0, gp_XY( 39901.15, 34762.30 ) );
142 domaine.AddPoint( 0, gp_XY( 38086.50, 29964.69 ) );
143 domaine.AddPoint( 0, gp_XY( 44835.83, 24264.97 ) );
144 domaine.AddPoint( 0, gp_XY( 46758.56, 25021.86 ) );
145 domaine.AddPoint( 0, gp_XY( 46757.20, 26601.21 ) );
146 domaine.AddPoint( 0, gp_XY( 48566.45, 30152.81 ) );
147 domaine.AddPoint( 0, gp_XY( 45532.36, 33239.83 ) );
148 domaine.AddPoint( 0, gp_XY( 43548.77, 34048.39 ) );
149
150 domaine.Update()
151
152
153 lit_majeur = hydro_doc.CreateObject( KIND_POLYLINEXY )
154 lit_majeur.SetName( "lit_majeur" )
155
156 lit_majeur.SetZLevel( 7 )
157
158 lit_majeur.AddSection( "Section_1", 1, 1 )
159 lit_majeur.AddPoint( 0, gp_XY( 41225.22, 34118.46 ) )
160 lit_majeur.AddPoint( 0, gp_XY( 41716.41, 33705.87 ) )
161 lit_majeur.AddPoint( 0, gp_XY( 42384.43, 33293.27 ) )
162 lit_majeur.AddPoint( 0, gp_XY( 42561.26, 32684.19 ) )
163 lit_majeur.AddPoint( 0, gp_XY( 42875.62, 32369.83 ) )
164 lit_majeur.AddPoint( 0, gp_XY( 43700.82, 32350.18 ) )
165 lit_majeur.AddPoint( 0, gp_XY( 44526.02, 31662.51 ) )
166 lit_majeur.AddPoint( 0, gp_XY( 45370.87, 31819.69 ) )
167 lit_majeur.AddPoint( 0, gp_XY( 46274.66, 31682.16 ) )
168 lit_majeur.AddPoint( 0, gp_XY( 46981.97, 31328.50 ) )
169 lit_majeur.AddPoint( 0, gp_XY( 47021.27, 30719.43 ) )
170 lit_majeur.AddPoint( 0, gp_XY( 47217.74, 30051.41 ) )
171 lit_majeur.AddPoint( 0, gp_XY( 47846.46, 29560.22 ) )
172 lit_majeur.AddPoint( 0, gp_XY( 48730.61, 28735.02 ) )
173 lit_majeur.AddPoint( 0, gp_XY( 48809.20, 27732.99 ) )
174 lit_majeur.AddPoint( 0, gp_XY( 49143.21, 27163.21 ) )
175 lit_majeur.AddPoint( 0, gp_XY( 49654.05, 26829.20 ) )
176 lit_majeur.AddPoint( 0, gp_XY( 49693.34, 25355.63 ) )
177 lit_majeur.AddPoint( 0, gp_XY( 48612.72, 23214.04 ) )
178 lit_majeur.AddPoint( 0, gp_XY( 47453.51, 23115.80 ) )
179 lit_majeur.AddPoint( 0, gp_XY( 46471.13, 24176.77 ) )
180 lit_majeur.AddPoint( 0, gp_XY( 45960.29, 25257.39 ) )
181 lit_majeur.AddPoint( 0, gp_XY( 44899.32, 25591.40 ) )
182 lit_majeur.AddPoint( 0, gp_XY( 44270.60, 26573.78 ) )
183 lit_majeur.AddPoint( 0, gp_XY( 43248.92, 27909.82 ) )
184 lit_majeur.AddPoint( 0, gp_XY( 42757.73, 28243.83 ) )
185 lit_majeur.AddPoint( 0, gp_XY( 42266.54, 28342.07 ) )
186 lit_majeur.AddPoint( 0, gp_XY( 41736.06, 28106.30 ) )
187 lit_majeur.AddPoint( 0, gp_XY( 41402.05, 28833.26 ) )
188 lit_majeur.AddPoint( 0, gp_XY( 40910.86, 28911.85 ) )
189 lit_majeur.AddPoint( 0, gp_XY( 40576.85, 29324.45 ) )
190 lit_majeur.AddPoint( 0, gp_XY( 40144.60, 29599.51 ) )
191 lit_majeur.AddPoint( 0, gp_XY( 39024.69, 30130.00 ) )
192 lit_majeur.AddPoint( 0, gp_XY( 38612.09, 30365.77 ) )
193 lit_majeur.AddPoint( 0, gp_XY( 38828.21, 33391.50 ) )
194
195 lit_majeur.Update()
196
197
198 Cloud_02 = hydro_doc.CreateObject( KIND_BATHYMETRY )
199 Cloud_02.SetName( "Cloud_02" )
200
201 Cloud_02.SetAltitudesInverted( 0 )
202 if not(Cloud_02.ImportFromFile( os.path.join(HYDRO_SAMPLES, "Cloud_02.xyz" ))):
203   raise ValueError('problem while loading bathymetry')
204
205 Cloud_02.Update()
206
207
208 garonne_point_L93 = hydro_doc.CreateObject( KIND_BATHYMETRY )
209 garonne_point_L93.SetName( "garonne_point_L93" )
210
211 garonne_point_L93.SetAltitudesInverted( 0 )
212 if not(garonne_point_L93.ImportFromFile( os.path.join(HYDRO_SAMPLES, "garonne_point_L93.xyz" ))):
213   raise ValueError('problem while loading bathymetry')
214
215 garonne_point_L93.Update()
216
217
218 litMineur = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
219 litMineur.SetName( "litMineur" )
220
221 litMineur.SetZLevel( 6 )
222
223 litMineur.SetAltitudeObject( garonne_point_L93 )
224 litMineur.SetPolyline( garonne )
225
226 litMineur.Update()
227
228
229 litMajeur = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
230 litMajeur.SetName( "litMajeur" )
231
232 litMajeur.SetZLevel( 5 )
233
234 litMajeur.SetFillingColor( QColor( 0, 170, 127, 255 ) )
235
236 litMajeur.SetAltitudeObject( Cloud_02 )
237 litMajeur.SetPolyline( lit_majeur )
238
239 litMajeur.Update()
240
241
242 domaineEtendu = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
243 domaineEtendu.SetName( "domaineEtendu" )
244
245 domaineEtendu.SetZLevel( 4 )
246
247 domaineEtendu.SetFillingColor( QColor( 201, 203, 55, 255 ) )
248
249 domaineEtendu.SetAltitudeObject( Cloud_02 )
250 domaineEtendu.SetPolyline( domaine )
251
252 domaineEtendu.Update()
253
254
255 # Calculation case
256 garonne_1 = hydro_doc.CreateObject( KIND_CALCULATION )
257 garonne_1.SetName( "garonne_1" )
258
259 garonne_1.SetAssignmentMode( HYDROData_CalculationCase.MANUAL )
260 garonne_1.AddGeometryObject( litMineur )
261 garonne_1.AddGeometryObject( domaineEtendu )
262 garonne_1.AddGeometryObject( litMajeur )
263
264 case_geom_group = domaineEtendu.GetGroup( 0 )
265 garonne_1.AddGeometryGroup( case_geom_group )
266 case_geom_group = litMineur.GetGroup( 0 )
267 garonne_1.AddGeometryGroup( case_geom_group )
268 case_geom_group = litMajeur.GetGroup( 0 )
269 garonne_1.AddGeometryGroup( case_geom_group )
270 garonne_1.SetBoundaryPolyline( domaine )
271 #garonne_1.SetStricklerTable( Strickler_table_1 )
272
273 # Start the algorithm of the partition and assignment
274 garonne_1.Update()
275 garonne_1_litMineur = hydro_doc.FindObjectByName( "garonne_1_Reg_1" )
276 garonne_1_Zone_1 = hydro_doc.FindObjectByName( "garonne_1_Zone_1" )
277 garonne_1_Zone_1.SetMergeType( HYDROData_Zone.Merge_ZMIN )
278 garonne_1_Zone_1.SetColor( QColor( 192, 113, 64 ))
279 garonne_1_litMineur.AddZone( garonne_1_Zone_1 )
280
281 garonne_1_riveDroite = hydro_doc.FindObjectByName( "garonne_1_Reg_2" )
282 garonne_1_Zone_2 = hydro_doc.FindObjectByName( "garonne_1_Zone_2" )
283 garonne_1_Zone_2.SetColor( QColor( 141, 192, 64 ))
284 garonne_1_riveDroite.AddZone( garonne_1_Zone_2 )
285
286 garonne_1_Zone_3 = hydro_doc.FindObjectByName( "garonne_1_Zone_3" )
287 garonne_1_Zone_3.SetMergeType( HYDROData_Zone.Merge_Object )
288 Cloud_02 = hydro_doc.FindObjectByName( "Cloud_02" )
289 garonne_1_Zone_3.SetMergeObject( Cloud_02 )
290 garonne_1_Zone_3.SetColor( QColor( 64, 192, 77 ))
291 garonne_1_riveDroite.AddZone( garonne_1_Zone_3 )
292
293 garonne_1_riveGauche = hydro_doc.FindObjectByName( "garonne_1_Reg_3" )
294 garonne_1_Zone_4 = hydro_doc.FindObjectByName( "garonne_1_Zone_4" )
295 garonne_1_Zone_4.SetMergeType( HYDROData_Zone.Merge_Object )
296 Cloud_02 = hydro_doc.FindObjectByName( "Cloud_02" )
297 garonne_1_Zone_4.SetMergeObject( Cloud_02 )
298 garonne_1_Zone_4.SetColor( QColor( 64, 75, 192 ))
299 garonne_1_riveGauche.AddZone( garonne_1_Zone_4 )
300
301 garonne_1_Zone_5 = hydro_doc.FindObjectByName( "garonne_1_Zone_5" )
302 garonne_1_Zone_5.SetColor( QColor( 64, 192, 77 ))
303 garonne_1_riveGauche.AddZone( garonne_1_Zone_5 )
304
305 garonne_1_litMineur.SetName( "garonne_1_litMineur" )
306 garonne_1_riveDroite.SetName( "garonne_1_riveDroite" )
307 garonne_1_riveGauche.SetName( "garonne_1_riveGauche" )
308
309 # Export of the calculation case
310 garonne_1_entry = garonne_1.Export( theStudy._get_StudyId() )
311
312 #----------------------
313 # --- Geometry
314 #----------------------
315
316 # Get geometry shape and print debug information
317 import GEOM
318 from salome.geom import geomBuilder
319 import math
320 import SALOMEDS
321 from salome.hydrotools.controls import controlGeomProps
322
323 geompy = geomBuilder.New(theStudy)
324
325 print("Entry:", garonne_1_entry)
326 HYDRO_garonne_1 = salome.IDToObject( str( garonne_1_entry ) )
327 print("Geom shape:", HYDRO_garonne_1)
328 print("Geom shape name:", HYDRO_garonne_1.GetName())
329
330 [garonne_litMineur,garonne_riveDroite,garonne_riveGauche] = geompy.SubShapeAll(HYDRO_garonne_1, geompy.ShapeType["FACE"])
331
332 controlGeomProps(geompy, garonne_riveGauche,  29149.36918,  35948828.352061)
333 controlGeomProps(geompy, garonne_litMineur,   30337.548492,  3488480.304388)
334 controlGeomProps(geompy, garonne_riveDroite,  32012.343241, 25998769.23615)
335
336 # --- manual identification of all useful edge groups (boundary conditions)
337
338 allEdgesIds = geompy.SubShapeAllIDs(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
339 print("allEdgesIds", allEdgesIds)
340
341 (isDone, ClosedFreeBoundary, OpenFreeBoundary) = geompy.GetFreeBoundary(HYDRO_garonne_1)
342 geompy.addToStudyInFather(HYDRO_garonne_1, ClosedFreeBoundary[0], "ClosedFreeBoundary")
343
344 freeBoundary = geompy.ExtractShapes(ClosedFreeBoundary[0], geompy.ShapeType["EDGE"], True)
345 freeBoundaryIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, freeBoundary[i]) for i in range(len(freeBoundary)) ]
346 print("freeBoundaryIds", freeBoundaryIds)
347
348 [litMineur_droite] = geompy.GetSharedShapesMulti([garonne_riveDroite, garonne_litMineur], geompy.ShapeType["EDGE"], True)
349 [litMineur_gauche] = geompy.GetSharedShapesMulti([garonne_riveGauche, garonne_litMineur], geompy.ShapeType["EDGE"], True)
350 geompy.addToStudyInFather(HYDRO_garonne_1, litMineur_droite, "litMineur_droite")
351 geompy.addToStudyInFather(HYDRO_garonne_1, litMineur_gauche, "litMineur_gauche")
352 rives = [litMineur_droite, litMineur_gauche]
353 rivesIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, rives[i]) for i in range(len(rives)) ]
354 print("rivesIds", rivesIds)
355
356 edges_litMineur = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_litMineur], geompy.ShapeType["EDGE"], True)
357 edges_riveGauche = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_riveGauche], geompy.ShapeType["EDGE"], True)
358 edges_riveDroite = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_riveDroite], geompy.ShapeType["EDGE"], True)
359 edges_litMineurIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_litMineur[i]) for i in range(len(edges_litMineur)) ]
360 edges_riveGaucheIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_riveGauche[i]) for i in range(len(edges_riveGauche)) ]
361 edges_riveDroiteIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_riveDroite[i]) for i in range(len(edges_riveDroite)) ]
362
363 print("edges_litMineurIds", edges_litMineurIds) 
364 print("edges_riveGaucheIds", edges_riveGaucheIds)
365 print("edges_riveDroiteIds", edges_riveDroiteIds)
366
367 sectionsIds = [Id for Id in edges_litMineurIds if Id not in rivesIds]
368 print("sectionsIds", sectionsIds)
369 SectionsGaronne = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
370 geompy.UnionIDs(SectionsGaronne, sectionsIds)
371 geompy.addToStudyInFather(HYDRO_garonne_1, SectionsGaronne, "SectionsGaronne")
372
373 bordGaucheDomaineIds = [Id for Id in freeBoundaryIds if Id in edges_riveGaucheIds]
374 bordDroiteDomaineIds = [Id for Id in freeBoundaryIds if Id in edges_riveDroiteIds]
375 print("bordGaucheDomaineIds", bordGaucheDomaineIds)
376 print("bordDroiteDomaineIds", bordDroiteDomaineIds)
377 bordGaucheDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
378 geompy.UnionIDs(bordGaucheDomaine, bordGaucheDomaineIds)
379 geompy.addToStudyInFather(HYDRO_garonne_1, bordGaucheDomaine, "bordGaucheDomaine")
380 bordDroiteDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
381 geompy.UnionIDs(bordDroiteDomaine, bordDroiteDomaineIds)
382 geompy.addToStudyInFather(HYDRO_garonne_1, bordDroiteDomaine, "bordDroiteDomaine")
383
384 amont = geompy.GetEdgeNearPoint(HYDRO_garonne_1, geompy.MakeVertex(46757.861314, 25833.234752, 0))
385 aval = geompy.GetEdgeNearPoint(HYDRO_garonne_1, geompy.MakeVertex(39078.979127, 32588.627279, 0))
386 geompy.addToStudyInFather(HYDRO_garonne_1, amont, "amont")
387 geompy.addToStudyInFather(HYDRO_garonne_1, aval, "aval")
388
389 if salome.sg.hasDesktop():
390   salome.sg.updateObjBrowser(1)