Salome HOME
adjust tests
[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( theStudy._get_StudyId() )
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( u"Pelouses et pâturages naturels", 1.0321 )
72 Strickler_table_1.SetAttrValue( u"Pelouses et pâturages naturels", "321" )
73 Strickler_table_1.SetColor( u"Pelouses et pâturages naturels", QColor( 204, 242, 77 ) )
74
75 Strickler_table_1.Set( u"Aéroports", 1.0124 )
76 Strickler_table_1.SetAttrValue( u"Aéroports", "124" )
77 Strickler_table_1.SetColor( u"Aéroports", QColor( 230, 204, 230 ) )
78
79 Strickler_table_1.Set( u"Systèmes culturaux et parcellaires complexes", 1.0242 )
80 Strickler_table_1.SetAttrValue( u"Systèmes culturaux et parcellaires complexes", "242" )
81 Strickler_table_1.SetColor( u"Systèmes culturaux et parcellaires complexes", QColor( 255, 230, 77 ) )
82
83 Strickler_table_1.Set( u"Cultures annuelles associées à des cultures permanentes", 1.0241 )
84 Strickler_table_1.SetAttrValue( u"Cultures annuelles associées à des cultures permanentes", "241" )
85 Strickler_table_1.SetColor( u"Cultures annuelles associées à des cultures permanentes", QColor( 255, 230, 166 ) )
86
87 Strickler_table_1.Set( u"Forêt et végétation arbustive en mutation", 1.0324 )
88 Strickler_table_1.SetAttrValue( u"Forêt et végétation arbustive en mutation", "324" )
89 Strickler_table_1.SetColor( u"Forêt et végétation arbustive en mutation", QColor( 166, 242, 0 ) )
90
91 Strickler_table_1.Set( u"Décharges", 1.0132 )
92 Strickler_table_1.SetAttrValue( u"Décharges", "132" )
93 Strickler_table_1.SetColor( u"Décharges", QColor( 166, 77, 0 ) )
94
95 Strickler_table_1.Set( u"Végétation clairsemée", 1.0333 )
96 Strickler_table_1.SetAttrValue( u"Végétation clairsemée", "333" )
97 Strickler_table_1.SetColor( u"Végétation clairsemée", QColor( 204, 255, 204 ) )
98
99 Strickler_table_1.Set( u"Prairies et autres surfaces toujours en herbe à usage agricole", 1.0231 )
100 Strickler_table_1.SetAttrValue( u"Prairies et autres surfaces toujours en herbe à usage agricole", "231" )
101 Strickler_table_1.SetColor( u"Prairies et autres surfaces toujours en herbe à usage agricole", QColor( 230, 230, 77 ) )
102
103 Strickler_table_1.Set( u"Périmètres irrigués en permanence", 1.0212 )
104 Strickler_table_1.SetAttrValue( u"Périmètres irrigués en permanence", "212" )
105 Strickler_table_1.SetColor( u"Périmètres irrigués en permanence", QColor( 255, 255, 0 ) )
106
107 Strickler_table_1.Set( u"Plans d'eau", 1.0512 )
108 Strickler_table_1.SetAttrValue( u"Plans d'eau", "512" )
109 Strickler_table_1.SetColor( u"Plans d'eau", QColor( 128, 242, 230 ) )
110
111 Strickler_table_1.Set( u"Territoires agroforestiers", 1.0244 )
112 Strickler_table_1.SetAttrValue( u"Territoires agroforestiers", "244" )
113 Strickler_table_1.SetColor( u"Territoires agroforestiers", QColor( 242, 204, 166 ) )
114
115 Strickler_table_1.Set( u"Forêts mélangées", 1.0313 )
116 Strickler_table_1.SetAttrValue( u"Forêts mélangées", "313" )
117 Strickler_table_1.SetColor( u"Forêts mélangées", QColor( 77, 255, 0 ) )
118
119 Strickler_table_1.Set( u"Glaciers et neiges éternelles", 1.0335 )
120 Strickler_table_1.SetAttrValue( u"Glaciers et neiges éternelles", "335" )
121 Strickler_table_1.SetColor( u"Glaciers et neiges éternelles", QColor( 166, 230, 204 ) )
122
123 Strickler_table_1.Set( u"Plages, dunes et sable", 1.0331 )
124 Strickler_table_1.SetAttrValue( u"Plages, dunes et sable", "331" )
125 Strickler_table_1.SetColor( u"Plages, dunes et sable", QColor( 230, 230, 230 ) )
126
127 Strickler_table_1.Set( u"Zones incendiées", 1.0334 )
128 Strickler_table_1.SetAttrValue( u"Zones incendiées", "334" )
129 Strickler_table_1.SetColor( u"Zones incendiées", QColor( 0, 0, 0 ) )
130
131 Strickler_table_1.Set( u"Tissu urbain continu", 1.0111 )
132 Strickler_table_1.SetAttrValue( u"Tissu urbain continu", "111" )
133 Strickler_table_1.SetColor( u"Tissu urbain continu", QColor( 230, 0, 77 ) )
134
135 Strickler_table_1.Set( u"Chantiers", 1.0133 )
136 Strickler_table_1.SetAttrValue( u"Chantiers", "133" )
137 Strickler_table_1.SetColor( u"Chantiers", QColor( 255, 77, 255 ) )
138
139 Strickler_table_1.Set( u"Estuaires", 1.0522 )
140 Strickler_table_1.SetAttrValue( u"Estuaires", "522" )
141 Strickler_table_1.SetColor( u"Estuaires", QColor( 166, 255, 230 ) )
142
143 Strickler_table_1.Set( u"Marais maritimes", 1.0421 )
144 Strickler_table_1.SetAttrValue( u"Marais maritimes", "421" )
145 Strickler_table_1.SetColor( u"Marais maritimes", QColor( 204, 204, 255 ) )
146
147 Strickler_table_1.Set( u"Forêts de conifères", 1.0312 )
148 Strickler_table_1.SetAttrValue( u"Forêts de conifères", "312" )
149 Strickler_table_1.SetColor( u"Forêts de conifères", QColor( 0, 166, 0 ) )
150
151 Strickler_table_1.Set( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", 1.0243 )
152 Strickler_table_1.SetAttrValue( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", "243" )
153 Strickler_table_1.SetColor( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", QColor( 230, 204, 77 ) )
154
155 Strickler_table_1.Set( u"Tourbières", 1.0412 )
156 Strickler_table_1.SetAttrValue( u"Tourbières", "412" )
157 Strickler_table_1.SetColor( u"Tourbières", QColor( 77, 77, 255 ) )
158
159 Strickler_table_1.Set( u"Extraction de matériaux", 1.0131 )
160 Strickler_table_1.SetAttrValue( u"Extraction de matériaux", "131" )
161 Strickler_table_1.SetColor( u"Extraction de matériaux", QColor( 166, 0, 204 ) )
162
163 Strickler_table_1.Set( u"Réseaux routier et ferroviaire et espaces associés", 1.0122 )
164 Strickler_table_1.SetAttrValue( u"Réseaux routier et ferroviaire et espaces associés", "122" )
165 Strickler_table_1.SetColor( u"Réseaux routier et ferroviaire et espaces associés", QColor( 204, 0, 0 ) )
166
167 Strickler_table_1.Set( u"Mers et océans", 1.0523 )
168 Strickler_table_1.SetAttrValue( u"Mers et océans", "523" )
169 Strickler_table_1.SetColor( u"Mers et océans", QColor( 230, 242, 255 ) )
170
171 Strickler_table_1.Set( u"Equipements sportifs et de loisirs", 1.0142 )
172 Strickler_table_1.SetAttrValue( u"Equipements sportifs et de loisirs", "142" )
173 Strickler_table_1.SetColor( u"Equipements sportifs et de loisirs", QColor( 255, 230, 255 ) )
174
175 Strickler_table_1.Set( u"Forêts de feuillus", 1.0311 )
176 Strickler_table_1.SetAttrValue( u"Forêts de feuillus", "311" )
177 Strickler_table_1.SetColor( u"Forêts de feuillus", QColor( 128, 255, 0 ) )
178
179 Strickler_table_1.Set( u"Vergers et petits fruits", 1.0222 )
180 Strickler_table_1.SetAttrValue( u"Vergers et petits fruits", "222" )
181 Strickler_table_1.SetColor( u"Vergers et petits fruits", QColor( 242, 166, 77 ) )
182
183 Strickler_table_1.Set( u"Végétation sclérophylle", 1.0323 )
184 Strickler_table_1.SetAttrValue( u"Végétation sclérophylle", "323" )
185 Strickler_table_1.SetColor( u"Végétation sclérophylle", QColor( 166, 230, 77 ) )
186
187 Strickler_table_1.Set( u"Landes et broussailles", 1.0322 )
188 Strickler_table_1.SetAttrValue( u"Landes et broussailles", "322" )
189 Strickler_table_1.SetColor( u"Landes et broussailles", QColor( 166, 255, 128 ) )
190
191 Strickler_table_1.Set( u"Tissu urbain discontinu", 1.0112 )
192 Strickler_table_1.SetAttrValue( u"Tissu urbain discontinu", "112" )
193 Strickler_table_1.SetColor( u"Tissu urbain discontinu", QColor( 255, 0, 0 ) )
194
195 Strickler_table_1.Set( u"Cours et voies d'eau", 1.0511 )
196 Strickler_table_1.SetAttrValue( u"Cours et voies d'eau", "511" )
197 Strickler_table_1.SetColor( u"Cours et voies d'eau", QColor( 0, 204, 242 ) )
198
199 Strickler_table_1.Set( u"Oliveraies", 1.0223 )
200 Strickler_table_1.SetAttrValue( u"Oliveraies", "223" )
201 Strickler_table_1.SetColor( u"Oliveraies", QColor( 230, 166, 0 ) )
202
203 Strickler_table_1.Set( u"Vignobles", 1.0221 )
204 Strickler_table_1.SetAttrValue( u"Vignobles", "221" )
205 Strickler_table_1.SetColor( u"Vignobles", QColor( 230, 128, 0 ) )
206
207 Strickler_table_1.Set( u"Rizières", 1.0213 )
208 Strickler_table_1.SetAttrValue( u"Rizières", "213" )
209 Strickler_table_1.SetColor( u"Rizières", QColor( 230, 230, 0 ) )
210
211 Strickler_table_1.Set( u"Zones portuaires", 1.0123 )
212 Strickler_table_1.SetAttrValue( u"Zones portuaires", "123" )
213 Strickler_table_1.SetColor( u"Zones portuaires", QColor( 230, 204, 204 ) )
214
215 Strickler_table_1.Set( u"Zones industrielles ou commerciales et installations publiques", 1.0121 )
216 Strickler_table_1.SetAttrValue( u"Zones industrielles ou commerciales et installations publiques", "121" )
217 Strickler_table_1.SetColor( u"Zones industrielles ou commerciales et installations publiques", QColor( 204, 77, 242 ) )
218
219 Strickler_table_1.Set( u"Marais salants", 1.0422 )
220 Strickler_table_1.SetAttrValue( u"Marais salants", "422" )
221 Strickler_table_1.SetColor( u"Marais salants", QColor( 230, 230, 255 ) )
222
223 Strickler_table_1.Set( u"Marais intérieurs", 1.0411 )
224 Strickler_table_1.SetAttrValue( u"Marais intérieurs", "411" )
225 Strickler_table_1.SetColor( u"Marais intérieurs", QColor( 166, 166, 255 ) )
226
227 Strickler_table_1.Set( u"Espaces verts urbains", 1.0141 )
228 Strickler_table_1.SetAttrValue( u"Espaces verts urbains", "141" )
229 Strickler_table_1.SetColor( u"Espaces verts urbains", QColor( 255, 166, 255 ) )
230
231 Strickler_table_1.Set( u"Lagunes littorales", 1.0521 )
232 Strickler_table_1.SetAttrValue( u"Lagunes littorales", "521" )
233 Strickler_table_1.SetColor( u"Lagunes littorales", QColor( 0, 255, 166 ) )
234
235 Strickler_table_1.Set( u"Roches nues", 1.0332 )
236 Strickler_table_1.SetAttrValue( u"Roches nues", "332" )
237 Strickler_table_1.SetColor( u"Roches nues", QColor( 204, 204, 204 ) )
238
239 Strickler_table_1.Set( u"Terres arables hors périmètres d'irrigation", 1.0211 )
240 Strickler_table_1.SetAttrValue( u"Terres arables hors périmètres d'irrigation", "211" )
241 Strickler_table_1.SetColor( u"Terres arables hors périmètres d'irrigation", QColor( 255, 255, 168 ) )
242
243 Strickler_table_1.Set( u"Zones intertidales", 1.0423 )
244 Strickler_table_1.SetAttrValue( u"Zones intertidales", "423" )
245 Strickler_table_1.SetColor( u"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 casGaronne_1 = hydro_doc.CreateObject( KIND_CALCULATION )
928 casGaronne_1.SetName( "casGaronne_1" )
929
930 casGaronne_1.SetAssignmentMode( HYDROData_CalculationCase.MANUAL )
931 casGaronne_1.AddGeometryObject( domaineEtendu )
932 casGaronne_1.AddGeometryObject( litMajeur )
933 casGaronne_1.AddGeometryObject( litMineur_amont )
934 casGaronne_1.AddGeometryObject( litMineur_aval )
935 casGaronne_1.AddGeometryObject( litMineur_pont )
936 casGaronne_1.AddGeometryObject( pile1 )
937 casGaronne_1.AddGeometryObject( pile2 )
938 casGaronne_1.AddGeometryObject( pile3 )
939 casGaronne_1.AddGeometryObject( pile4 )
940
941 case_geom_group = domaineEtendu.GetGroup( 0 )
942 casGaronne_1.AddGeometryGroup( case_geom_group )
943 case_geom_group = litMajeur.GetGroup( 0 )
944 casGaronne_1.AddGeometryGroup( case_geom_group )
945 case_geom_group = litMineur_amont.GetGroup( 0 )
946 casGaronne_1.AddGeometryGroup( case_geom_group )
947 case_geom_group = litMineur_aval.GetGroup( 0 )
948 casGaronne_1.AddGeometryGroup( case_geom_group )
949 case_geom_group = litMineur_pont.GetGroup( 0 )
950 casGaronne_1.AddGeometryGroup( case_geom_group )
951 case_geom_group = pile1.GetGroup( 0 )
952 casGaronne_1.AddGeometryGroup( case_geom_group )
953 case_geom_group = pile2.GetGroup( 0 )
954 casGaronne_1.AddGeometryGroup( case_geom_group )
955 case_geom_group = pile3.GetGroup( 0 )
956 casGaronne_1.AddGeometryGroup( case_geom_group )
957 case_geom_group = pile4.GetGroup( 0 )
958 casGaronne_1.AddGeometryGroup( case_geom_group )
959 casGaronne_1.SetBoundaryPolyline( domaine )
960
961 # Start the algorithm of the partition and assignment
962 casGaronne_1.Update()
963 casGaronne_1_riveDroite = hydro_doc.FindObjectByName( "casGaronne_1_Reg_1" )
964 casGaronne_1_Zone_1 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_1" )
965 casGaronne_1_Zone_1.SetColor( QColor( 64, 156, 192 ))
966 casGaronne_1_riveDroite.AddZone( casGaronne_1_Zone_1 )
967 casGaronne_1_Zone_2 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_2" )
968 casGaronne_1_Zone_2.SetMergeType( HYDROData_Zone.Merge_Object )
969 Cloud_02 = hydro_doc.FindObjectByName( "Cloud_02" )
970 casGaronne_1_Zone_2.SetMergeObject( Cloud_02 )
971 casGaronne_1_Zone_2.SetColor( QColor( 192, 183, 64 ))
972 casGaronne_1_riveDroite.AddZone( casGaronne_1_Zone_2 )
973 casGaronne_1_aval = hydro_doc.FindObjectByName( "casGaronne_1_Reg_2" )
974 casGaronne_1_Zone_3 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_3" )
975 casGaronne_1_Zone_3.SetMergeType( HYDROData_Zone.Merge_Object )
976 garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" )
977 casGaronne_1_Zone_3.SetMergeObject( garonne_point_L93 )
978 casGaronne_1_Zone_3.SetColor( QColor( 64, 183, 192 ))
979 casGaronne_1_aval.AddZone( casGaronne_1_Zone_3 )
980 casGaronne_1_riveGauche = hydro_doc.FindObjectByName( "casGaronne_1_Reg_3" )
981 casGaronne_1_Zone_4 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_4" )
982 casGaronne_1_Zone_4.SetMergeType( HYDROData_Zone.Merge_Object )
983 Cloud_02 = hydro_doc.FindObjectByName( "Cloud_02" )
984 casGaronne_1_Zone_4.SetMergeObject( Cloud_02 )
985 casGaronne_1_Zone_4.SetColor( QColor( 64, 192, 162 ))
986 casGaronne_1_riveGauche.AddZone( casGaronne_1_Zone_4 )
987 casGaronne_1_Zone_6 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_6" )
988 casGaronne_1_Zone_6.SetColor( QColor( 64, 192, 90 ))
989 casGaronne_1_riveGauche.AddZone( casGaronne_1_Zone_6 )
990 casGaronne_1_pont = hydro_doc.FindObjectByName( "casGaronne_1_Reg_4" )
991 casGaronne_1_Zone_5 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_5" )
992 casGaronne_1_Zone_5.SetMergeType( HYDROData_Zone.Merge_Object )
993 garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" )
994 casGaronne_1_Zone_5.SetMergeObject( garonne_point_L93 )
995 casGaronne_1_Zone_5.SetColor( QColor( 64, 190, 192 ))
996 casGaronne_1_pont.AddZone( casGaronne_1_Zone_5 )
997 casGaronne_1_amont = hydro_doc.FindObjectByName( "casGaronne_1_Reg_5" )
998 casGaronne_1_Zone_7 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_7" )
999 casGaronne_1_Zone_7.SetMergeType( HYDROData_Zone.Merge_Object )
1000 garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" )
1001 casGaronne_1_Zone_7.SetMergeObject( garonne_point_L93 )
1002 casGaronne_1_Zone_7.SetColor( QColor( 109, 192, 64 ))
1003 casGaronne_1_amont.AddZone( casGaronne_1_Zone_7 )
1004 casGaronne_1_pile1 = hydro_doc.FindObjectByName( "casGaronne_1_Reg_6" )
1005 casGaronne_1_Zone_8 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_8" )
1006 casGaronne_1_Zone_8.SetMergeType( HYDROData_Zone.Merge_ZMAX )
1007 casGaronne_1_Zone_8.SetColor( QColor( 192, 179, 64 ))
1008 casGaronne_1_pile1.AddZone( casGaronne_1_Zone_8 )
1009 casGaronne_1_pile2 = hydro_doc.FindObjectByName( "casGaronne_1_Reg_7" )
1010 casGaronne_1_Zone_9 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_9" )
1011 casGaronne_1_Zone_9.SetMergeType( HYDROData_Zone.Merge_ZMAX )
1012 casGaronne_1_Zone_9.SetColor( QColor( 192, 75, 64 ))
1013 casGaronne_1_pile2.AddZone( casGaronne_1_Zone_9 )
1014 casGaronne_1_pile3 = hydro_doc.FindObjectByName( "casGaronne_1_Reg_8" )
1015 casGaronne_1_Zone_10 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_10" )
1016 casGaronne_1_Zone_10.SetMergeType( HYDROData_Zone.Merge_ZMAX )
1017 casGaronne_1_Zone_10.SetColor( QColor( 162, 192, 64 ))
1018 casGaronne_1_pile3.AddZone( casGaronne_1_Zone_10 )
1019 casGaronne_1_pile4 = hydro_doc.FindObjectByName( "casGaronne_1_Reg_9" )
1020 casGaronne_1_Zone_11 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_11" )
1021 casGaronne_1_Zone_11.SetMergeType( HYDROData_Zone.Merge_ZMAX )
1022 casGaronne_1_Zone_11.SetColor( QColor( 64, 192, 81 ))
1023 casGaronne_1_pile4.AddZone( casGaronne_1_Zone_11 )
1024 casGaronne_1_riveDroite.SetName( "casGaronne_1_riveDroite" )
1025 casGaronne_1_aval.SetName( "casGaronne_1_aval" )
1026 casGaronne_1_riveGauche.SetName( "casGaronne_1_riveGauche" )
1027 casGaronne_1_pont.SetName( "casGaronne_1_pont" )
1028 casGaronne_1_amont.SetName( "casGaronne_1_amont" )
1029 casGaronne_1_pile1.SetName( "casGaronne_1_pile1" )
1030 casGaronne_1_pile2.SetName( "casGaronne_1_pile2" )
1031 casGaronne_1_pile3.SetName( "casGaronne_1_pile3" )
1032 casGaronne_1_pile4.SetName( "casGaronne_1_pile4" )
1033
1034 # Export of the calculation case
1035 casGaronne_1_entry = casGaronne_1.Export( theStudy._get_StudyId() )
1036
1037 # Get geometry shape and print debug information
1038 import GEOM
1039 print "Entry:", casGaronne_1_entry
1040 HYDRO_casGaronne_1 = salome.IDToObject( str( casGaronne_1_entry ) )
1041 print "Geom shape:", HYDRO_casGaronne_1
1042 print "Geom shape name:", HYDRO_casGaronne_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(theStudy)
1056
1057 casGaronne_1_pile3_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1058 geompy.UnionIDs(casGaronne_1_pile3_Outer, [68, 70, 66, 63])
1059 casGaronne_1_pile1_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1060 geompy.UnionIDs(casGaronne_1_pile1_Outer, [77, 79, 75, 72])
1061 casGaronne_1_pile2_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1062 geompy.UnionIDs(casGaronne_1_pile2_Outer, [57, 54, 59, 61])
1063 casGaronne_1_pile4_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1064 geompy.UnionIDs(casGaronne_1_pile4_Outer, [84, 81, 86, 88])
1065 casGaronne_1_litMineur_amont_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1066 geompy.UnionIDs(casGaronne_1_litMineur_amont_Outer, [21, 39])
1067 casGaronne_1_litMineur_aval_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1068 geompy.UnionIDs(casGaronne_1_litMineur_aval_Outer, [17, 30])
1069 casGaronne_1_litMineur_pont_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1070 geompy.UnionIDs(casGaronne_1_litMineur_pont_Outer, [52, 32, 19, 37])
1071 casGaronne_1_domaineEtendu_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1072 geompy.UnionIDs(casGaronne_1_domaineEtendu_Outer, [28, 91, 13, 4, 7, 9, 11, 15, 23, 25, 35, 43, 41, 49, 47, 45])
1073 geomObj_1 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1074 geompy.UnionIDs(geomObj_1, [52, 32, 19, 37])
1075 geomObj_2 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1076 geompy.UnionIDs(geomObj_2, [57, 54, 59, 61])
1077 geomObj_3 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1078 geompy.UnionIDs(geomObj_3, [21, 39])
1079 geomObj_4 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1080 geompy.UnionIDs(geomObj_4, [17, 30])
1081 geomObj_5 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1082 geompy.UnionIDs(geomObj_5, [77, 79, 75, 72])
1083 geomObj_6 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1084 geompy.UnionIDs(geomObj_6, [84, 81, 86, 88])
1085 geomObj_7 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1086 geompy.UnionIDs(geomObj_7, [28, 91, 13, 4, 7, 9, 11, 15, 23, 25, 35, 43, 41, 49, 47, 45])
1087 geomObj_8 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1088 geompy.UnionIDs(geomObj_8, [68, 70, 66, 63])
1089 riveDroite = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"])
1090 geompy.UnionIDs(riveDroite, [2])
1091 riveGauche = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"])
1092 geompy.UnionIDs(riveGauche, [29])
1093 litMineur_aval = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"])
1094 geompy.UnionIDs(litMineur_aval, [22])
1095 litMineur_pont = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"])
1096 geompy.UnionIDs(litMineur_pont, [42])
1097 litMineur_amont = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"])
1098 geompy.UnionIDs(litMineur_amont, [81])
1099 sections = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1100 geompy.UnionIDs(sections, [24, 28, 44, 83])
1101 amont = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1102 geompy.UnionIDs(amont, [83])
1103 aval = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1104 geompy.UnionIDs(aval, [28])
1105 bordDroit = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1106 geompy.UnionIDs(bordDroit, [4, 7, 9, 11, 19, 21])
1107 bordGauche = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1108 geompy.UnionIDs(bordGauche, [31, 34, 36, 41])
1109 piles = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"])
1110 geompy.UnionIDs(piles, [73,58,71,49,55,67,46,80,53,76,78,62,69,60,51,64])
1111 geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_pile3_Outer, 'casGaronne_1_pile3_Outer' )
1112 geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_pile1_Outer, 'casGaronne_1_pile1_Outer' )
1113 geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_pile2_Outer, 'casGaronne_1_pile2_Outer' )
1114 geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_pile4_Outer, 'casGaronne_1_pile4_Outer' )
1115 geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_litMineur_amont_Outer, 'casGaronne_1_litMineur_amont_Outer' )
1116 geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_litMineur_aval_Outer, 'casGaronne_1_litMineur_aval_Outer' )
1117 geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_litMineur_pont_Outer, 'casGaronne_1_litMineur_pont_Outer' )
1118 geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_domaineEtendu_Outer, 'casGaronne_1_domaineEtendu_Outer' )
1119 geompy.addToStudyInFather( HYDRO_casGaronne_1, riveDroite, 'riveDroite' )
1120 geompy.addToStudyInFather( HYDRO_casGaronne_1, riveGauche, 'riveGauche' )
1121 geompy.addToStudyInFather( HYDRO_casGaronne_1, litMineur_aval, 'litMineur_aval' )
1122 geompy.addToStudyInFather( HYDRO_casGaronne_1, litMineur_pont, 'litMineur_pont' )
1123 geompy.addToStudyInFather( HYDRO_casGaronne_1, litMineur_amont, 'litMineur_amont' )
1124 geompy.addToStudyInFather( HYDRO_casGaronne_1, sections, 'sections' )
1125 geompy.addToStudyInFather( HYDRO_casGaronne_1, amont, 'amont' )
1126 geompy.addToStudyInFather( HYDRO_casGaronne_1, aval, 'aval' )
1127 geompy.addToStudyInFather( HYDRO_casGaronne_1, bordDroit, 'bordDroit' )
1128 geompy.addToStudyInFather( HYDRO_casGaronne_1, bordGauche, 'bordGauche' )
1129 geompy.addToStudyInFather( HYDRO_casGaronne_1, piles, 'piles' )
1130
1131 # --- basic properties control: edges length, surfaces
1132 #controlGeomProps(geompy, riveGauche,  29149.1353799,  35950762.8967)
1133 #controlGeomProps(geompy, litMineur_aval,   7965.23431497,  938890.904721)
1134 #controlGeomProps(geompy, litMineur_pont,   961.8255222,  19618.0787789)
1135 #controlGeomProps(geompy, litMineur_amont,   22635.6212065,  2548509.17447)
1136 #controlGeomProps(geompy, riveDroite,  32012.2241814,  26188706.2202)
1137 controlGeomProps(geompy, riveGauche,  29149.1353799,  35949580.6716)
1138 controlGeomProps(geompy, litMineur_aval,   7965.23431497,  935955.786347)
1139 controlGeomProps(geompy, litMineur_pont,   961.8255222,  19618.016847)
1140 controlGeomProps(geompy, litMineur_amont,   22635.6212065,  2531409.65041)
1141 controlGeomProps(geompy, riveDroite,  32012.2241814, 25998085.6892)
1142
1143 ###
1144 ### SMESH component
1145 ###
1146
1147 import  SMESH, SALOMEDS
1148 from salome.smesh import smeshBuilder
1149 from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
1150
1151 smesh = smeshBuilder.New(theStudy)
1152 casGaronne_1 = smesh.Mesh(HYDRO_casGaronne_1)
1153 NETGEN_2D = casGaronne_1.Triangle(algo=smeshBuilder.NETGEN_1D2D)
1154 NETGEN_2D_Parameters_1 = NETGEN_2D.Parameters()
1155 NETGEN_2D_Parameters_1.SetMaxSize( 200 )
1156 NETGEN_2D_Parameters_1.SetSecondOrder( 0 )
1157 NETGEN_2D_Parameters_1.SetOptimize( 1 )
1158 NETGEN_2D_Parameters_1.SetFineness( 4 )
1159 NETGEN_2D_Parameters_1.SetMinSize( 50 )
1160 NETGEN_2D_Parameters_1.SetUseSurfaceCurvature( 1 )
1161 NETGEN_2D_Parameters_1.SetFuseEdges( 1 )
1162 NETGEN_2D_Parameters_1.SetQuadAllowed( 0 )
1163 Regular_1D = casGaronne_1.Segment(geom=litMineur_aval)
1164 litMineur_aval_1 = Regular_1D.GetSubMesh()
1165 nbseg_litMineur_aval = Regular_1D.NumberOfSegments(100)
1166 QuadFromMedialAxis_1D2D = casGaronne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=litMineur_aval)
1167 nbseg_litMineur_amont = smesh.CreateHypothesis('NumberOfSegments')
1168 nbseg_litMineur_amont.SetNumberOfSegments( 150 )
1169 Regular_1D_1 = casGaronne_1.Segment(geom=litMineur_amont)
1170 litMineur_amont_1 = Regular_1D_1.GetSubMesh()
1171 nbSeg_litMineur_amont = Regular_1D_1.NumberOfSegments(150)
1172 QuadFromMedialAxis_1D2D_1 = casGaronne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=litMineur_amont)
1173 Regular_1D_2 = casGaronne_1.Segment(geom=sections)
1174 sections_1 = Regular_1D_2.GetSubMesh()
1175 nbseg_sections = Regular_1D_2.NumberOfSegments(10)
1176 isDone = casGaronne_1.SetMeshOrder( [ [ sections_1, litMineur_aval_1, litMineur_amont_1 ] ])
1177 NETGEN_2D_1 = casGaronne_1.Triangle(algo=smeshBuilder.NETGEN_1D2D,geom=litMineur_pont)
1178 litMineur_pont_1 = NETGEN_2D_1.GetSubMesh()
1179 NETGEN_2D_Parameters_2 = NETGEN_2D_1.Parameters()
1180 NETGEN_2D_Parameters_2.SetMaxSize( 50 )
1181 NETGEN_2D_Parameters_2.SetSecondOrder( 0 )
1182 NETGEN_2D_Parameters_2.SetOptimize( 1 )
1183 NETGEN_2D_Parameters_2.SetFineness( 3 )
1184 NETGEN_2D_Parameters_2.SetMinSize( 10 )
1185 NETGEN_2D_Parameters_2.SetUseSurfaceCurvature( 1 )
1186 NETGEN_2D_Parameters_2.SetFuseEdges( 1 )
1187 NETGEN_2D_Parameters_2.SetQuadAllowed( 0 )
1188 isDone = casGaronne_1.SetMeshOrder( [ [ sections_1, litMineur_aval_1, litMineur_amont_1, litMineur_pont_1 ] ])
1189 isDone = casGaronne_1.Compute()
1190 isDone = casGaronne_1.SplitQuadObject( casGaronne_1, 1 )
1191
1192
1193 riveDroite_1 = casGaronne_1.GroupOnGeom(riveDroite,'riveDroite',SMESH.FACE)
1194 riveGauche_1 = casGaronne_1.GroupOnGeom(riveGauche,'riveGauche',SMESH.FACE)
1195 litMineur_aval_2 = casGaronne_1.GroupOnGeom(litMineur_aval,'litMineur_aval',SMESH.FACE)
1196 litMineur_pont_2 = casGaronne_1.GroupOnGeom(litMineur_pont,'litMineur_pont',SMESH.FACE)
1197 litMineur_amont_2 = casGaronne_1.GroupOnGeom(litMineur_amont,'litMineur_amont',SMESH.FACE)
1198 riveDroite_2 = casGaronne_1.GroupOnGeom(riveDroite,'riveDroite',SMESH.NODE)
1199 riveGauche_2 = casGaronne_1.GroupOnGeom(riveGauche,'riveGauche',SMESH.NODE)
1200 litMineur_aval_3 = casGaronne_1.GroupOnGeom(litMineur_aval,'litMineur_aval',SMESH.NODE)
1201 litMineur_pont_3 = casGaronne_1.GroupOnGeom(litMineur_pont,'litMineur_pont',SMESH.NODE)
1202 litMineur_amont_3 = casGaronne_1.GroupOnGeom(litMineur_amont,'litMineur_amont',SMESH.NODE)
1203 sections_2 = casGaronne_1.GroupOnGeom(sections,'sections',SMESH.EDGE)
1204 amont_1 = casGaronne_1.GroupOnGeom(amont,'amont',SMESH.EDGE)
1205 aval_1 = casGaronne_1.GroupOnGeom(aval,'aval',SMESH.EDGE)
1206 bordDroit_1 = casGaronne_1.GroupOnGeom(bordDroit,'bordDroit',SMESH.EDGE)
1207 bordGauche_1 = casGaronne_1.GroupOnGeom(bordGauche,'bordGauche',SMESH.EDGE)
1208 piles_1 = casGaronne_1.GroupOnGeom(piles,'piles',SMESH.EDGE)
1209 sections_3 = casGaronne_1.GroupOnGeom(sections,'sections',SMESH.NODE)
1210 amont_2 = casGaronne_1.GroupOnGeom(amont,'amont',SMESH.NODE)
1211 aval_2 = casGaronne_1.GroupOnGeom(aval,'aval',SMESH.NODE)
1212 bordDroit_2 = casGaronne_1.GroupOnGeom(bordDroit,'bordDroit',SMESH.NODE)
1213 bordGauche_2 = casGaronne_1.GroupOnGeom(bordGauche,'bordGauche',SMESH.NODE)
1214 piles_2 = casGaronne_1.GroupOnGeom(piles,'piles',SMESH.NODE)
1215
1216 ## Set names of Mesh objects
1217 smesh.SetName(QuadFromMedialAxis_1D2D.GetAlgorithm(), 'QuadFromMedialAxis_1D2D')
1218 smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
1219 smesh.SetName(NETGEN_2D.GetAlgorithm(), 'NETGEN_2D')
1220 smesh.SetName(casGaronne_1.GetMesh(), 'casGaronne_1')
1221 smesh.SetName(litMineur_pont_1, 'litMineur_pont')
1222 smesh.SetName(litMineur_amont_1, 'litMineur_amont')
1223 smesh.SetName(litMineur_aval_1, 'litMineur_aval')
1224 smesh.SetName(nbSeg_litMineur_amont, 'nbSeg_litMineur_amont')
1225 smesh.SetName(nbseg_sections, 'nbseg_sections')
1226 smesh.SetName(NETGEN_2D_Parameters_2, 'NETGEN 2D Parameters_2')
1227 smesh.SetName(NETGEN_2D_Parameters_1, 'NETGEN 2D Parameters_1')
1228 smesh.SetName(nbseg_litMineur_aval, 'nbseg_litMineur_aval')
1229 smesh.SetName(nbseg_litMineur_amont, 'nbseg_litMineur_amont')
1230 smesh.SetName(sections_1, 'sections')
1231
1232 med_file = r'/tmp/casGaronne_1.med'
1233
1234 try:
1235   os.remove(med_file)
1236 except OSError:
1237   pass
1238
1239
1240 casGaronne_1.SetAutoColor( 1 )
1241 casGaronne_1.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
1242
1243 #controlMeshStats(casGaronne_1, 7040, 746, 13871)
1244 #controlSubMeshStats(litMineur_pont_2, 204)
1245 #controlSubMeshStats(litMineur_amont_2, 3000)
1246 #controlSubMeshStats(litMineur_aval_2, 2000)
1247 #controlSubMeshStats(riveDroite_1, 4040)
1248 #controlSubMeshStats(riveGauche_1, 4627)
1249 controlMeshStats(casGaronne_1, 6985, 745, 13761)
1250 controlSubMeshStats(litMineur_pont_2, 202)
1251 controlSubMeshStats(litMineur_amont_2, 3000)
1252 controlSubMeshStats(litMineur_aval_2, 2000)
1253 controlSubMeshStats(riveDroite_1, 3941)
1254 controlSubMeshStats(riveGauche_1, 4635)
1255
1256
1257 if salome.sg.hasDesktop():
1258   salome.sg.updateObjBrowser(1)