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