Salome HOME
Python test scripts, first pass
[modules/hydro.git] / doc / salome / examples / h016_pilesPontManualMesh.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 ###
7 ### This file is generated automatically by SALOME v7.8.0 with dump python functionality
8 ###
9
10 import sys
11 import salome
12
13 salome.salome_init()
14 theStudy = salome.myStudy
15
16 ###
17 ### HYDRO component
18 ###
19
20 from HYDROPy import *
21 from PyQt5.QtCore import *
22 from PyQt5.QtGui import *
23
24 hydro_doc = HYDROData_Document.Document()
25
26 hydro_doc.SetLocalCS( 430000.000, 6350000.000 )
27
28 garonne_ign_01 = hydro_doc.CreateObject( KIND_IMAGE )
29 garonne_ign_01.SetName( "garonne_ign_01" )
30
31 garonne_ign_01.SetZLevel( 0 )
32
33
34
35 if not(garonne_ign_01.LoadImage(os.path.join(HYDRO_SAMPLES, "garonne_ign_01.png" ))):
36   raise ValueError('problem while loading image')
37
38 garonne_ign_01.SetLocalPoints( QPoint( 40, 817 ),
39                                QPoint( 1325, 85 ) )
40
41 garonne_ign_01.SetGlobalPoints( 1,
42                                 QPointF( 471562.000, 6367750.000 ),
43                                 QPointF( 489400.000, 6377020.000 ) )
44
45 garonne_ign_01.Update()
46
47 garonne_ign_02 = hydro_doc.CreateObject( KIND_IMAGE )
48 garonne_ign_02.SetName( "garonne_ign_02" )
49
50 garonne_ign_02.SetZLevel( 1 )
51
52
53 if not(garonne_ign_02.LoadImage(  os.path.join(HYDRO_SAMPLES, "garonne_ign_02.png" ))):
54   raise ValueError('problem while loading image')
55
56 garonne_ign_02.SetLocalPoints( QPoint( 1389, 447 ),
57                                QPoint( 784, 481 ) )
58
59 garonne_ign_02.SetGlobalPoints( 3,
60                                 QPointF( 631.000, 95.000 ),
61                                 QPointF( 26.000, 129.000 ) )
62 garonne_ign_02.SetTrsfReferenceImage( garonne_ign_01 )
63
64 garonne_ign_02.Update()
65
66 Strickler_table_1 = hydro_doc.CreateObject( KIND_STRICKLER_TABLE )
67 Strickler_table_1.SetName( "Strickler table_1" )
68
69 Strickler_table_1.SetAttrName( "CODE_06" )
70
71 Strickler_table_1.Set( "Pelouses et pâturages naturels", 1.0321 )
72 Strickler_table_1.SetAttrValue( "Pelouses et pâturages naturels", "321" )
73 Strickler_table_1.SetColor( "Pelouses et pâturages naturels", QColor( 204, 242, 77 ) )
74
75 Strickler_table_1.Set( "Aéroports", 1.0124 )
76 Strickler_table_1.SetAttrValue( "Aéroports", "124" )
77 Strickler_table_1.SetColor( "Aéroports", QColor( 230, 204, 230 ) )
78
79 Strickler_table_1.Set( "Systèmes culturaux et parcellaires complexes", 1.0242 )
80 Strickler_table_1.SetAttrValue( "Systèmes culturaux et parcellaires complexes", "242" )
81 Strickler_table_1.SetColor( "Systèmes culturaux et parcellaires complexes", QColor( 255, 230, 77 ) )
82
83 Strickler_table_1.Set( "Cultures annuelles associées à des cultures permanentes", 1.0241 )
84 Strickler_table_1.SetAttrValue( "Cultures annuelles associées à des cultures permanentes", "241" )
85 Strickler_table_1.SetColor( "Cultures annuelles associées à des cultures permanentes", QColor( 255, 230, 166 ) )
86
87 Strickler_table_1.Set( "Forêt et végétation arbustive en mutation", 1.0324 )
88 Strickler_table_1.SetAttrValue( "Forêt et végétation arbustive en mutation", "324" )
89 Strickler_table_1.SetColor( "Forêt et végétation arbustive en mutation", QColor( 166, 242, 0 ) )
90
91 Strickler_table_1.Set( "Décharges", 1.0132 )
92 Strickler_table_1.SetAttrValue( "Décharges", "132" )
93 Strickler_table_1.SetColor( "Décharges", QColor( 166, 77, 0 ) )
94
95 Strickler_table_1.Set( "Végétation clairsemée", 1.0333 )
96 Strickler_table_1.SetAttrValue( "Végétation clairsemée", "333" )
97 Strickler_table_1.SetColor( "Végétation clairsemée", QColor( 204, 255, 204 ) )
98
99 Strickler_table_1.Set( "Prairies et autres surfaces toujours en herbe à usage agricole", 1.0231 )
100 Strickler_table_1.SetAttrValue( "Prairies et autres surfaces toujours en herbe à usage agricole", "231" )
101 Strickler_table_1.SetColor( "Prairies et autres surfaces toujours en herbe à usage agricole", QColor( 230, 230, 77 ) )
102
103 Strickler_table_1.Set( "Périmètres irrigués en permanence", 1.0212 )
104 Strickler_table_1.SetAttrValue( "Périmètres irrigués en permanence", "212" )
105 Strickler_table_1.SetColor( "Périmètres irrigués en permanence", QColor( 255, 255, 0 ) )
106
107 Strickler_table_1.Set( "Plans d'eau", 1.0512 )
108 Strickler_table_1.SetAttrValue( "Plans d'eau", "512" )
109 Strickler_table_1.SetColor( "Plans d'eau", QColor( 128, 242, 230 ) )
110
111 Strickler_table_1.Set( "Territoires agroforestiers", 1.0244 )
112 Strickler_table_1.SetAttrValue( "Territoires agroforestiers", "244" )
113 Strickler_table_1.SetColor( "Territoires agroforestiers", QColor( 242, 204, 166 ) )
114
115 Strickler_table_1.Set( "Forêts mélangées", 1.0313 )
116 Strickler_table_1.SetAttrValue( "Forêts mélangées", "313" )
117 Strickler_table_1.SetColor( "Forêts mélangées", QColor( 77, 255, 0 ) )
118
119 Strickler_table_1.Set( "Glaciers et neiges éternelles", 1.0335 )
120 Strickler_table_1.SetAttrValue( "Glaciers et neiges éternelles", "335" )
121 Strickler_table_1.SetColor( "Glaciers et neiges éternelles", QColor( 166, 230, 204 ) )
122
123 Strickler_table_1.Set( "Plages, dunes et sable", 1.0331 )
124 Strickler_table_1.SetAttrValue( "Plages, dunes et sable", "331" )
125 Strickler_table_1.SetColor( "Plages, dunes et sable", QColor( 230, 230, 230 ) )
126
127 Strickler_table_1.Set( "Zones incendiées", 1.0334 )
128 Strickler_table_1.SetAttrValue( "Zones incendiées", "334" )
129 Strickler_table_1.SetColor( "Zones incendiées", QColor( 0, 0, 0 ) )
130
131 Strickler_table_1.Set( "Tissu urbain continu", 1.0111 )
132 Strickler_table_1.SetAttrValue( "Tissu urbain continu", "111" )
133 Strickler_table_1.SetColor( "Tissu urbain continu", QColor( 230, 0, 77 ) )
134
135 Strickler_table_1.Set( "Chantiers", 1.0133 )
136 Strickler_table_1.SetAttrValue( "Chantiers", "133" )
137 Strickler_table_1.SetColor( "Chantiers", QColor( 255, 77, 255 ) )
138
139 Strickler_table_1.Set( "Estuaires", 1.0522 )
140 Strickler_table_1.SetAttrValue( "Estuaires", "522" )
141 Strickler_table_1.SetColor( "Estuaires", QColor( 166, 255, 230 ) )
142
143 Strickler_table_1.Set( "Marais maritimes", 1.0421 )
144 Strickler_table_1.SetAttrValue( "Marais maritimes", "421" )
145 Strickler_table_1.SetColor( "Marais maritimes", QColor( 204, 204, 255 ) )
146
147 Strickler_table_1.Set( "Forêts de conifères", 1.0312 )
148 Strickler_table_1.SetAttrValue( "Forêts de conifères", "312" )
149 Strickler_table_1.SetColor( "Forêts de conifères", QColor( 0, 166, 0 ) )
150
151 Strickler_table_1.Set( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", 1.0243 )
152 Strickler_table_1.SetAttrValue( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", "243" )
153 Strickler_table_1.SetColor( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", QColor( 230, 204, 77 ) )
154
155 Strickler_table_1.Set( "Tourbières", 1.0412 )
156 Strickler_table_1.SetAttrValue( "Tourbières", "412" )
157 Strickler_table_1.SetColor( "Tourbières", QColor( 77, 77, 255 ) )
158
159 Strickler_table_1.Set( "Extraction de matériaux", 1.0131 )
160 Strickler_table_1.SetAttrValue( "Extraction de matériaux", "131" )
161 Strickler_table_1.SetColor( "Extraction de matériaux", QColor( 166, 0, 204 ) )
162
163 Strickler_table_1.Set( "Réseaux routier et ferroviaire et espaces associés", 1.0122 )
164 Strickler_table_1.SetAttrValue( "Réseaux routier et ferroviaire et espaces associés", "122" )
165 Strickler_table_1.SetColor( "Réseaux routier et ferroviaire et espaces associés", QColor( 204, 0, 0 ) )
166
167 Strickler_table_1.Set( "Mers et océans", 1.0523 )
168 Strickler_table_1.SetAttrValue( "Mers et océans", "523" )
169 Strickler_table_1.SetColor( "Mers et océans", QColor( 230, 242, 255 ) )
170
171 Strickler_table_1.Set( "Equipements sportifs et de loisirs", 1.0142 )
172 Strickler_table_1.SetAttrValue( "Equipements sportifs et de loisirs", "142" )
173 Strickler_table_1.SetColor( "Equipements sportifs et de loisirs", QColor( 255, 230, 255 ) )
174
175 Strickler_table_1.Set( "Forêts de feuillus", 1.0311 )
176 Strickler_table_1.SetAttrValue( "Forêts de feuillus", "311" )
177 Strickler_table_1.SetColor( "Forêts de feuillus", QColor( 128, 255, 0 ) )
178
179 Strickler_table_1.Set( "Vergers et petits fruits", 1.0222 )
180 Strickler_table_1.SetAttrValue( "Vergers et petits fruits", "222" )
181 Strickler_table_1.SetColor( "Vergers et petits fruits", QColor( 242, 166, 77 ) )
182
183 Strickler_table_1.Set( "Végétation sclérophylle", 1.0323 )
184 Strickler_table_1.SetAttrValue( "Végétation sclérophylle", "323" )
185 Strickler_table_1.SetColor( "Végétation sclérophylle", QColor( 166, 230, 77 ) )
186
187 Strickler_table_1.Set( "Landes et broussailles", 1.0322 )
188 Strickler_table_1.SetAttrValue( "Landes et broussailles", "322" )
189 Strickler_table_1.SetColor( "Landes et broussailles", QColor( 166, 255, 128 ) )
190
191 Strickler_table_1.Set( "Tissu urbain discontinu", 1.0112 )
192 Strickler_table_1.SetAttrValue( "Tissu urbain discontinu", "112" )
193 Strickler_table_1.SetColor( "Tissu urbain discontinu", QColor( 255, 0, 0 ) )
194
195 Strickler_table_1.Set( "Cours et voies d'eau", 1.0511 )
196 Strickler_table_1.SetAttrValue( "Cours et voies d'eau", "511" )
197 Strickler_table_1.SetColor( "Cours et voies d'eau", QColor( 0, 204, 242 ) )
198
199 Strickler_table_1.Set( "Oliveraies", 1.0223 )
200 Strickler_table_1.SetAttrValue( "Oliveraies", "223" )
201 Strickler_table_1.SetColor( "Oliveraies", QColor( 230, 166, 0 ) )
202
203 Strickler_table_1.Set( "Vignobles", 1.0221 )
204 Strickler_table_1.SetAttrValue( "Vignobles", "221" )
205 Strickler_table_1.SetColor( "Vignobles", QColor( 230, 128, 0 ) )
206
207 Strickler_table_1.Set( "Rizières", 1.0213 )
208 Strickler_table_1.SetAttrValue( "Rizières", "213" )
209 Strickler_table_1.SetColor( "Rizières", QColor( 230, 230, 0 ) )
210
211 Strickler_table_1.Set( "Zones portuaires", 1.0123 )
212 Strickler_table_1.SetAttrValue( "Zones portuaires", "123" )
213 Strickler_table_1.SetColor( "Zones portuaires", QColor( 230, 204, 204 ) )
214
215 Strickler_table_1.Set( "Zones industrielles ou commerciales et installations publiques", 1.0121 )
216 Strickler_table_1.SetAttrValue( "Zones industrielles ou commerciales et installations publiques", "121" )
217 Strickler_table_1.SetColor( "Zones industrielles ou commerciales et installations publiques", QColor( 204, 77, 242 ) )
218
219 Strickler_table_1.Set( "Marais salants", 1.0422 )
220 Strickler_table_1.SetAttrValue( "Marais salants", "422" )
221 Strickler_table_1.SetColor( "Marais salants", QColor( 230, 230, 255 ) )
222
223 Strickler_table_1.Set( "Marais intérieurs", 1.0411 )
224 Strickler_table_1.SetAttrValue( "Marais intérieurs", "411" )
225 Strickler_table_1.SetColor( "Marais intérieurs", QColor( 166, 166, 255 ) )
226
227 Strickler_table_1.Set( "Espaces verts urbains", 1.0141 )
228 Strickler_table_1.SetAttrValue( "Espaces verts urbains", "141" )
229 Strickler_table_1.SetColor( "Espaces verts urbains", QColor( 255, 166, 255 ) )
230
231 Strickler_table_1.Set( "Lagunes littorales", 1.0521 )
232 Strickler_table_1.SetAttrValue( "Lagunes littorales", "521" )
233 Strickler_table_1.SetColor( "Lagunes littorales", QColor( 0, 255, 166 ) )
234
235 Strickler_table_1.Set( "Roches nues", 1.0332 )
236 Strickler_table_1.SetAttrValue( "Roches nues", "332" )
237 Strickler_table_1.SetColor( "Roches nues", QColor( 204, 204, 204 ) )
238
239 Strickler_table_1.Set( "Terres arables hors périmètres d'irrigation", 1.0211 )
240 Strickler_table_1.SetAttrValue( "Terres arables hors périmètres d'irrigation", "211" )
241 Strickler_table_1.SetColor( "Terres arables hors périmètres d'irrigation", QColor( 255, 255, 168 ) )
242
243 Strickler_table_1.Set( "Zones intertidales", 1.0423 )
244 Strickler_table_1.SetAttrValue( "Zones intertidales", "423" )
245 Strickler_table_1.SetColor( "Zones intertidales", QColor( 166, 166, 230 ) )
246
247
248 Strickler_table_1.Update()
249
250 garonne = hydro_doc.CreateObject( KIND_POLYLINEXY )
251 garonne.SetName( "garonne" )
252
253 garonne.SetZLevel( 2 )
254
255 garonne.AddSection( "Section_1", 1, 1 )
256 garonne.AddPoint( 0, gp_XY( 38191.48, 33184.55 ) )
257 garonne.AddPoint( 0, gp_XY( 38553.78, 33013.53 ) )
258 garonne.AddPoint( 0, gp_XY( 38993.90, 32767.64 ) )
259 garonne.AddPoint( 0, gp_XY( 39678.58, 32533.58 ) )
260 garonne.AddPoint( 0, gp_XY( 40240.26, 32305.27 ) )
261 garonne.AddPoint( 0, gp_XY( 40717.94, 32193.70 ) )
262 garonne.AddPoint( 0, gp_XY( 41361.00, 32464.18 ) )
263 garonne.AddPoint( 0, gp_XY( 41831.41, 32626.69 ) )
264 garonne.AddPoint( 0, gp_XY( 41950.14, 32618.24 ) )
265 garonne.AddPoint( 0, gp_XY( 42524.97, 32419.61 ) )
266 garonne.AddPoint( 0, gp_XY( 42616.62, 32385.32 ) )
267 garonne.AddPoint( 0, gp_XY( 42693.37, 32357.54 ) )
268 garonne.AddPoint( 0, gp_XY( 42779.45, 32327.87 ) )
269 garonne.AddPoint( 0, gp_XY( 42909.80, 32291.33 ) )
270 garonne.AddPoint( 0, gp_XY( 43177.03, 32269.95 ) )
271 garonne.AddPoint( 0, gp_XY( 43465.65, 32344.78 ) )
272 garonne.AddPoint( 0, gp_XY( 43754.27, 32152.37 ) )
273 garonne.AddPoint( 0, gp_XY( 44128.40, 31842.37 ) )
274 garonne.AddPoint( 0, gp_XY( 44003.90, 31269.93 ) )
275 garonne.AddPoint( 0, gp_XY( 44010.82, 30869.63 ) )
276 garonne.AddPoint( 0, gp_XY( 44064.26, 30655.84 ) )
277 garonne.AddPoint( 0, gp_XY( 44434.73, 30366.18 ) )
278 garonne.AddPoint( 0, gp_XY( 45208.04, 30484.81 ) )
279 garonne.AddPoint( 0, gp_XY( 45705.01, 30287.34 ) )
280 garonne.AddPoint( 0, gp_XY( 45933.89, 30046.87 ) )
281 garonne.AddPoint( 0, gp_XY( 46127.34, 29490.68 ) )
282 garonne.AddPoint( 0, gp_XY( 46111.60, 29226.08 ) )
283 garonne.AddPoint( 0, gp_XY( 46228.62, 28784.05 ) )
284 garonne.AddPoint( 0, gp_XY( 46247.64, 28449.75 ) )
285 garonne.AddPoint( 0, gp_XY( 46108.48, 28086.94 ) )
286 garonne.AddPoint( 0, gp_XY( 45618.52, 27553.74 ) )
287 garonne.AddPoint( 0, gp_XY( 45276.77, 27042.78 ) )
288 garonne.AddPoint( 0, gp_XY( 45001.89, 26273.15 ) )
289 garonne.AddPoint( 0, gp_XY( 45167.76, 25975.34 ) )
290 garonne.AddPoint( 0, gp_XY( 46018.15, 25848.84 ) )
291 garonne.AddPoint( 0, gp_XY( 46378.94, 25872.21 ) )
292 garonne.AddPoint( 0, gp_XY( 46885.57, 25937.64 ) )
293 garonne.AddPoint( 0, gp_XY( 47278.36, 25782.88 ) )
294 garonne.AddPoint( 0, gp_XY( 47153.86, 25728.04 ) )
295 garonne.AddPoint( 0, gp_XY( 46987.51, 25749.97 ) )
296 garonne.AddPoint( 0, gp_XY( 46658.26, 25715.71 ) )
297 garonne.AddPoint( 0, gp_XY( 45650.76, 25634.46 ) )
298 garonne.AddPoint( 0, gp_XY( 45122.63, 25748.21 ) )
299 garonne.AddPoint( 0, gp_XY( 44797.63, 26325.09 ) )
300 garonne.AddPoint( 0, gp_XY( 45114.51, 27168.75 ) )
301 garonne.AddPoint( 0, gp_XY( 45508.28, 27713.21 ) )
302 garonne.AddPoint( 0, gp_XY( 45994.19, 28382.53 ) )
303 garonne.AddPoint( 0, gp_XY( 45927.01, 29201.34 ) )
304 garonne.AddPoint( 0, gp_XY( 45756.39, 29859.47 ) )
305 garonne.AddPoint( 0, gp_XY( 45390.76, 30151.97 ) )
306 garonne.AddPoint( 0, gp_XY( 45039.85, 30120.84 ) )
307 garonne.AddPoint( 0, gp_XY( 44513.26, 30084.28 ) )
308 garonne.AddPoint( 0, gp_XY( 43923.42, 30426.28 ) )
309 garonne.AddPoint( 0, gp_XY( 43768.81, 30934.29 ) )
310 garonne.AddPoint( 0, gp_XY( 43820.10, 31425.20 ) )
311 garonne.AddPoint( 0, gp_XY( 43854.78, 31801.12 ) )
312 garonne.AddPoint( 0, gp_XY( 43479.64, 32053.54 ) )
313 garonne.AddPoint( 0, gp_XY( 42923.47, 32051.85 ) )
314 garonne.AddPoint( 0, gp_XY( 42695.92, 32118.36 ) )
315 garonne.AddPoint( 0, gp_XY( 42610.32, 32148.41 ) )
316 garonne.AddPoint( 0, gp_XY( 42532.63, 32175.19 ) )
317 garonne.AddPoint( 0, gp_XY( 42493.64, 32187.97 ) )
318 garonne.AddPoint( 0, gp_XY( 42074.27, 32302.91 ) )
319 garonne.AddPoint( 0, gp_XY( 41624.75, 32330.93 ) )
320 garonne.AddPoint( 0, gp_XY( 41325.93, 32187.97 ) )
321 garonne.AddPoint( 0, gp_XY( 40879.52, 31987.29 ) )
322 garonne.AddPoint( 0, gp_XY( 40308.78, 32018.46 ) )
323 garonne.AddPoint( 0, gp_XY( 39782.86, 32207.17 ) )
324 garonne.AddPoint( 0, gp_XY( 38814.10, 32560.43 ) )
325 garonne.AddPoint( 0, gp_XY( 38302.17, 32903.70 ) )
326
327 garonne.Update()
328
329
330 domaine = hydro_doc.CreateObject( KIND_POLYLINEXY )
331 domaine.SetName( "domaine" )
332
333 domaine.SetZLevel( 3 )
334
335 domaine.AddSection( "Section_1", 0, 1 )
336 domaine.AddPoint( 0, gp_XY( 39901.15, 34762.30 ) )
337 domaine.AddPoint( 0, gp_XY( 38086.50, 29964.69 ) )
338 domaine.AddPoint( 0, gp_XY( 44835.83, 24264.97 ) )
339 domaine.AddPoint( 0, gp_XY( 46758.56, 25021.86 ) )
340 domaine.AddPoint( 0, gp_XY( 46757.20, 26601.21 ) )
341 domaine.AddPoint( 0, gp_XY( 48566.45, 30152.81 ) )
342 domaine.AddPoint( 0, gp_XY( 45532.36, 33239.83 ) )
343 domaine.AddPoint( 0, gp_XY( 43548.77, 34048.39 ) )
344
345 domaine.Update()
346
347
348 lit_majeur = hydro_doc.CreateObject( KIND_POLYLINEXY )
349 lit_majeur.SetName( "lit_majeur" )
350
351 lit_majeur.SetZLevel( 7 )
352
353 lit_majeur.AddSection( "Section_1", 1, 1 )
354 lit_majeur.AddPoint( 0, gp_XY( 41225.22, 34118.46 ) )
355 lit_majeur.AddPoint( 0, gp_XY( 41716.41, 33705.87 ) )
356 lit_majeur.AddPoint( 0, gp_XY( 42384.43, 33293.27 ) )
357 lit_majeur.AddPoint( 0, gp_XY( 42561.26, 32684.19 ) )
358 lit_majeur.AddPoint( 0, gp_XY( 42875.62, 32369.83 ) )
359 lit_majeur.AddPoint( 0, gp_XY( 43700.82, 32350.18 ) )
360 lit_majeur.AddPoint( 0, gp_XY( 44526.02, 31662.51 ) )
361 lit_majeur.AddPoint( 0, gp_XY( 45370.87, 31819.69 ) )
362 lit_majeur.AddPoint( 0, gp_XY( 46274.66, 31682.16 ) )
363 lit_majeur.AddPoint( 0, gp_XY( 46981.97, 31328.50 ) )
364 lit_majeur.AddPoint( 0, gp_XY( 47021.27, 30719.43 ) )
365 lit_majeur.AddPoint( 0, gp_XY( 47217.74, 30051.41 ) )
366 lit_majeur.AddPoint( 0, gp_XY( 47846.46, 29560.22 ) )
367 lit_majeur.AddPoint( 0, gp_XY( 48730.61, 28735.02 ) )
368 lit_majeur.AddPoint( 0, gp_XY( 48809.20, 27732.99 ) )
369 lit_majeur.AddPoint( 0, gp_XY( 49143.21, 27163.21 ) )
370 lit_majeur.AddPoint( 0, gp_XY( 49654.05, 26829.20 ) )
371 lit_majeur.AddPoint( 0, gp_XY( 49693.34, 25355.63 ) )
372 lit_majeur.AddPoint( 0, gp_XY( 48612.72, 23214.04 ) )
373 lit_majeur.AddPoint( 0, gp_XY( 47453.51, 23115.80 ) )
374 lit_majeur.AddPoint( 0, gp_XY( 46471.13, 24176.77 ) )
375 lit_majeur.AddPoint( 0, gp_XY( 45960.29, 25257.39 ) )
376 lit_majeur.AddPoint( 0, gp_XY( 44899.32, 25591.40 ) )
377 lit_majeur.AddPoint( 0, gp_XY( 44270.60, 26573.78 ) )
378 lit_majeur.AddPoint( 0, gp_XY( 43248.92, 27909.82 ) )
379 lit_majeur.AddPoint( 0, gp_XY( 42757.73, 28243.83 ) )
380 lit_majeur.AddPoint( 0, gp_XY( 42266.54, 28342.07 ) )
381 lit_majeur.AddPoint( 0, gp_XY( 41736.06, 28106.30 ) )
382 lit_majeur.AddPoint( 0, gp_XY( 41402.05, 28833.26 ) )
383 lit_majeur.AddPoint( 0, gp_XY( 40910.86, 28911.85 ) )
384 lit_majeur.AddPoint( 0, gp_XY( 40576.85, 29324.45 ) )
385 lit_majeur.AddPoint( 0, gp_XY( 40144.60, 29599.51 ) )
386 lit_majeur.AddPoint( 0, gp_XY( 39024.69, 30130.00 ) )
387 lit_majeur.AddPoint( 0, gp_XY( 38612.09, 30365.77 ) )
388 lit_majeur.AddPoint( 0, gp_XY( 38828.21, 33391.50 ) )
389
390 lit_majeur.Update()
391
392
393 zonePont = hydro_doc.CreateObject( KIND_POLYLINEXY )
394 zonePont.SetName( "zonePont" )
395
396 zonePont.SetZLevel( 8 )
397
398 zonePont.AddSection( "Section_1", 0, 1 )
399 zonePont.AddPoint( 0, gp_XY( 42665.99, 32409.30 ) )
400 zonePont.AddPoint( 0, gp_XY( 42550.53, 32102.00 ) )
401 zonePont.AddPoint( 0, gp_XY( 42634.02, 32078.91 ) )
402 zonePont.AddPoint( 0, gp_XY( 42760.14, 32375.55 ) )
403
404 zonePont.Update()
405
406
407 pilesPont = hydro_doc.CreateObject( KIND_POLYLINEXY )
408 pilesPont.SetName( "pilesPont" )
409
410 pilesPont.SetZLevel( 9 )
411
412 pilesPont.AddSection( "pile_1", 0, 1 )
413 pilesPont.AddPoint( 0, gp_XY( 42682.74, 32343.21 ) )
414 pilesPont.AddPoint( 0, gp_XY( 42707.79, 32333.28 ) )
415 pilesPont.AddPoint( 0, gp_XY( 42702.98, 32321.41 ) )
416 pilesPont.AddPoint( 0, gp_XY( 42678.02, 32331.39 ) )
417 pilesPont.AddSection( "ple_2", 0, 1 )
418 pilesPont.AddPoint( 1, gp_XY( 42661.48, 32289.81 ) )
419 pilesPont.AddPoint( 1, gp_XY( 42656.20, 32278.41 ) )
420 pilesPont.AddPoint( 1, gp_XY( 42680.85, 32266.59 ) )
421 pilesPont.AddPoint( 1, gp_XY( 42685.58, 32278.46 ) )
422 pilesPont.AddSection( "pile_3", 0, 1 )
423 pilesPont.AddPoint( 2, gp_XY( 42636.43, 32232.62 ) )
424 pilesPont.AddPoint( 2, gp_XY( 42662.90, 32221.76 ) )
425 pilesPont.AddPoint( 2, gp_XY( 42658.07, 32209.53 ) )
426 pilesPont.AddPoint( 2, gp_XY( 42631.35, 32220.39 ) )
427 pilesPont.AddSection( "pile_4", 0, 1 )
428 pilesPont.AddPoint( 3, gp_XY( 42618.95, 32182.53 ) )
429 pilesPont.AddPoint( 3, gp_XY( 42643.52, 32171.19 ) )
430 pilesPont.AddPoint( 3, gp_XY( 42638.37, 32159.06 ) )
431 pilesPont.AddPoint( 3, gp_XY( 42612.99, 32170.62 ) )
432
433 pilesPont.Update()
434
435
436 Polyline_1 = hydro_doc.CreateObject( KIND_POLYLINEXY )
437 Polyline_1.SetName( "Polyline_1" )
438
439 Polyline_1.SetZLevel( 25 )
440
441 Polyline_1.AddSection( "Section_1", 0, 0 )
442 Polyline_1.AddPoint( 0, gp_XY( 42541.98, 32295.56 ) )
443 Polyline_1.AddPoint( 0, gp_XY( 42827.09, 32211.82 ) )
444
445 Polyline_1.Update()
446
447
448 pontEtPiles_7 = hydro_doc.CreateObject( KIND_POLYLINEXY )
449 pontEtPiles_7.SetName( "pontEtPiles_7" )
450
451 pontEtPiles_7.SetZLevel( 29 )
452
453 pontEtPiles_7.AddSection( "Section_1", 0, 0 )
454 pontEtPiles_7.AddPoint( 0, gp_XY( 42682.74, 32343.21 ) )
455 pontEtPiles_7.AddPoint( 0, gp_XY( 42707.79, 32333.28 ) )
456 pontEtPiles_7.AddPoint( 0, gp_XY( 42702.98, 32321.41 ) )
457 pontEtPiles_7.AddPoint( 0, gp_XY( 42678.02, 32331.39 ) )
458 pontEtPiles_7.AddPoint( 0, gp_XY( 42682.74, 32343.21 ) )
459
460 pontEtPiles_7.Update()
461
462
463 pontEtPiles_8 = hydro_doc.CreateObject( KIND_POLYLINEXY )
464 pontEtPiles_8.SetName( "pontEtPiles_8" )
465
466 pontEtPiles_8.SetZLevel( 28 )
467
468 pontEtPiles_8.AddSection( "Section_1", 0, 0 )
469 pontEtPiles_8.AddPoint( 0, gp_XY( 42661.48, 32289.81 ) )
470 pontEtPiles_8.AddPoint( 0, gp_XY( 42656.20, 32278.41 ) )
471 pontEtPiles_8.AddPoint( 0, gp_XY( 42680.85, 32266.59 ) )
472 pontEtPiles_8.AddPoint( 0, gp_XY( 42685.58, 32278.46 ) )
473 pontEtPiles_8.AddPoint( 0, gp_XY( 42661.48, 32289.81 ) )
474
475 pontEtPiles_8.Update()
476
477
478 pontEtPiles_9 = hydro_doc.CreateObject( KIND_POLYLINEXY )
479 pontEtPiles_9.SetName( "pontEtPiles_9" )
480
481 pontEtPiles_9.SetZLevel( 27 )
482
483 pontEtPiles_9.AddSection( "Section_1", 0, 0 )
484 pontEtPiles_9.AddPoint( 0, gp_XY( 42636.43, 32232.62 ) )
485 pontEtPiles_9.AddPoint( 0, gp_XY( 42662.90, 32221.76 ) )
486 pontEtPiles_9.AddPoint( 0, gp_XY( 42658.07, 32209.53 ) )
487 pontEtPiles_9.AddPoint( 0, gp_XY( 42631.35, 32220.39 ) )
488 pontEtPiles_9.AddPoint( 0, gp_XY( 42636.43, 32232.62 ) )
489
490 pontEtPiles_9.Update()
491
492
493 pontEtPiles_10 = hydro_doc.CreateObject( KIND_POLYLINEXY )
494 pontEtPiles_10.SetName( "pontEtPiles_10" )
495
496 pontEtPiles_10.SetZLevel( 26 )
497
498 pontEtPiles_10.AddSection( "Section_1", 0, 0 )
499 pontEtPiles_10.AddPoint( 0, gp_XY( 42618.95, 32182.53 ) )
500 pontEtPiles_10.AddPoint( 0, gp_XY( 42643.52, 32171.19 ) )
501 pontEtPiles_10.AddPoint( 0, gp_XY( 42638.37, 32159.06 ) )
502 pontEtPiles_10.AddPoint( 0, gp_XY( 42612.99, 32170.62 ) )
503 pontEtPiles_10.AddPoint( 0, gp_XY( 42618.95, 32182.53 ) )
504
505 pontEtPiles_10.Update()
506
507
508 garonne_2 = hydro_doc.CreateObject( KIND_POLYLINEXY )
509 garonne_2.SetName( "garonne_2" )
510
511 garonne_2.SetZLevel( 37 )
512
513 garonne_2.AddSection( "Section_1", 1, 0 )
514 garonne_2.AddPoint( 0, gp_XY( 42652.10, 32372.34 ) )
515 garonne_2.AddPoint( 0, gp_XY( 42693.37, 32357.54 ) )
516 garonne_2.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) )
517
518 garonne_2.Update()
519
520
521 garonne_3 = hydro_doc.CreateObject( KIND_POLYLINEXY )
522 garonne_3.SetName( "garonne_3" )
523
524 garonne_3.SetZLevel( 36 )
525
526 garonne_3.AddSection( "Section_1", 1, 0 )
527 garonne_3.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) )
528 garonne_3.AddPoint( 0, gp_XY( 42779.45, 32327.87 ) )
529 garonne_3.AddPoint( 0, gp_XY( 42909.80, 32291.33 ) )
530 garonne_3.AddPoint( 0, gp_XY( 43177.03, 32269.95 ) )
531 garonne_3.AddPoint( 0, gp_XY( 43465.65, 32344.78 ) )
532 garonne_3.AddPoint( 0, gp_XY( 43754.27, 32152.37 ) )
533 garonne_3.AddPoint( 0, gp_XY( 44128.40, 31842.37 ) )
534 garonne_3.AddPoint( 0, gp_XY( 44003.90, 31269.93 ) )
535 garonne_3.AddPoint( 0, gp_XY( 44010.82, 30869.63 ) )
536 garonne_3.AddPoint( 0, gp_XY( 44064.26, 30655.84 ) )
537 garonne_3.AddPoint( 0, gp_XY( 44434.73, 30366.18 ) )
538 garonne_3.AddPoint( 0, gp_XY( 45208.04, 30484.81 ) )
539 garonne_3.AddPoint( 0, gp_XY( 45705.01, 30287.34 ) )
540 garonne_3.AddPoint( 0, gp_XY( 45933.89, 30046.87 ) )
541 garonne_3.AddPoint( 0, gp_XY( 46127.34, 29490.68 ) )
542 garonne_3.AddPoint( 0, gp_XY( 46111.60, 29226.08 ) )
543 garonne_3.AddPoint( 0, gp_XY( 46228.62, 28784.05 ) )
544 garonne_3.AddPoint( 0, gp_XY( 46247.64, 28449.75 ) )
545 garonne_3.AddPoint( 0, gp_XY( 46108.48, 28086.94 ) )
546 garonne_3.AddPoint( 0, gp_XY( 45618.52, 27553.74 ) )
547 garonne_3.AddPoint( 0, gp_XY( 45276.77, 27042.78 ) )
548 garonne_3.AddPoint( 0, gp_XY( 45001.89, 26273.15 ) )
549 garonne_3.AddPoint( 0, gp_XY( 45167.76, 25975.34 ) )
550 garonne_3.AddPoint( 0, gp_XY( 46018.15, 25848.84 ) )
551 garonne_3.AddPoint( 0, gp_XY( 46378.94, 25872.21 ) )
552 garonne_3.AddPoint( 0, gp_XY( 46885.57, 25937.64 ) )
553 garonne_3.AddPoint( 0, gp_XY( 47278.36, 25782.88 ) )
554 garonne_3.AddPoint( 0, gp_XY( 47153.86, 25728.04 ) )
555 garonne_3.AddPoint( 0, gp_XY( 46987.51, 25749.97 ) )
556 garonne_3.AddPoint( 0, gp_XY( 46658.26, 25715.71 ) )
557 garonne_3.AddPoint( 0, gp_XY( 45650.76, 25634.46 ) )
558 garonne_3.AddPoint( 0, gp_XY( 45122.63, 25748.21 ) )
559 garonne_3.AddPoint( 0, gp_XY( 44797.63, 26325.09 ) )
560 garonne_3.AddPoint( 0, gp_XY( 45114.51, 27168.75 ) )
561 garonne_3.AddPoint( 0, gp_XY( 45508.28, 27713.21 ) )
562 garonne_3.AddPoint( 0, gp_XY( 45994.19, 28382.53 ) )
563 garonne_3.AddPoint( 0, gp_XY( 45927.01, 29201.34 ) )
564 garonne_3.AddPoint( 0, gp_XY( 45756.39, 29859.47 ) )
565 garonne_3.AddPoint( 0, gp_XY( 45390.76, 30151.97 ) )
566 garonne_3.AddPoint( 0, gp_XY( 45039.85, 30120.84 ) )
567 garonne_3.AddPoint( 0, gp_XY( 44513.26, 30084.28 ) )
568 garonne_3.AddPoint( 0, gp_XY( 43923.42, 30426.28 ) )
569 garonne_3.AddPoint( 0, gp_XY( 43768.81, 30934.29 ) )
570 garonne_3.AddPoint( 0, gp_XY( 43820.10, 31425.20 ) )
571 garonne_3.AddPoint( 0, gp_XY( 43854.78, 31801.12 ) )
572 garonne_3.AddPoint( 0, gp_XY( 43479.64, 32053.54 ) )
573 garonne_3.AddPoint( 0, gp_XY( 42923.47, 32051.85 ) )
574 garonne_3.AddPoint( 0, gp_XY( 42695.92, 32118.36 ) )
575 garonne_3.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) )
576
577 garonne_3.Update()
578
579
580 garonne_4 = hydro_doc.CreateObject( KIND_POLYLINEXY )
581 garonne_4.SetName( "garonne_4" )
582
583 garonne_4.SetZLevel( 35 )
584
585 garonne_4.AddSection( "Section_1", 1, 0 )
586 garonne_4.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) )
587 garonne_4.AddPoint( 0, gp_XY( 42610.32, 32148.41 ) )
588 garonne_4.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) )
589
590 garonne_4.Update()
591
592
593 garonne_5 = hydro_doc.CreateObject( KIND_POLYLINEXY )
594 garonne_5.SetName( "garonne_5" )
595
596 garonne_5.SetZLevel( 34 )
597
598 garonne_5.AddSection( "Section_1", 1, 0 )
599 garonne_5.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) )
600 garonne_5.AddPoint( 0, gp_XY( 42532.63, 32175.19 ) )
601 garonne_5.AddPoint( 0, gp_XY( 42493.64, 32187.97 ) )
602 garonne_5.AddPoint( 0, gp_XY( 42074.27, 32302.91 ) )
603 garonne_5.AddPoint( 0, gp_XY( 41624.75, 32330.93 ) )
604 garonne_5.AddPoint( 0, gp_XY( 41325.93, 32187.97 ) )
605 garonne_5.AddPoint( 0, gp_XY( 40879.52, 31987.29 ) )
606 garonne_5.AddPoint( 0, gp_XY( 40308.78, 32018.46 ) )
607 garonne_5.AddPoint( 0, gp_XY( 39782.86, 32207.17 ) )
608 garonne_5.AddPoint( 0, gp_XY( 38814.10, 32560.43 ) )
609 garonne_5.AddPoint( 0, gp_XY( 38302.17, 32903.70 ) )
610 garonne_5.AddPoint( 0, gp_XY( 38191.48, 33184.55 ) )
611 garonne_5.AddSection( "Section_2", 1, 0 )
612 garonne_5.AddPoint( 1, gp_XY( 38191.48, 33184.55 ) )
613 garonne_5.AddPoint( 1, gp_XY( 38553.78, 33013.53 ) )
614 garonne_5.AddPoint( 1, gp_XY( 38993.90, 32767.64 ) )
615 garonne_5.AddPoint( 1, gp_XY( 39678.58, 32533.58 ) )
616 garonne_5.AddPoint( 1, gp_XY( 40240.26, 32305.27 ) )
617 garonne_5.AddPoint( 1, gp_XY( 40717.94, 32193.70 ) )
618 garonne_5.AddPoint( 1, gp_XY( 41361.00, 32464.18 ) )
619 garonne_5.AddPoint( 1, gp_XY( 41831.41, 32626.69 ) )
620 garonne_5.AddPoint( 1, gp_XY( 41950.14, 32618.24 ) )
621 garonne_5.AddPoint( 1, gp_XY( 42524.97, 32419.61 ) )
622 garonne_5.AddPoint( 1, gp_XY( 42616.62, 32385.32 ) )
623 garonne_5.AddPoint( 1, gp_XY( 42652.10, 32372.34 ) )
624
625 garonne_5.Update()
626
627
628 zonePont_1 = hydro_doc.CreateObject( KIND_POLYLINEXY )
629 zonePont_1.SetName( "zonePont_1" )
630
631 zonePont_1.SetZLevel( 33 )
632
633 zonePont_1.AddSection( "Section_1", 0, 0 )
634 zonePont_1.AddPoint( 0, gp_XY( 42652.10, 32372.34 ) )
635 zonePont_1.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) )
636
637 zonePont_1.Update()
638
639
640 zonePont_2 = hydro_doc.CreateObject( KIND_POLYLINEXY )
641 zonePont_2.SetName( "zonePont_2" )
642
643 zonePont_2.SetZLevel( 32 )
644
645 zonePont_2.AddSection( "Section_1", 0, 0 )
646 zonePont_2.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) )
647 zonePont_2.AddPoint( 0, gp_XY( 42550.53, 32102.00 ) )
648 zonePont_2.AddPoint( 0, gp_XY( 42634.02, 32078.91 ) )
649 zonePont_2.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) )
650
651 zonePont_2.Update()
652
653
654 zonePont_3 = hydro_doc.CreateObject( KIND_POLYLINEXY )
655 zonePont_3.SetName( "zonePont_3" )
656
657 zonePont_3.SetZLevel( 31 )
658
659 zonePont_3.AddSection( "Section_1", 0, 0 )
660 zonePont_3.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) )
661 zonePont_3.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) )
662
663 zonePont_3.Update()
664
665
666 zonePont_4 = hydro_doc.CreateObject( KIND_POLYLINEXY )
667 zonePont_4.SetName( "zonePont_4" )
668
669 zonePont_4.SetZLevel( 30 )
670
671 zonePont_4.AddSection( "Section_1", 0, 0 )
672 zonePont_4.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) )
673 zonePont_4.AddPoint( 0, gp_XY( 42760.14, 32375.55 ) )
674 zonePont_4.AddPoint( 0, gp_XY( 42665.99, 32409.30 ) )
675 zonePont_4.AddPoint( 0, gp_XY( 42652.10, 32372.34 ) )
676
677 zonePont_4.Update()
678
679
680 litMineurPont = hydro_doc.CreateObject( KIND_POLYLINEXY )
681 litMineurPont.SetName( "litMineurPont" )
682
683 litMineurPont.AddSection( "Section_1_1", 1, 0 )
684 litMineurPont.AddPoint( 0, gp_XY( 42652.10, 32372.34 ) )
685 litMineurPont.AddPoint( 0, gp_XY( 42693.37, 32357.54 ) )
686 litMineurPont.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) )
687 litMineurPont.AddSection( "Section_1_2", 1, 0 )
688 litMineurPont.AddPoint( 1, gp_XY( 42656.54, 32131.87 ) )
689 litMineurPont.AddPoint( 1, gp_XY( 42610.32, 32148.41 ) )
690 litMineurPont.AddPoint( 1, gp_XY( 42572.86, 32161.44 ) )
691 litMineurPont.AddSection( "Section_1_3", 0, 0 )
692 litMineurPont.AddPoint( 2, gp_XY( 42652.10, 32372.34 ) )
693 litMineurPont.AddPoint( 2, gp_XY( 42572.86, 32161.44 ) )
694 litMineurPont.AddSection( "Section_1_4", 0, 0 )
695 litMineurPont.AddPoint( 3, gp_XY( 42656.54, 32131.87 ) )
696 litMineurPont.AddPoint( 3, gp_XY( 42744.75, 32339.36 ) )
697
698 litMineurPont.Update()
699
700
701 litMineurAval = hydro_doc.CreateObject( KIND_POLYLINEXY )
702 litMineurAval.SetName( "litMineurAval" )
703
704 litMineurAval.AddSection( "Section_1_1", 1, 0 )
705 litMineurAval.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) )
706 litMineurAval.AddPoint( 0, gp_XY( 42532.63, 32175.19 ) )
707 litMineurAval.AddPoint( 0, gp_XY( 42493.64, 32187.97 ) )
708 litMineurAval.AddPoint( 0, gp_XY( 42074.27, 32302.91 ) )
709 litMineurAval.AddPoint( 0, gp_XY( 41624.75, 32330.93 ) )
710 litMineurAval.AddPoint( 0, gp_XY( 41325.93, 32187.97 ) )
711 litMineurAval.AddPoint( 0, gp_XY( 40879.52, 31987.29 ) )
712 litMineurAval.AddPoint( 0, gp_XY( 40308.78, 32018.46 ) )
713 litMineurAval.AddPoint( 0, gp_XY( 39782.86, 32207.17 ) )
714 litMineurAval.AddPoint( 0, gp_XY( 38814.10, 32560.43 ) )
715 litMineurAval.AddPoint( 0, gp_XY( 38302.17, 32903.70 ) )
716 litMineurAval.AddPoint( 0, gp_XY( 38191.48, 33184.55 ) )
717 litMineurAval.AddSection( "Section_2_1", 1, 0 )
718 litMineurAval.AddPoint( 1, gp_XY( 38191.48, 33184.55 ) )
719 litMineurAval.AddPoint( 1, gp_XY( 38553.78, 33013.53 ) )
720 litMineurAval.AddPoint( 1, gp_XY( 38993.90, 32767.64 ) )
721 litMineurAval.AddPoint( 1, gp_XY( 39678.58, 32533.58 ) )
722 litMineurAval.AddPoint( 1, gp_XY( 40240.26, 32305.27 ) )
723 litMineurAval.AddPoint( 1, gp_XY( 40717.94, 32193.70 ) )
724 litMineurAval.AddPoint( 1, gp_XY( 41361.00, 32464.18 ) )
725 litMineurAval.AddPoint( 1, gp_XY( 41831.41, 32626.69 ) )
726 litMineurAval.AddPoint( 1, gp_XY( 41950.14, 32618.24 ) )
727 litMineurAval.AddPoint( 1, gp_XY( 42524.97, 32419.61 ) )
728 litMineurAval.AddPoint( 1, gp_XY( 42616.62, 32385.32 ) )
729 litMineurAval.AddPoint( 1, gp_XY( 42652.10, 32372.34 ) )
730 litMineurAval.AddSection( "Section_1_2", 0, 0 )
731 litMineurAval.AddPoint( 2, gp_XY( 42652.10, 32372.34 ) )
732 litMineurAval.AddPoint( 2, gp_XY( 42572.86, 32161.44 ) )
733
734 litMineurAval.Update()
735
736
737 litMineurAmont = hydro_doc.CreateObject( KIND_POLYLINEXY )
738 litMineurAmont.SetName( "litMineurAmont" )
739
740 litMineurAmont.AddSection( "Section_1_1", 1, 0 )
741 litMineurAmont.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) )
742 litMineurAmont.AddPoint( 0, gp_XY( 42779.45, 32327.87 ) )
743 litMineurAmont.AddPoint( 0, gp_XY( 42909.80, 32291.33 ) )
744 litMineurAmont.AddPoint( 0, gp_XY( 43177.03, 32269.95 ) )
745 litMineurAmont.AddPoint( 0, gp_XY( 43465.65, 32344.78 ) )
746 litMineurAmont.AddPoint( 0, gp_XY( 43754.27, 32152.37 ) )
747 litMineurAmont.AddPoint( 0, gp_XY( 44128.40, 31842.37 ) )
748 litMineurAmont.AddPoint( 0, gp_XY( 44003.90, 31269.93 ) )
749 litMineurAmont.AddPoint( 0, gp_XY( 44010.82, 30869.63 ) )
750 litMineurAmont.AddPoint( 0, gp_XY( 44064.26, 30655.84 ) )
751 litMineurAmont.AddPoint( 0, gp_XY( 44434.73, 30366.18 ) )
752 litMineurAmont.AddPoint( 0, gp_XY( 45208.04, 30484.81 ) )
753 litMineurAmont.AddPoint( 0, gp_XY( 45705.01, 30287.34 ) )
754 litMineurAmont.AddPoint( 0, gp_XY( 45933.89, 30046.87 ) )
755 litMineurAmont.AddPoint( 0, gp_XY( 46127.34, 29490.68 ) )
756 litMineurAmont.AddPoint( 0, gp_XY( 46111.60, 29226.08 ) )
757 litMineurAmont.AddPoint( 0, gp_XY( 46228.62, 28784.05 ) )
758 litMineurAmont.AddPoint( 0, gp_XY( 46247.64, 28449.75 ) )
759 litMineurAmont.AddPoint( 0, gp_XY( 46108.48, 28086.94 ) )
760 litMineurAmont.AddPoint( 0, gp_XY( 45618.52, 27553.74 ) )
761 litMineurAmont.AddPoint( 0, gp_XY( 45276.77, 27042.78 ) )
762 litMineurAmont.AddPoint( 0, gp_XY( 45001.89, 26273.15 ) )
763 litMineurAmont.AddPoint( 0, gp_XY( 45167.76, 25975.34 ) )
764 litMineurAmont.AddPoint( 0, gp_XY( 46018.15, 25848.84 ) )
765 litMineurAmont.AddPoint( 0, gp_XY( 46378.94, 25872.21 ) )
766 litMineurAmont.AddPoint( 0, gp_XY( 46885.57, 25937.64 ) )
767 litMineurAmont.AddPoint( 0, gp_XY( 47278.36, 25782.88 ) )
768 litMineurAmont.AddPoint( 0, gp_XY( 47153.86, 25728.04 ) )
769 litMineurAmont.AddPoint( 0, gp_XY( 46987.51, 25749.97 ) )
770 litMineurAmont.AddPoint( 0, gp_XY( 46658.26, 25715.71 ) )
771 litMineurAmont.AddPoint( 0, gp_XY( 45650.76, 25634.46 ) )
772 litMineurAmont.AddPoint( 0, gp_XY( 45122.63, 25748.21 ) )
773 litMineurAmont.AddPoint( 0, gp_XY( 44797.63, 26325.09 ) )
774 litMineurAmont.AddPoint( 0, gp_XY( 45114.51, 27168.75 ) )
775 litMineurAmont.AddPoint( 0, gp_XY( 45508.28, 27713.21 ) )
776 litMineurAmont.AddPoint( 0, gp_XY( 45994.19, 28382.53 ) )
777 litMineurAmont.AddPoint( 0, gp_XY( 45927.01, 29201.34 ) )
778 litMineurAmont.AddPoint( 0, gp_XY( 45756.39, 29859.47 ) )
779 litMineurAmont.AddPoint( 0, gp_XY( 45390.76, 30151.97 ) )
780 litMineurAmont.AddPoint( 0, gp_XY( 45039.85, 30120.84 ) )
781 litMineurAmont.AddPoint( 0, gp_XY( 44513.26, 30084.28 ) )
782 litMineurAmont.AddPoint( 0, gp_XY( 43923.42, 30426.28 ) )
783 litMineurAmont.AddPoint( 0, gp_XY( 43768.81, 30934.29 ) )
784 litMineurAmont.AddPoint( 0, gp_XY( 43820.10, 31425.20 ) )
785 litMineurAmont.AddPoint( 0, gp_XY( 43854.78, 31801.12 ) )
786 litMineurAmont.AddPoint( 0, gp_XY( 43479.64, 32053.54 ) )
787 litMineurAmont.AddPoint( 0, gp_XY( 42923.47, 32051.85 ) )
788 litMineurAmont.AddPoint( 0, gp_XY( 42695.92, 32118.36 ) )
789 litMineurAmont.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) )
790 litMineurAmont.AddSection( "Section_1_2", 0, 0 )
791 litMineurAmont.AddPoint( 1, gp_XY( 42656.54, 32131.87 ) )
792 litMineurAmont.AddPoint( 1, gp_XY( 42744.75, 32339.36 ) )
793
794 litMineurAmont.Update()
795
796
797 Cloud_02 = hydro_doc.CreateObject( KIND_BATHYMETRY )
798 Cloud_02.SetName( "Cloud_02" )
799
800 Cloud_02.SetAltitudesInverted( 0 )
801 if not(Cloud_02.ImportFromFile( os.path.join(HYDRO_SAMPLES, "Cloud_02.xyz" ))):
802   raise ValueError('problem while loading bathymetry')
803
804 Cloud_02.Update()
805
806
807 garonne_point_L93 = hydro_doc.CreateObject( KIND_BATHYMETRY )
808 garonne_point_L93.SetName( "garonne_point_L93" )
809
810 garonne_point_L93.SetAltitudesInverted( 0 )
811 if not(garonne_point_L93.ImportFromFile( os.path.join(HYDRO_SAMPLES, "garonne_point_L93.xyz" ))):
812   raise ValueError('problem while loading bathymetry')
813
814 garonne_point_L93.Update()
815
816
817 litMajeur = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
818 litMajeur.SetName( "litMajeur" )
819
820 litMajeur.SetZLevel( 5 )
821
822 litMajeur.SetFillingColor( QColor( 0, 170, 127, 255 ) )
823
824 litMajeur.SetAltitudeObject( Cloud_02 )
825 litMajeur.SetPolyline( lit_majeur )
826
827 litMajeur.Update()
828
829
830 domaineEtendu = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
831 domaineEtendu.SetName( "domaineEtendu" )
832
833 domaineEtendu.SetZLevel( 4 )
834
835 domaineEtendu.SetFillingColor( QColor( 201, 203, 55, 255 ) )
836
837 domaineEtendu.SetAltitudeObject( Cloud_02 )
838 domaineEtendu.SetPolyline( domaine )
839
840 domaineEtendu.Update()
841
842
843 litMineur_aval = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
844 litMineur_aval.SetName( "litMineur_aval" )
845
846 litMineur_aval.SetZLevel( 38 )
847
848 litMineur_aval.SetFillingColor( QColor( 255, 255, 0, 255 ) )
849
850 litMineur_aval.SetAltitudeObject( garonne_point_L93 )
851 litMineur_aval.SetPolyline( litMineurAval )
852
853 litMineur_aval.Update()
854
855
856 litMineur_pont = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
857 litMineur_pont.SetName( "litMineur_pont" )
858
859 litMineur_pont.SetZLevel( 39 )
860
861 litMineur_pont.SetFillingColor( QColor( 170, 255, 255, 255 ) )
862
863 litMineur_pont.SetAltitudeObject( garonne_point_L93 )
864 litMineur_pont.SetPolyline( litMineurPont )
865
866 litMineur_pont.Update()
867
868
869 litMineur_amont = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
870 litMineur_amont.SetName( "litMineur_amont" )
871
872 litMineur_amont.SetZLevel( 40 )
873
874 litMineur_amont.SetFillingColor( QColor( 170, 255, 127, 255 ) )
875
876 litMineur_amont.SetAltitudeObject( garonne_point_L93 )
877 litMineur_amont.SetPolyline( litMineurAmont )
878
879 litMineur_amont.Update()
880
881
882 pile1 = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
883 pile1.SetName( "pile1" )
884
885 pile1.SetZLevel( 41 )
886
887 pile1.SetPolyline( pontEtPiles_7 )
888 pile1.SetIsSubmersible(False)
889
890 pile1.Update()
891
892
893 pile2 = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
894 pile2.SetName( "pile2" )
895
896 pile2.SetZLevel( 42 )
897
898 pile2.SetPolyline( pontEtPiles_8 )
899 pile2.SetIsSubmersible(False)
900
901 pile2.Update()
902
903
904 pile3 = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
905 pile3.SetName( "pile3" )
906
907 pile3.SetZLevel( 43 )
908
909 pile3.SetPolyline( pontEtPiles_9 )
910 pile3.SetIsSubmersible(False)
911
912 pile3.Update()
913
914
915 pile4 = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
916 pile4.SetName( "pile4" )
917
918 pile4.SetZLevel( 44 )
919
920 pile4.SetPolyline( pontEtPiles_10 )
921 pile4.SetIsSubmersible(False)
922
923 pile4.Update()
924
925
926 # Calculation case
927 garonne_1 = hydro_doc.CreateObject( KIND_CALCULATION )
928 garonne_1.SetName( "garonne_1" )
929
930 garonne_1.SetAssignmentMode( HYDROData_CalculationCase.MANUAL )
931 garonne_1.AddGeometryObject( domaineEtendu )
932 garonne_1.AddGeometryObject( litMajeur )
933 garonne_1.AddGeometryObject( litMineur_amont )
934 garonne_1.AddGeometryObject( litMineur_aval )
935 garonne_1.AddGeometryObject( litMineur_pont )
936 garonne_1.AddGeometryObject( pile1 )
937 garonne_1.AddGeometryObject( pile2 )
938 garonne_1.AddGeometryObject( pile3 )
939 garonne_1.AddGeometryObject( pile4 )
940
941 case_geom_group = domaineEtendu.GetGroup( 0 )
942 garonne_1.AddGeometryGroup( case_geom_group )
943 case_geom_group = litMajeur.GetGroup( 0 )
944 garonne_1.AddGeometryGroup( case_geom_group )
945 case_geom_group = litMineur_amont.GetGroup( 0 )
946 garonne_1.AddGeometryGroup( case_geom_group )
947 case_geom_group = litMineur_aval.GetGroup( 0 )
948 garonne_1.AddGeometryGroup( case_geom_group )
949 case_geom_group = litMineur_pont.GetGroup( 0 )
950 garonne_1.AddGeometryGroup( case_geom_group )
951 case_geom_group = pile1.GetGroup( 0 )
952 garonne_1.AddGeometryGroup( case_geom_group )
953 case_geom_group = pile2.GetGroup( 0 )
954 garonne_1.AddGeometryGroup( case_geom_group )
955 case_geom_group = pile3.GetGroup( 0 )
956 garonne_1.AddGeometryGroup( case_geom_group )
957 case_geom_group = pile4.GetGroup( 0 )
958 garonne_1.AddGeometryGroup( case_geom_group )
959 garonne_1.SetBoundaryPolyline( domaine )
960
961 # Start the algorithm of the partition and assignment
962 garonne_1.Update()
963 garonne_1_riveDroite = hydro_doc.FindObjectByName( "garonne_1_Reg_1" )
964 garonne_1_Zone_1 = hydro_doc.FindObjectByName( "garonne_1_Zone_1" )
965 garonne_1_Zone_1.SetColor( QColor( 64, 156, 192 ))
966 garonne_1_riveDroite.AddZone( garonne_1_Zone_1 )
967 garonne_1_Zone_2 = hydro_doc.FindObjectByName( "garonne_1_Zone_2" )
968 garonne_1_Zone_2.SetMergeType( HYDROData_Zone.Merge_Object )
969 Cloud_02 = hydro_doc.FindObjectByName( "Cloud_02" )
970 garonne_1_Zone_2.SetMergeObject( Cloud_02 )
971 garonne_1_Zone_2.SetColor( QColor( 192, 183, 64 ))
972 garonne_1_riveDroite.AddZone( garonne_1_Zone_2 )
973 garonne_1_aval = hydro_doc.FindObjectByName( "garonne_1_Reg_2" )
974 garonne_1_Zone_3 = hydro_doc.FindObjectByName( "garonne_1_Zone_3" )
975 garonne_1_Zone_3.SetMergeType( HYDROData_Zone.Merge_Object )
976 garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" )
977 garonne_1_Zone_3.SetMergeObject( garonne_point_L93 )
978 garonne_1_Zone_3.SetColor( QColor( 64, 183, 192 ))
979 garonne_1_aval.AddZone( garonne_1_Zone_3 )
980 garonne_1_riveGauche = hydro_doc.FindObjectByName( "garonne_1_Reg_3" )
981 garonne_1_Zone_4 = hydro_doc.FindObjectByName( "garonne_1_Zone_4" )
982 garonne_1_Zone_4.SetMergeType( HYDROData_Zone.Merge_Object )
983 Cloud_02 = hydro_doc.FindObjectByName( "Cloud_02" )
984 garonne_1_Zone_4.SetMergeObject( Cloud_02 )
985 garonne_1_Zone_4.SetColor( QColor( 64, 192, 162 ))
986 garonne_1_riveGauche.AddZone( garonne_1_Zone_4 )
987 garonne_1_Zone_6 = hydro_doc.FindObjectByName( "garonne_1_Zone_6" )
988 garonne_1_Zone_6.SetColor( QColor( 64, 192, 90 ))
989 garonne_1_riveGauche.AddZone( garonne_1_Zone_6 )
990 garonne_1_pont = hydro_doc.FindObjectByName( "garonne_1_Reg_4" )
991 garonne_1_Zone_5 = hydro_doc.FindObjectByName( "garonne_1_Zone_5" )
992 garonne_1_Zone_5.SetMergeType( HYDROData_Zone.Merge_Object )
993 garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" )
994 garonne_1_Zone_5.SetMergeObject( garonne_point_L93 )
995 garonne_1_Zone_5.SetColor( QColor( 64, 190, 192 ))
996 garonne_1_pont.AddZone( garonne_1_Zone_5 )
997 garonne_1_amont = hydro_doc.FindObjectByName( "garonne_1_Reg_5" )
998 garonne_1_Zone_7 = hydro_doc.FindObjectByName( "garonne_1_Zone_7" )
999 garonne_1_Zone_7.SetMergeType( HYDROData_Zone.Merge_Object )
1000 garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" )
1001 garonne_1_Zone_7.SetMergeObject( garonne_point_L93 )
1002 garonne_1_Zone_7.SetColor( QColor( 109, 192, 64 ))
1003 garonne_1_amont.AddZone( garonne_1_Zone_7 )
1004 garonne_1_pile1 = hydro_doc.FindObjectByName( "garonne_1_Reg_6" )
1005 garonne_1_Zone_8 = hydro_doc.FindObjectByName( "garonne_1_Zone_8" )
1006 garonne_1_Zone_8.SetMergeType( HYDROData_Zone.Merge_ZMAX )
1007 garonne_1_Zone_8.SetColor( QColor( 192, 179, 64 ))
1008 garonne_1_pile1.AddZone( garonne_1_Zone_8 )
1009 garonne_1_pile2 = hydro_doc.FindObjectByName( "garonne_1_Reg_7" )
1010 garonne_1_Zone_9 = hydro_doc.FindObjectByName( "garonne_1_Zone_9" )
1011 garonne_1_Zone_9.SetMergeType( HYDROData_Zone.Merge_ZMAX )
1012 garonne_1_Zone_9.SetColor( QColor( 192, 75, 64 ))
1013 garonne_1_pile2.AddZone( garonne_1_Zone_9 )
1014 garonne_1_pile3 = hydro_doc.FindObjectByName( "garonne_1_Reg_8" )
1015 garonne_1_Zone_10 = hydro_doc.FindObjectByName( "garonne_1_Zone_10" )
1016 garonne_1_Zone_10.SetMergeType( HYDROData_Zone.Merge_ZMAX )
1017 garonne_1_Zone_10.SetColor( QColor( 162, 192, 64 ))
1018 garonne_1_pile3.AddZone( garonne_1_Zone_10 )
1019 garonne_1_pile4 = hydro_doc.FindObjectByName( "garonne_1_Reg_9" )
1020 garonne_1_Zone_11 = hydro_doc.FindObjectByName( "garonne_1_Zone_11" )
1021 garonne_1_Zone_11.SetMergeType( HYDROData_Zone.Merge_ZMAX )
1022 garonne_1_Zone_11.SetColor( QColor( 64, 192, 81 ))
1023 garonne_1_pile4.AddZone( garonne_1_Zone_11 )
1024 garonne_1_riveDroite.SetName( "garonne_1_riveDroite" )
1025 garonne_1_aval.SetName( "garonne_1_aval" )
1026 garonne_1_riveGauche.SetName( "garonne_1_riveGauche" )
1027 garonne_1_pont.SetName( "garonne_1_pont" )
1028 garonne_1_amont.SetName( "garonne_1_amont" )
1029 garonne_1_pile1.SetName( "garonne_1_pile1" )
1030 garonne_1_pile2.SetName( "garonne_1_pile2" )
1031 garonne_1_pile3.SetName( "garonne_1_pile3" )
1032 garonne_1_pile4.SetName( "garonne_1_pile4" )
1033
1034 # Export of the calculation case
1035 garonne_1_entry = garonne_1.Export()
1036
1037 # Get geometry shape and print debug information
1038 import GEOM
1039 print("Entry:", garonne_1_entry)
1040 HYDRO_garonne_1 = salome.IDToObject( str( garonne_1_entry ) )
1041 print("Geom shape:", HYDRO_garonne_1)
1042 print("Geom shape name:", HYDRO_garonne_1.GetName())
1043
1044
1045 ###
1046 ### GEOM component
1047 ###
1048
1049 import GEOM
1050 from salome.geom import geomBuilder
1051 import math
1052 import SALOMEDS
1053 from salome.hydrotools.controls import controlGeomProps
1054
1055 geompy = geomBuilder.New()
1056
1057 [garonne_riveDroite,garonne_aval,garonne_riveGauche,garonne_pont,garonne_amont] = geompy.SubShapeAll(HYDRO_garonne_1, geompy.ShapeType["FACE"])
1058
1059 # --- basic properties control: edges length, surfaces
1060 controlGeomProps(geompy, garonne_riveGauche,  29149.1353799,  35949580.6716)
1061 controlGeomProps(geompy, garonne_aval,   7965.23431497,  935955.786347)
1062 controlGeomProps(geompy, garonne_pont,   961.8255222,  19618.016847)
1063 controlGeomProps(geompy, garonne_amont,   22635.6212065,  2531409.65041)
1064 controlGeomProps(geompy, garonne_riveDroite,  32012.2241814, 25998085.6892)
1065
1066 # --- manual identification of all useful edge groups (boundary conditions)
1067
1068 allEdgesIds = geompy.SubShapeAllIDs(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
1069 print("allEdgesIds", allEdgesIds)
1070
1071 (isDone, ClosedFreeBoundary, OpenFreeBoundary) = geompy.GetFreeBoundary(HYDRO_garonne_1)
1072 geompy.addToStudyInFather(HYDRO_garonne_1, ClosedFreeBoundary[0], "OuterFreeBoundary")
1073 geompy.addToStudyInFather(HYDRO_garonne_1, ClosedFreeBoundary[1], "pilesPont1")
1074 geompy.addToStudyInFather(HYDRO_garonne_1, ClosedFreeBoundary[2], "pilesPont2")
1075 geompy.addToStudyInFather(HYDRO_garonne_1, ClosedFreeBoundary[3], "pilesPont3")
1076 geompy.addToStudyInFather(HYDRO_garonne_1, ClosedFreeBoundary[4], "pilesPont4")
1077
1078 freeBoundary = geompy.ExtractShapes(ClosedFreeBoundary[0], geompy.ShapeType["EDGE"], True)
1079 freeBoundaryIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, freeBoundary[i]) for i in range(len(freeBoundary)) ]
1080 print("freeBoundaryIds", freeBoundaryIds)
1081
1082 edgesPile1 = geompy.ExtractShapes(ClosedFreeBoundary[1], geompy.ShapeType["EDGE"], True)
1083 edgesPile2 = geompy.ExtractShapes(ClosedFreeBoundary[2], geompy.ShapeType["EDGE"], True)
1084 edgesPile3 = geompy.ExtractShapes(ClosedFreeBoundary[3], geompy.ShapeType["EDGE"], True)
1085 edgesPile4 = geompy.ExtractShapes(ClosedFreeBoundary[4], geompy.ShapeType["EDGE"], True)
1086 pilesPont1Ids = [ geompy.GetSubShapeID(HYDRO_garonne_1, edgesPile1[i]) for i in range(len(edgesPile1)) ]
1087 pilesPont2Ids = [ geompy.GetSubShapeID(HYDRO_garonne_1, edgesPile2[i]) for i in range(len(edgesPile2)) ]
1088 pilesPont3Ids = [ geompy.GetSubShapeID(HYDRO_garonne_1, edgesPile3[i]) for i in range(len(edgesPile3)) ]
1089 pilesPont4Ids = [ geompy.GetSubShapeID(HYDRO_garonne_1, edgesPile4[i]) for i in range(len(edgesPile4)) ]
1090 pilesPontIds = pilesPont1Ids + pilesPont2Ids + pilesPont3Ids + pilesPont4Ids
1091 print("pilesPontIds", pilesPontIds)
1092
1093 [garonne_aval_droite] = geompy.GetSharedShapesMulti([garonne_riveDroite, garonne_aval], geompy.ShapeType["EDGE"], True)
1094 [garonne_aval_gauche] = geompy.GetSharedShapesMulti([garonne_riveGauche, garonne_aval], geompy.ShapeType["EDGE"], True)
1095 geompy.addToStudyInFather(HYDRO_garonne_1, garonne_aval_droite, "garonne_aval_droite")
1096 geompy.addToStudyInFather(HYDRO_garonne_1, garonne_aval_gauche, "garonne_aval_gauche")
1097 [garonne_amont_droite] = geompy.GetSharedShapesMulti([garonne_riveDroite, garonne_amont], geompy.ShapeType["EDGE"], True)
1098 [garonne_amont_gauche] = geompy.GetSharedShapesMulti([garonne_riveGauche, garonne_amont], geompy.ShapeType["EDGE"], True)
1099 geompy.addToStudyInFather(HYDRO_garonne_1, garonne_amont_droite, "garonne_amont_droite")
1100 geompy.addToStudyInFather(HYDRO_garonne_1, garonne_amont_gauche, "garonne_amont_gauche")
1101 [garonne_pont_droite] = geompy.GetSharedShapesMulti([garonne_riveDroite, garonne_pont], geompy.ShapeType["EDGE"], True)
1102 [garonne_pont_gauche] = geompy.GetSharedShapesMulti([garonne_riveGauche, garonne_pont], geompy.ShapeType["EDGE"], True)
1103 geompy.addToStudyInFather(HYDRO_garonne_1, garonne_pont_droite, "garonne_pont_droite")
1104 geompy.addToStudyInFather(HYDRO_garonne_1, garonne_pont_gauche, "garonne_pont_gauche")
1105 rives = [garonne_aval_droite, garonne_aval_gauche, garonne_amont_droite, garonne_amont_gauche, garonne_pont_droite, garonne_pont_gauche]
1106 rivesIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, rives[i]) for i in range(len(rives)) ]
1107 print("rivesIds", rivesIds)
1108
1109 edges_garonne_aval = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_aval], geompy.ShapeType["EDGE"], True)
1110 edges_garonne_amont = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_amont], geompy.ShapeType["EDGE"], True)
1111 edges_garonne_pont = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_pont], geompy.ShapeType["EDGE"], True)
1112 edges_riveGauche = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_riveGauche], geompy.ShapeType["EDGE"], True)
1113 edges_riveDroite = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_riveDroite], geompy.ShapeType["EDGE"], True)
1114 edges_garonne_avalIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_garonne_aval[i]) for i in range(len(edges_garonne_aval)) ]
1115 edges_garonne_amontIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_garonne_amont[i]) for i in range(len(edges_garonne_amont)) ]
1116 edges_garonne_pontIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_garonne_pont[i]) for i in range(len(edges_garonne_pont)) ]
1117 edges_riveGaucheIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_riveGauche[i]) for i in range(len(edges_riveGauche)) ]
1118 edges_riveDroiteIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_riveDroite[i]) for i in range(len(edges_riveDroite)) ]
1119
1120 print("edges_garonne_amontIds", edges_garonne_amontIds) 
1121 print("edges_garonne_avalIds", edges_garonne_avalIds) 
1122 print("edges_garonne_pontIds", edges_garonne_pontIds) 
1123 print("edges_riveGaucheIds", edges_riveGaucheIds)
1124 print("edges_riveDroiteIds", edges_riveDroiteIds)
1125
1126 edges_litMineurIds = edges_garonne_amontIds
1127 for edge in edges_garonne_avalIds:
1128   edges_litMineurIds.append(edge)
1129 for edge in edges_garonne_pontIds:
1130   if edge not in edges_litMineurIds and edge not in pilesPontIds:
1131     edges_litMineurIds.append(edge)
1132
1133 sectionsIds = [Id for Id in edges_litMineurIds if Id not in rivesIds]
1134 print("sectionsIds", sectionsIds)
1135 SectionsGaronne = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
1136 geompy.UnionIDs(SectionsGaronne, sectionsIds)
1137 geompy.addToStudyInFather(HYDRO_garonne_1, SectionsGaronne, "SectionsGaronne")
1138
1139 bordGaucheDomaineIds = [Id for Id in freeBoundaryIds if Id in edges_riveGaucheIds]
1140 bordDroiteDomaineIds = [Id for Id in freeBoundaryIds if Id in edges_riveDroiteIds]
1141 print("bordGaucheDomaineIds", bordGaucheDomaineIds)
1142 print("bordDroiteDomaineIds", bordDroiteDomaineIds)
1143 bordGaucheDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
1144 geompy.UnionIDs(bordGaucheDomaine, bordGaucheDomaineIds)
1145 geompy.addToStudyInFather(HYDRO_garonne_1, bordGaucheDomaine, "bordGaucheDomaine")
1146 bordDroiteDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
1147 geompy.UnionIDs(bordDroiteDomaine, bordDroiteDomaineIds)
1148 geompy.addToStudyInFather(HYDRO_garonne_1, bordDroiteDomaine, "bordDroiteDomaine")
1149
1150 amont = geompy.GetEdgeNearPoint(HYDRO_garonne_1, geompy.MakeVertex(46757.861314, 25833.234752, 0))
1151 aval = geompy.GetEdgeNearPoint(HYDRO_garonne_1, geompy.MakeVertex(39078.979127, 32588.627279, 0))
1152 geompy.addToStudyInFather(HYDRO_garonne_1, amont, "amont")
1153 geompy.addToStudyInFather(HYDRO_garonne_1, aval, "aval")
1154 ###
1155 ### SMESH component
1156 ###
1157
1158 import  SMESH, SALOMEDS
1159 from salome.smesh import smeshBuilder
1160 from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
1161 import tempfile
1162
1163 smesh = smeshBuilder.New()
1164 garonne_1 = smesh.Mesh(HYDRO_garonne_1)
1165 NETGEN_1D_2D = garonne_1.Triangle(algo=smeshBuilder.NETGEN_1D2D)
1166 NETGEN_2D_Parameters_1 = NETGEN_1D_2D.Parameters()
1167 NETGEN_2D_Parameters_1.SetMaxSize( 200 )
1168 NETGEN_2D_Parameters_1.SetSecondOrder( 0 )
1169 NETGEN_2D_Parameters_1.SetOptimize( 1 )
1170 NETGEN_2D_Parameters_1.SetFineness( 4 )
1171 NETGEN_2D_Parameters_1.SetMinSize( 50 )
1172 NETGEN_2D_Parameters_1.SetUseSurfaceCurvature( 1 )
1173 NETGEN_2D_Parameters_1.SetFuseEdges( 1 )
1174 NETGEN_2D_Parameters_1.SetQuadAllowed( 0 )
1175 Regular_1D = garonne_1.Segment(geom=garonne_aval)
1176 garonne_aval_1 = Regular_1D.GetSubMesh()
1177 Number_of_Segments_1 = Regular_1D.NumberOfSegments(100)
1178 QuadFromMedialAxis_1D2D = garonne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=garonne_aval)
1179 Regular_1D_1 = garonne_1.Segment(geom=garonne_amont)
1180 garonne_amont_1 = Regular_1D_1.GetSubMesh()
1181 Number_of_Segments_2 = Regular_1D_1.NumberOfSegments(150)
1182 QuadFromMedialAxis_1D2D_1 = garonne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=garonne_amont)
1183 Regular_1D_2 = garonne_1.Segment(geom=SectionsGaronne)
1184 sections = Regular_1D_2.GetSubMesh()
1185 Number_of_Segments_3 = Regular_1D_2.NumberOfSegments(10)
1186 isDone = garonne_1.SetMeshOrder( [ [ sections, garonne_aval_1, garonne_amont_1 ] ])
1187 NETGEN_1D_2D_1 = garonne_1.Triangle(algo=smeshBuilder.NETGEN_1D2D,geom=garonne_pont)
1188 garonne_pont_1 = NETGEN_1D_2D_1.GetSubMesh()
1189 NETGEN_2D_Parameters_2 = NETGEN_1D_2D_1.Parameters()
1190 NETGEN_2D_Parameters_2.SetMaxSize( 50 )
1191 NETGEN_2D_Parameters_2.SetSecondOrder( 0 )
1192 NETGEN_2D_Parameters_2.SetOptimize( 1 )
1193 NETGEN_2D_Parameters_2.SetFineness( 3 )
1194 NETGEN_2D_Parameters_2.SetMinSize( 10 )
1195 NETGEN_2D_Parameters_2.SetUseSurfaceCurvature( 1 )
1196 NETGEN_2D_Parameters_2.SetFuseEdges( 1 )
1197 NETGEN_2D_Parameters_2.SetQuadAllowed( 0 )
1198 isDone = garonne_1.SetMeshOrder( [ [ sections, garonne_aval_1, garonne_amont_1, garonne_pont_1 ] ])
1199 isDone = garonne_1.Compute()
1200 isDone = garonne_1.SplitQuadObject( garonne_1, 1 )
1201
1202 # --- geometrical groups of faces
1203
1204 garonne_riveDroite_2 = garonne_1.GroupOnGeom(garonne_riveDroite,'garonne_riveDroite',SMESH.FACE)
1205 garonne_aval_2 = garonne_1.GroupOnGeom(garonne_aval,'garonne_aval',SMESH.FACE)
1206 garonne_riveGauche_2 = garonne_1.GroupOnGeom(garonne_riveGauche,'garonne_riveGauche',SMESH.FACE)
1207 garonne_pont_2 = garonne_1.GroupOnGeom(garonne_pont,'garonne_pont',SMESH.FACE)
1208 garonne_amont_2 = garonne_1.GroupOnGeom(garonne_amont,'garonne_amont',SMESH.FACE)
1209
1210 # --- geometrical groups of edges
1211
1212 ClosedFreeBoundary_1 = garonne_1.GroupOnGeom(ClosedFreeBoundary[0],'ClosedFreeBoundary',SMESH.EDGE)
1213 garonne_amont_droite_2 = garonne_1.GroupOnGeom(garonne_amont_droite,'garonne_amont_droite',SMESH.EDGE)
1214 garonne_amont_gauche_2 = garonne_1.GroupOnGeom(garonne_amont_gauche,'garonne_amont_gauche',SMESH.EDGE)
1215 garonne_aval_droite_2 = garonne_1.GroupOnGeom(garonne_aval_droite,'garonne_aval_droite',SMESH.EDGE)
1216 garonne_aval_gauche_2 = garonne_1.GroupOnGeom(garonne_aval_gauche,'garonne_aval_gauche',SMESH.EDGE)
1217 garonne_pont_droite_2 = garonne_1.GroupOnGeom(garonne_pont_droite,'garonne_pont_droite',SMESH.EDGE)
1218 garonne_pont_gauche_2 = garonne_1.GroupOnGeom(garonne_pont_gauche,'garonne_pont_gauche',SMESH.EDGE)
1219 SectionsGaronne_1 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.EDGE)
1220 bordGaucheDomaine_1 = garonne_1.GroupOnGeom(bordGaucheDomaine,'bordGaucheDomaine',SMESH.EDGE)
1221 bordDroiteDomaine_1 = garonne_1.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine',SMESH.EDGE)
1222 amont_1 = garonne_1.GroupOnGeom(amont,'amont',SMESH.EDGE)
1223 aval_1 = garonne_1.GroupOnGeom(aval,'aval',SMESH.EDGE)
1224 pilePont1_1 = garonne_1.GroupOnGeom(ClosedFreeBoundary[1],'pilePont1',SMESH.EDGE)
1225 pilePont2_1 = garonne_1.GroupOnGeom(ClosedFreeBoundary[2],'pilePont2',SMESH.EDGE)
1226 pilePont3_1 = garonne_1.GroupOnGeom(ClosedFreeBoundary[3],'pilePont3',SMESH.EDGE)
1227 pilePont4_1 = garonne_1.GroupOnGeom(ClosedFreeBoundary[4],'pilePont4',SMESH.EDGE)
1228
1229 # --- geometrical groups of nodes
1230
1231 garonne_amont_3 = garonne_1.GroupOnGeom(garonne_amont,'garonne_amont',SMESH.NODE)
1232 garonne_aval_3 = garonne_1.GroupOnGeom(garonne_aval,'garonne_aval',SMESH.NODE)
1233 garonne_pont_3 = garonne_1.GroupOnGeom(garonne_pont,'garonne_pont',SMESH.NODE)
1234 garonne_riveDroite_3 = garonne_1.GroupOnGeom(garonne_riveDroite,'garonne_riveDroite',SMESH.NODE)
1235 garonne_riveGauche_3 = garonne_1.GroupOnGeom(garonne_riveGauche,'garonne_riveGauche',SMESH.NODE)
1236 ClosedFreeBoundary_2 = garonne_1.GroupOnGeom(ClosedFreeBoundary[0],'ClosedFreeBoundary',SMESH.NODE)
1237 garonne_amont_droite_2 = garonne_1.GroupOnGeom(garonne_amont_droite,'garonne_amont_droite',SMESH.NODE)
1238 garonne_amont_gauche_2 = garonne_1.GroupOnGeom(garonne_amont_gauche,'garonne_amont_gauche',SMESH.NODE)
1239 garonne_aval_droite_2 = garonne_1.GroupOnGeom(garonne_aval_droite,'garonne_aval_droite',SMESH.NODE)
1240 garonne_aval_gauche_2 = garonne_1.GroupOnGeom(garonne_aval_gauche,'garonne_aval_gauche',SMESH.NODE)
1241 garonne_pont_droite_2 = garonne_1.GroupOnGeom(garonne_pont_droite,'garonne_pont_droite',SMESH.NODE)
1242 garonne_pont_gauche_2 = garonne_1.GroupOnGeom(garonne_pont_gauche,'garonne_pont_gauche',SMESH.NODE)
1243 SectionsGaronne_2 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
1244 bordGaucheDomaine_2 = garonne_1.GroupOnGeom(bordGaucheDomaine,'bordGaucheDomaine',SMESH.NODE)
1245 bordDroiteDomaine_2 = garonne_1.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine',SMESH.NODE)
1246 amont_2 = garonne_1.GroupOnGeom(amont,'amont',SMESH.NODE)
1247 aval_2 = garonne_1.GroupOnGeom(aval,'aval',SMESH.NODE)
1248 pilePont1_2 = garonne_1.GroupOnGeom(ClosedFreeBoundary[1],'pilePont1',SMESH.NODE)
1249 pilePont2_2 = garonne_1.GroupOnGeom(ClosedFreeBoundary[2],'pilePont2',SMESH.NODE)
1250 pilePont3_2 = garonne_1.GroupOnGeom(ClosedFreeBoundary[3],'pilePont3',SMESH.NODE)
1251 pilePont4_2 = garonne_1.GroupOnGeom(ClosedFreeBoundary[4],'pilePont4',SMESH.NODE)
1252
1253 ## Set names of Mesh objects
1254 smesh.SetName(NETGEN_1D_2D.GetAlgorithm(), 'NETGEN 1D-2D')
1255 smesh.SetName(QuadFromMedialAxis_1D2D.GetAlgorithm(), 'QuadFromMedialAxis_1D2D')
1256 smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
1257 smesh.SetName(Number_of_Segments_1, 'Number of Segments_1')
1258 smesh.SetName(Number_of_Segments_2, 'Number of Segments_2')
1259 smesh.SetName(NETGEN_2D_Parameters_1, 'NETGEN 2D Parameters_1')
1260 smesh.SetName(Number_of_Segments_3, 'Number of Segments_3')
1261 smesh.SetName(NETGEN_2D_Parameters_2, 'NETGEN 2D Parameters_2')
1262
1263 smesh.SetName(garonne_aval_1, 'submesh_garonne_aval')
1264 smesh.SetName(garonne_pont_1, 'submesh_garonne_pont')
1265 smesh.SetName(garonne_amont_1, 'submesh_garonne_amont')
1266 smesh.SetName(garonne_1.GetMesh(), 'submesh_garonne_1')
1267 smesh.SetName(sections, 'submesh_sections')
1268
1269
1270 garonne_1.SetAutoColor( 1 )
1271 tmpdir = tempfile.mkdtemp()
1272 print("tmpdir=",tmpdir)
1273 fichierMaillage = os.path.join(tmpdir, 'garonne_1.med')
1274 garonne_1.ExportMED(fichierMaillage, 0, SMESH.MED_V2_2, 1, None ,1)
1275
1276 controlMeshStats(garonne_1, 6985, 745, 13761)
1277 controlSubMeshStats(garonne_pont_2, 202)
1278 controlSubMeshStats(garonne_amont_2, 3000)
1279 controlSubMeshStats(garonne_aval_2, 2000)
1280 controlSubMeshStats(garonne_riveDroite_2, 3941)
1281 controlSubMeshStats(garonne_riveGauche_2, 4635)
1282
1283 if salome.sg.hasDesktop():
1284   salome.sg.updateObjBrowser()