From db2adccbda5f821e66f33dbb2ad69438e19de022 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Sat, 2 Jul 2016 13:09:14 +0200 Subject: [PATCH] add test h016_pilesPontManualMesh --- doc/salome/examples/CMakeLists.txt | 1 + .../examples/CTestTestfileInstall.cmake | 1 + .../examples/h016_pilesPontManualMesh.py | 1222 +++++++++++++++++ 3 files changed, 1224 insertions(+) create mode 100644 doc/salome/examples/h016_pilesPontManualMesh.py diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 65c1337c..416092f4 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -35,6 +35,7 @@ SET(EXAMPLES_TESTS h013_caseDigueManualMesh.py h014_caseDigueManualInterpolZ.py h015_normalCaseManualTelemac.py + h016_pilesPontManualMesh.py ) SET(HYDRO_SAMPLES diff --git a/doc/salome/examples/CTestTestfileInstall.cmake b/doc/salome/examples/CTestTestfileInstall.cmake index b37ec9cf..0c707e22 100644 --- a/doc/salome/examples/CTestTestfileInstall.cmake +++ b/doc/salome/examples/CTestTestfileInstall.cmake @@ -37,6 +37,7 @@ SET(EXAMPLES_TESTS h013_caseDigueManualMesh h014_caseDigueManualInterpolZ h015_normalCaseManualTelemac + h016_pilesPontManualMesh ) FOREACH(tfile ${EXAMPLES_TESTS}) diff --git a/doc/salome/examples/h016_pilesPontManualMesh.py b/doc/salome/examples/h016_pilesPontManualMesh.py new file mode 100644 index 00000000..f075bc4f --- /dev/null +++ b/doc/salome/examples/h016_pilesPontManualMesh.py @@ -0,0 +1,1222 @@ +# -*- coding: utf-8 -*- + +import os +HYDRO_SAMPLES = os.path.join( os.environ["HYDRO_ROOT_DIR"], "bin/salome/test/HYDRO") + +### +### This file is generated automatically by SALOME v7.8.0 with dump python functionality +### + +import sys +import salome + +salome.salome_init() +theStudy = salome.myStudy + +### +### HYDRO component +### + +from HYDROPy import * +from PyQt4.QtCore import * +from PyQt4.QtGui import * + +hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() ) + +hydro_doc.SetLocalCS( 430000.000, 6350000.000 ) + +garonne_ign_01 = hydro_doc.CreateObject( KIND_IMAGE ) +garonne_ign_01.SetName( "garonne_ign_01" ) + +garonne_ign_01.SetZLevel( 0 ) + + + +if not(garonne_ign_01.LoadImage(os.path.join(HYDRO_SAMPLES, "garonne_ign_01.png" ))): + raise ValueError('problem while loading image') + +garonne_ign_01.SetLocalPoints( QPoint( 40, 817 ), + QPoint( 1325, 85 ) ) + +garonne_ign_01.SetGlobalPoints( 1, + QPointF( 471562.000, 6367750.000 ), + QPointF( 489400.000, 6377020.000 ) ) + +garonne_ign_01.Update() + +garonne_ign_02 = hydro_doc.CreateObject( KIND_IMAGE ) +garonne_ign_02.SetName( "garonne_ign_02" ) + +garonne_ign_02.SetZLevel( 1 ) + + +if not(garonne_ign_02.LoadImage( os.path.join(HYDRO_SAMPLES, "garonne_ign_02.png" ))): + raise ValueError('problem while loading image') + +garonne_ign_02.SetLocalPoints( QPoint( 1389, 447 ), + QPoint( 784, 481 ) ) + +garonne_ign_02.SetGlobalPoints( 3, + QPointF( 631.000, 95.000 ), + QPointF( 26.000, 129.000 ) ) +garonne_ign_02.SetTrsfReferenceImage( garonne_ign_01 ) + +garonne_ign_02.Update() + +Strickler_table_1 = hydro_doc.CreateObject( KIND_STRICKLER_TABLE ) +Strickler_table_1.SetName( "Strickler table_1" ) + +Strickler_table_1.SetAttrName( "CODE_06" ) + +Strickler_table_1.Set( u"Pelouses et pâturages naturels", 1.0321 ) +Strickler_table_1.SetAttrValue( u"Pelouses et pâturages naturels", "321" ) +Strickler_table_1.SetColor( u"Pelouses et pâturages naturels", QColor( 204, 242, 77 ) ) + +Strickler_table_1.Set( u"Aéroports", 1.0124 ) +Strickler_table_1.SetAttrValue( u"Aéroports", "124" ) +Strickler_table_1.SetColor( u"Aéroports", QColor( 230, 204, 230 ) ) + +Strickler_table_1.Set( u"Systèmes culturaux et parcellaires complexes", 1.0242 ) +Strickler_table_1.SetAttrValue( u"Systèmes culturaux et parcellaires complexes", "242" ) +Strickler_table_1.SetColor( u"Systèmes culturaux et parcellaires complexes", QColor( 255, 230, 77 ) ) + +Strickler_table_1.Set( u"Cultures annuelles associées à des cultures permanentes", 1.0241 ) +Strickler_table_1.SetAttrValue( u"Cultures annuelles associées à des cultures permanentes", "241" ) +Strickler_table_1.SetColor( u"Cultures annuelles associées à des cultures permanentes", QColor( 255, 230, 166 ) ) + +Strickler_table_1.Set( u"Forêt et végétation arbustive en mutation", 1.0324 ) +Strickler_table_1.SetAttrValue( u"Forêt et végétation arbustive en mutation", "324" ) +Strickler_table_1.SetColor( u"Forêt et végétation arbustive en mutation", QColor( 166, 242, 0 ) ) + +Strickler_table_1.Set( u"Décharges", 1.0132 ) +Strickler_table_1.SetAttrValue( u"Décharges", "132" ) +Strickler_table_1.SetColor( u"Décharges", QColor( 166, 77, 0 ) ) + +Strickler_table_1.Set( u"Végétation clairsemée", 1.0333 ) +Strickler_table_1.SetAttrValue( u"Végétation clairsemée", "333" ) +Strickler_table_1.SetColor( u"Végétation clairsemée", QColor( 204, 255, 204 ) ) + +Strickler_table_1.Set( u"Prairies et autres surfaces toujours en herbe à usage agricole", 1.0231 ) +Strickler_table_1.SetAttrValue( u"Prairies et autres surfaces toujours en herbe à usage agricole", "231" ) +Strickler_table_1.SetColor( u"Prairies et autres surfaces toujours en herbe à usage agricole", QColor( 230, 230, 77 ) ) + +Strickler_table_1.Set( u"Périmètres irrigués en permanence", 1.0212 ) +Strickler_table_1.SetAttrValue( u"Périmètres irrigués en permanence", "212" ) +Strickler_table_1.SetColor( u"Périmètres irrigués en permanence", QColor( 255, 255, 0 ) ) + +Strickler_table_1.Set( u"Plans d'eau", 1.0512 ) +Strickler_table_1.SetAttrValue( u"Plans d'eau", "512" ) +Strickler_table_1.SetColor( u"Plans d'eau", QColor( 128, 242, 230 ) ) + +Strickler_table_1.Set( u"Territoires agroforestiers", 1.0244 ) +Strickler_table_1.SetAttrValue( u"Territoires agroforestiers", "244" ) +Strickler_table_1.SetColor( u"Territoires agroforestiers", QColor( 242, 204, 166 ) ) + +Strickler_table_1.Set( u"Forêts mélangées", 1.0313 ) +Strickler_table_1.SetAttrValue( u"Forêts mélangées", "313" ) +Strickler_table_1.SetColor( u"Forêts mélangées", QColor( 77, 255, 0 ) ) + +Strickler_table_1.Set( u"Glaciers et neiges éternelles", 1.0335 ) +Strickler_table_1.SetAttrValue( u"Glaciers et neiges éternelles", "335" ) +Strickler_table_1.SetColor( u"Glaciers et neiges éternelles", QColor( 166, 230, 204 ) ) + +Strickler_table_1.Set( u"Plages, dunes et sable", 1.0331 ) +Strickler_table_1.SetAttrValue( u"Plages, dunes et sable", "331" ) +Strickler_table_1.SetColor( u"Plages, dunes et sable", QColor( 230, 230, 230 ) ) + +Strickler_table_1.Set( u"Zones incendiées", 1.0334 ) +Strickler_table_1.SetAttrValue( u"Zones incendiées", "334" ) +Strickler_table_1.SetColor( u"Zones incendiées", QColor( 0, 0, 0 ) ) + +Strickler_table_1.Set( u"Tissu urbain continu", 1.0111 ) +Strickler_table_1.SetAttrValue( u"Tissu urbain continu", "111" ) +Strickler_table_1.SetColor( u"Tissu urbain continu", QColor( 230, 0, 77 ) ) + +Strickler_table_1.Set( u"Chantiers", 1.0133 ) +Strickler_table_1.SetAttrValue( u"Chantiers", "133" ) +Strickler_table_1.SetColor( u"Chantiers", QColor( 255, 77, 255 ) ) + +Strickler_table_1.Set( u"Estuaires", 1.0522 ) +Strickler_table_1.SetAttrValue( u"Estuaires", "522" ) +Strickler_table_1.SetColor( u"Estuaires", QColor( 166, 255, 230 ) ) + +Strickler_table_1.Set( u"Marais maritimes", 1.0421 ) +Strickler_table_1.SetAttrValue( u"Marais maritimes", "421" ) +Strickler_table_1.SetColor( u"Marais maritimes", QColor( 204, 204, 255 ) ) + +Strickler_table_1.Set( u"Forêts de conifères", 1.0312 ) +Strickler_table_1.SetAttrValue( u"Forêts de conifères", "312" ) +Strickler_table_1.SetColor( u"Forêts de conifères", QColor( 0, 166, 0 ) ) + +Strickler_table_1.Set( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", 1.0243 ) +Strickler_table_1.SetAttrValue( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", "243" ) +Strickler_table_1.SetColor( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", QColor( 230, 204, 77 ) ) + +Strickler_table_1.Set( u"Tourbières", 1.0412 ) +Strickler_table_1.SetAttrValue( u"Tourbières", "412" ) +Strickler_table_1.SetColor( u"Tourbières", QColor( 77, 77, 255 ) ) + +Strickler_table_1.Set( u"Extraction de matériaux", 1.0131 ) +Strickler_table_1.SetAttrValue( u"Extraction de matériaux", "131" ) +Strickler_table_1.SetColor( u"Extraction de matériaux", QColor( 166, 0, 204 ) ) + +Strickler_table_1.Set( u"Réseaux routier et ferroviaire et espaces associés", 1.0122 ) +Strickler_table_1.SetAttrValue( u"Réseaux routier et ferroviaire et espaces associés", "122" ) +Strickler_table_1.SetColor( u"Réseaux routier et ferroviaire et espaces associés", QColor( 204, 0, 0 ) ) + +Strickler_table_1.Set( u"Mers et océans", 1.0523 ) +Strickler_table_1.SetAttrValue( u"Mers et océans", "523" ) +Strickler_table_1.SetColor( u"Mers et océans", QColor( 230, 242, 255 ) ) + +Strickler_table_1.Set( u"Equipements sportifs et de loisirs", 1.0142 ) +Strickler_table_1.SetAttrValue( u"Equipements sportifs et de loisirs", "142" ) +Strickler_table_1.SetColor( u"Equipements sportifs et de loisirs", QColor( 255, 230, 255 ) ) + +Strickler_table_1.Set( u"Forêts de feuillus", 1.0311 ) +Strickler_table_1.SetAttrValue( u"Forêts de feuillus", "311" ) +Strickler_table_1.SetColor( u"Forêts de feuillus", QColor( 128, 255, 0 ) ) + +Strickler_table_1.Set( u"Vergers et petits fruits", 1.0222 ) +Strickler_table_1.SetAttrValue( u"Vergers et petits fruits", "222" ) +Strickler_table_1.SetColor( u"Vergers et petits fruits", QColor( 242, 166, 77 ) ) + +Strickler_table_1.Set( u"Végétation sclérophylle", 1.0323 ) +Strickler_table_1.SetAttrValue( u"Végétation sclérophylle", "323" ) +Strickler_table_1.SetColor( u"Végétation sclérophylle", QColor( 166, 230, 77 ) ) + +Strickler_table_1.Set( u"Landes et broussailles", 1.0322 ) +Strickler_table_1.SetAttrValue( u"Landes et broussailles", "322" ) +Strickler_table_1.SetColor( u"Landes et broussailles", QColor( 166, 255, 128 ) ) + +Strickler_table_1.Set( u"Tissu urbain discontinu", 1.0112 ) +Strickler_table_1.SetAttrValue( u"Tissu urbain discontinu", "112" ) +Strickler_table_1.SetColor( u"Tissu urbain discontinu", QColor( 255, 0, 0 ) ) + +Strickler_table_1.Set( u"Cours et voies d'eau", 1.0511 ) +Strickler_table_1.SetAttrValue( u"Cours et voies d'eau", "511" ) +Strickler_table_1.SetColor( u"Cours et voies d'eau", QColor( 0, 204, 242 ) ) + +Strickler_table_1.Set( u"Oliveraies", 1.0223 ) +Strickler_table_1.SetAttrValue( u"Oliveraies", "223" ) +Strickler_table_1.SetColor( u"Oliveraies", QColor( 230, 166, 0 ) ) + +Strickler_table_1.Set( u"Vignobles", 1.0221 ) +Strickler_table_1.SetAttrValue( u"Vignobles", "221" ) +Strickler_table_1.SetColor( u"Vignobles", QColor( 230, 128, 0 ) ) + +Strickler_table_1.Set( u"Rizières", 1.0213 ) +Strickler_table_1.SetAttrValue( u"Rizières", "213" ) +Strickler_table_1.SetColor( u"Rizières", QColor( 230, 230, 0 ) ) + +Strickler_table_1.Set( u"Zones portuaires", 1.0123 ) +Strickler_table_1.SetAttrValue( u"Zones portuaires", "123" ) +Strickler_table_1.SetColor( u"Zones portuaires", QColor( 230, 204, 204 ) ) + +Strickler_table_1.Set( u"Zones industrielles ou commerciales et installations publiques", 1.0121 ) +Strickler_table_1.SetAttrValue( u"Zones industrielles ou commerciales et installations publiques", "121" ) +Strickler_table_1.SetColor( u"Zones industrielles ou commerciales et installations publiques", QColor( 204, 77, 242 ) ) + +Strickler_table_1.Set( u"Marais salants", 1.0422 ) +Strickler_table_1.SetAttrValue( u"Marais salants", "422" ) +Strickler_table_1.SetColor( u"Marais salants", QColor( 230, 230, 255 ) ) + +Strickler_table_1.Set( u"Marais intérieurs", 1.0411 ) +Strickler_table_1.SetAttrValue( u"Marais intérieurs", "411" ) +Strickler_table_1.SetColor( u"Marais intérieurs", QColor( 166, 166, 255 ) ) + +Strickler_table_1.Set( u"Espaces verts urbains", 1.0141 ) +Strickler_table_1.SetAttrValue( u"Espaces verts urbains", "141" ) +Strickler_table_1.SetColor( u"Espaces verts urbains", QColor( 255, 166, 255 ) ) + +Strickler_table_1.Set( u"Lagunes littorales", 1.0521 ) +Strickler_table_1.SetAttrValue( u"Lagunes littorales", "521" ) +Strickler_table_1.SetColor( u"Lagunes littorales", QColor( 0, 255, 166 ) ) + +Strickler_table_1.Set( u"Roches nues", 1.0332 ) +Strickler_table_1.SetAttrValue( u"Roches nues", "332" ) +Strickler_table_1.SetColor( u"Roches nues", QColor( 204, 204, 204 ) ) + +Strickler_table_1.Set( u"Terres arables hors périmètres d'irrigation", 1.0211 ) +Strickler_table_1.SetAttrValue( u"Terres arables hors périmètres d'irrigation", "211" ) +Strickler_table_1.SetColor( u"Terres arables hors périmètres d'irrigation", QColor( 255, 255, 168 ) ) + +Strickler_table_1.Set( u"Zones intertidales", 1.0423 ) +Strickler_table_1.SetAttrValue( u"Zones intertidales", "423" ) +Strickler_table_1.SetColor( u"Zones intertidales", QColor( 166, 166, 230 ) ) + + +Strickler_table_1.Update() + +garonne = hydro_doc.CreateObject( KIND_POLYLINEXY ) +garonne.SetName( "garonne" ) + +garonne.SetZLevel( 2 ) + +garonne.AddSection( "Section_1", 1, 1 ) +garonne.AddPoint( 0, gp_XY( 38191.48, 33184.55 ) ) +garonne.AddPoint( 0, gp_XY( 38553.78, 33013.53 ) ) +garonne.AddPoint( 0, gp_XY( 38993.90, 32767.64 ) ) +garonne.AddPoint( 0, gp_XY( 39678.58, 32533.58 ) ) +garonne.AddPoint( 0, gp_XY( 40240.26, 32305.27 ) ) +garonne.AddPoint( 0, gp_XY( 40717.94, 32193.70 ) ) +garonne.AddPoint( 0, gp_XY( 41361.00, 32464.18 ) ) +garonne.AddPoint( 0, gp_XY( 41831.41, 32626.69 ) ) +garonne.AddPoint( 0, gp_XY( 41950.14, 32618.24 ) ) +garonne.AddPoint( 0, gp_XY( 42524.97, 32419.61 ) ) +garonne.AddPoint( 0, gp_XY( 42616.62, 32385.32 ) ) +garonne.AddPoint( 0, gp_XY( 42693.37, 32357.54 ) ) +garonne.AddPoint( 0, gp_XY( 42779.45, 32327.87 ) ) +garonne.AddPoint( 0, gp_XY( 42909.80, 32291.33 ) ) +garonne.AddPoint( 0, gp_XY( 43177.03, 32269.95 ) ) +garonne.AddPoint( 0, gp_XY( 43465.65, 32344.78 ) ) +garonne.AddPoint( 0, gp_XY( 43754.27, 32152.37 ) ) +garonne.AddPoint( 0, gp_XY( 44128.40, 31842.37 ) ) +garonne.AddPoint( 0, gp_XY( 44003.90, 31269.93 ) ) +garonne.AddPoint( 0, gp_XY( 44010.82, 30869.63 ) ) +garonne.AddPoint( 0, gp_XY( 44064.26, 30655.84 ) ) +garonne.AddPoint( 0, gp_XY( 44434.73, 30366.18 ) ) +garonne.AddPoint( 0, gp_XY( 45208.04, 30484.81 ) ) +garonne.AddPoint( 0, gp_XY( 45705.01, 30287.34 ) ) +garonne.AddPoint( 0, gp_XY( 45933.89, 30046.87 ) ) +garonne.AddPoint( 0, gp_XY( 46127.34, 29490.68 ) ) +garonne.AddPoint( 0, gp_XY( 46111.60, 29226.08 ) ) +garonne.AddPoint( 0, gp_XY( 46228.62, 28784.05 ) ) +garonne.AddPoint( 0, gp_XY( 46247.64, 28449.75 ) ) +garonne.AddPoint( 0, gp_XY( 46108.48, 28086.94 ) ) +garonne.AddPoint( 0, gp_XY( 45618.52, 27553.74 ) ) +garonne.AddPoint( 0, gp_XY( 45276.77, 27042.78 ) ) +garonne.AddPoint( 0, gp_XY( 45001.89, 26273.15 ) ) +garonne.AddPoint( 0, gp_XY( 45167.76, 25975.34 ) ) +garonne.AddPoint( 0, gp_XY( 46018.15, 25848.84 ) ) +garonne.AddPoint( 0, gp_XY( 46378.94, 25872.21 ) ) +garonne.AddPoint( 0, gp_XY( 46885.57, 25937.64 ) ) +garonne.AddPoint( 0, gp_XY( 47278.36, 25782.88 ) ) +garonne.AddPoint( 0, gp_XY( 47153.86, 25728.04 ) ) +garonne.AddPoint( 0, gp_XY( 46987.51, 25749.97 ) ) +garonne.AddPoint( 0, gp_XY( 46658.26, 25715.71 ) ) +garonne.AddPoint( 0, gp_XY( 45650.76, 25634.46 ) ) +garonne.AddPoint( 0, gp_XY( 45122.63, 25748.21 ) ) +garonne.AddPoint( 0, gp_XY( 44797.63, 26325.09 ) ) +garonne.AddPoint( 0, gp_XY( 45114.51, 27168.75 ) ) +garonne.AddPoint( 0, gp_XY( 45508.28, 27713.21 ) ) +garonne.AddPoint( 0, gp_XY( 45994.19, 28382.53 ) ) +garonne.AddPoint( 0, gp_XY( 45927.01, 29201.34 ) ) +garonne.AddPoint( 0, gp_XY( 45756.39, 29859.47 ) ) +garonne.AddPoint( 0, gp_XY( 45390.76, 30151.97 ) ) +garonne.AddPoint( 0, gp_XY( 45039.85, 30120.84 ) ) +garonne.AddPoint( 0, gp_XY( 44513.26, 30084.28 ) ) +garonne.AddPoint( 0, gp_XY( 43923.42, 30426.28 ) ) +garonne.AddPoint( 0, gp_XY( 43768.81, 30934.29 ) ) +garonne.AddPoint( 0, gp_XY( 43820.10, 31425.20 ) ) +garonne.AddPoint( 0, gp_XY( 43854.78, 31801.12 ) ) +garonne.AddPoint( 0, gp_XY( 43479.64, 32053.54 ) ) +garonne.AddPoint( 0, gp_XY( 42923.47, 32051.85 ) ) +garonne.AddPoint( 0, gp_XY( 42695.92, 32118.36 ) ) +garonne.AddPoint( 0, gp_XY( 42610.32, 32148.41 ) ) +garonne.AddPoint( 0, gp_XY( 42532.63, 32175.19 ) ) +garonne.AddPoint( 0, gp_XY( 42493.64, 32187.97 ) ) +garonne.AddPoint( 0, gp_XY( 42074.27, 32302.91 ) ) +garonne.AddPoint( 0, gp_XY( 41624.75, 32330.93 ) ) +garonne.AddPoint( 0, gp_XY( 41325.93, 32187.97 ) ) +garonne.AddPoint( 0, gp_XY( 40879.52, 31987.29 ) ) +garonne.AddPoint( 0, gp_XY( 40308.78, 32018.46 ) ) +garonne.AddPoint( 0, gp_XY( 39782.86, 32207.17 ) ) +garonne.AddPoint( 0, gp_XY( 38814.10, 32560.43 ) ) +garonne.AddPoint( 0, gp_XY( 38302.17, 32903.70 ) ) + +garonne.Update() + + +domaine = hydro_doc.CreateObject( KIND_POLYLINEXY ) +domaine.SetName( "domaine" ) + +domaine.SetZLevel( 3 ) + +domaine.AddSection( "Section_1", 0, 1 ) +domaine.AddPoint( 0, gp_XY( 39901.15, 34762.30 ) ) +domaine.AddPoint( 0, gp_XY( 38086.50, 29964.69 ) ) +domaine.AddPoint( 0, gp_XY( 44835.83, 24264.97 ) ) +domaine.AddPoint( 0, gp_XY( 46758.56, 25021.86 ) ) +domaine.AddPoint( 0, gp_XY( 46757.20, 26601.21 ) ) +domaine.AddPoint( 0, gp_XY( 48566.45, 30152.81 ) ) +domaine.AddPoint( 0, gp_XY( 45532.36, 33239.83 ) ) +domaine.AddPoint( 0, gp_XY( 43548.77, 34048.39 ) ) + +domaine.Update() + + +lit_majeur = hydro_doc.CreateObject( KIND_POLYLINEXY ) +lit_majeur.SetName( "lit_majeur" ) + +lit_majeur.SetZLevel( 7 ) + +lit_majeur.AddSection( "Section_1", 1, 1 ) +lit_majeur.AddPoint( 0, gp_XY( 41225.22, 34118.46 ) ) +lit_majeur.AddPoint( 0, gp_XY( 41716.41, 33705.87 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42384.43, 33293.27 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42561.26, 32684.19 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42875.62, 32369.83 ) ) +lit_majeur.AddPoint( 0, gp_XY( 43700.82, 32350.18 ) ) +lit_majeur.AddPoint( 0, gp_XY( 44526.02, 31662.51 ) ) +lit_majeur.AddPoint( 0, gp_XY( 45370.87, 31819.69 ) ) +lit_majeur.AddPoint( 0, gp_XY( 46274.66, 31682.16 ) ) +lit_majeur.AddPoint( 0, gp_XY( 46981.97, 31328.50 ) ) +lit_majeur.AddPoint( 0, gp_XY( 47021.27, 30719.43 ) ) +lit_majeur.AddPoint( 0, gp_XY( 47217.74, 30051.41 ) ) +lit_majeur.AddPoint( 0, gp_XY( 47846.46, 29560.22 ) ) +lit_majeur.AddPoint( 0, gp_XY( 48730.61, 28735.02 ) ) +lit_majeur.AddPoint( 0, gp_XY( 48809.20, 27732.99 ) ) +lit_majeur.AddPoint( 0, gp_XY( 49143.21, 27163.21 ) ) +lit_majeur.AddPoint( 0, gp_XY( 49654.05, 26829.20 ) ) +lit_majeur.AddPoint( 0, gp_XY( 49693.34, 25355.63 ) ) +lit_majeur.AddPoint( 0, gp_XY( 48612.72, 23214.04 ) ) +lit_majeur.AddPoint( 0, gp_XY( 47453.51, 23115.80 ) ) +lit_majeur.AddPoint( 0, gp_XY( 46471.13, 24176.77 ) ) +lit_majeur.AddPoint( 0, gp_XY( 45960.29, 25257.39 ) ) +lit_majeur.AddPoint( 0, gp_XY( 44899.32, 25591.40 ) ) +lit_majeur.AddPoint( 0, gp_XY( 44270.60, 26573.78 ) ) +lit_majeur.AddPoint( 0, gp_XY( 43248.92, 27909.82 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42757.73, 28243.83 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42266.54, 28342.07 ) ) +lit_majeur.AddPoint( 0, gp_XY( 41736.06, 28106.30 ) ) +lit_majeur.AddPoint( 0, gp_XY( 41402.05, 28833.26 ) ) +lit_majeur.AddPoint( 0, gp_XY( 40910.86, 28911.85 ) ) +lit_majeur.AddPoint( 0, gp_XY( 40576.85, 29324.45 ) ) +lit_majeur.AddPoint( 0, gp_XY( 40144.60, 29599.51 ) ) +lit_majeur.AddPoint( 0, gp_XY( 39024.69, 30130.00 ) ) +lit_majeur.AddPoint( 0, gp_XY( 38612.09, 30365.77 ) ) +lit_majeur.AddPoint( 0, gp_XY( 38828.21, 33391.50 ) ) + +lit_majeur.Update() + + +zonePont = hydro_doc.CreateObject( KIND_POLYLINEXY ) +zonePont.SetName( "zonePont" ) + +zonePont.SetZLevel( 8 ) + +zonePont.AddSection( "Section_1", 0, 1 ) +zonePont.AddPoint( 0, gp_XY( 42665.99, 32409.30 ) ) +zonePont.AddPoint( 0, gp_XY( 42550.53, 32102.00 ) ) +zonePont.AddPoint( 0, gp_XY( 42634.02, 32078.91 ) ) +zonePont.AddPoint( 0, gp_XY( 42760.14, 32375.55 ) ) + +zonePont.Update() + + +pilesPont = hydro_doc.CreateObject( KIND_POLYLINEXY ) +pilesPont.SetName( "pilesPont" ) + +pilesPont.SetZLevel( 9 ) + +pilesPont.AddSection( "pile_1", 0, 1 ) +pilesPont.AddPoint( 0, gp_XY( 42682.74, 32343.21 ) ) +pilesPont.AddPoint( 0, gp_XY( 42707.79, 32333.28 ) ) +pilesPont.AddPoint( 0, gp_XY( 42702.98, 32321.41 ) ) +pilesPont.AddPoint( 0, gp_XY( 42678.02, 32331.39 ) ) +pilesPont.AddSection( "ple_2", 0, 1 ) +pilesPont.AddPoint( 1, gp_XY( 42661.48, 32289.81 ) ) +pilesPont.AddPoint( 1, gp_XY( 42656.20, 32278.41 ) ) +pilesPont.AddPoint( 1, gp_XY( 42680.85, 32266.59 ) ) +pilesPont.AddPoint( 1, gp_XY( 42685.58, 32278.46 ) ) +pilesPont.AddSection( "pile_3", 0, 1 ) +pilesPont.AddPoint( 2, gp_XY( 42636.43, 32232.62 ) ) +pilesPont.AddPoint( 2, gp_XY( 42662.90, 32221.76 ) ) +pilesPont.AddPoint( 2, gp_XY( 42658.07, 32209.53 ) ) +pilesPont.AddPoint( 2, gp_XY( 42631.35, 32220.39 ) ) +pilesPont.AddSection( "pile_4", 0, 1 ) +pilesPont.AddPoint( 3, gp_XY( 42618.95, 32182.53 ) ) +pilesPont.AddPoint( 3, gp_XY( 42643.52, 32171.19 ) ) +pilesPont.AddPoint( 3, gp_XY( 42638.37, 32159.06 ) ) +pilesPont.AddPoint( 3, gp_XY( 42612.99, 32170.62 ) ) + +pilesPont.Update() + + +Polyline_1 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +Polyline_1.SetName( "Polyline_1" ) + +Polyline_1.SetZLevel( 25 ) + +Polyline_1.AddSection( "Section_1", 0, 0 ) +Polyline_1.AddPoint( 0, gp_XY( 42541.98, 32295.56 ) ) +Polyline_1.AddPoint( 0, gp_XY( 42827.09, 32211.82 ) ) + +Polyline_1.Update() + + +pontEtPiles_7 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +pontEtPiles_7.SetName( "pontEtPiles_7" ) + +pontEtPiles_7.SetZLevel( 29 ) + +pontEtPiles_7.AddSection( "Section_1", 0, 0 ) +pontEtPiles_7.AddPoint( 0, gp_XY( 42682.74, 32343.21 ) ) +pontEtPiles_7.AddPoint( 0, gp_XY( 42707.79, 32333.28 ) ) +pontEtPiles_7.AddPoint( 0, gp_XY( 42702.98, 32321.41 ) ) +pontEtPiles_7.AddPoint( 0, gp_XY( 42678.02, 32331.39 ) ) +pontEtPiles_7.AddPoint( 0, gp_XY( 42682.74, 32343.21 ) ) + +pontEtPiles_7.Update() + + +pontEtPiles_8 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +pontEtPiles_8.SetName( "pontEtPiles_8" ) + +pontEtPiles_8.SetZLevel( 28 ) + +pontEtPiles_8.AddSection( "Section_1", 0, 0 ) +pontEtPiles_8.AddPoint( 0, gp_XY( 42661.48, 32289.81 ) ) +pontEtPiles_8.AddPoint( 0, gp_XY( 42656.20, 32278.41 ) ) +pontEtPiles_8.AddPoint( 0, gp_XY( 42680.85, 32266.59 ) ) +pontEtPiles_8.AddPoint( 0, gp_XY( 42685.58, 32278.46 ) ) +pontEtPiles_8.AddPoint( 0, gp_XY( 42661.48, 32289.81 ) ) + +pontEtPiles_8.Update() + + +pontEtPiles_9 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +pontEtPiles_9.SetName( "pontEtPiles_9" ) + +pontEtPiles_9.SetZLevel( 27 ) + +pontEtPiles_9.AddSection( "Section_1", 0, 0 ) +pontEtPiles_9.AddPoint( 0, gp_XY( 42636.43, 32232.62 ) ) +pontEtPiles_9.AddPoint( 0, gp_XY( 42662.90, 32221.76 ) ) +pontEtPiles_9.AddPoint( 0, gp_XY( 42658.07, 32209.53 ) ) +pontEtPiles_9.AddPoint( 0, gp_XY( 42631.35, 32220.39 ) ) +pontEtPiles_9.AddPoint( 0, gp_XY( 42636.43, 32232.62 ) ) + +pontEtPiles_9.Update() + + +pontEtPiles_10 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +pontEtPiles_10.SetName( "pontEtPiles_10" ) + +pontEtPiles_10.SetZLevel( 26 ) + +pontEtPiles_10.AddSection( "Section_1", 0, 0 ) +pontEtPiles_10.AddPoint( 0, gp_XY( 42618.95, 32182.53 ) ) +pontEtPiles_10.AddPoint( 0, gp_XY( 42643.52, 32171.19 ) ) +pontEtPiles_10.AddPoint( 0, gp_XY( 42638.37, 32159.06 ) ) +pontEtPiles_10.AddPoint( 0, gp_XY( 42612.99, 32170.62 ) ) +pontEtPiles_10.AddPoint( 0, gp_XY( 42618.95, 32182.53 ) ) + +pontEtPiles_10.Update() + + +garonne_2 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +garonne_2.SetName( "garonne_2" ) + +garonne_2.SetZLevel( 37 ) + +garonne_2.AddSection( "Section_1", 1, 0 ) +garonne_2.AddPoint( 0, gp_XY( 42652.10, 32372.34 ) ) +garonne_2.AddPoint( 0, gp_XY( 42693.37, 32357.54 ) ) +garonne_2.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) ) + +garonne_2.Update() + + +garonne_3 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +garonne_3.SetName( "garonne_3" ) + +garonne_3.SetZLevel( 36 ) + +garonne_3.AddSection( "Section_1", 1, 0 ) +garonne_3.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) ) +garonne_3.AddPoint( 0, gp_XY( 42779.45, 32327.87 ) ) +garonne_3.AddPoint( 0, gp_XY( 42909.80, 32291.33 ) ) +garonne_3.AddPoint( 0, gp_XY( 43177.03, 32269.95 ) ) +garonne_3.AddPoint( 0, gp_XY( 43465.65, 32344.78 ) ) +garonne_3.AddPoint( 0, gp_XY( 43754.27, 32152.37 ) ) +garonne_3.AddPoint( 0, gp_XY( 44128.40, 31842.37 ) ) +garonne_3.AddPoint( 0, gp_XY( 44003.90, 31269.93 ) ) +garonne_3.AddPoint( 0, gp_XY( 44010.82, 30869.63 ) ) +garonne_3.AddPoint( 0, gp_XY( 44064.26, 30655.84 ) ) +garonne_3.AddPoint( 0, gp_XY( 44434.73, 30366.18 ) ) +garonne_3.AddPoint( 0, gp_XY( 45208.04, 30484.81 ) ) +garonne_3.AddPoint( 0, gp_XY( 45705.01, 30287.34 ) ) +garonne_3.AddPoint( 0, gp_XY( 45933.89, 30046.87 ) ) +garonne_3.AddPoint( 0, gp_XY( 46127.34, 29490.68 ) ) +garonne_3.AddPoint( 0, gp_XY( 46111.60, 29226.08 ) ) +garonne_3.AddPoint( 0, gp_XY( 46228.62, 28784.05 ) ) +garonne_3.AddPoint( 0, gp_XY( 46247.64, 28449.75 ) ) +garonne_3.AddPoint( 0, gp_XY( 46108.48, 28086.94 ) ) +garonne_3.AddPoint( 0, gp_XY( 45618.52, 27553.74 ) ) +garonne_3.AddPoint( 0, gp_XY( 45276.77, 27042.78 ) ) +garonne_3.AddPoint( 0, gp_XY( 45001.89, 26273.15 ) ) +garonne_3.AddPoint( 0, gp_XY( 45167.76, 25975.34 ) ) +garonne_3.AddPoint( 0, gp_XY( 46018.15, 25848.84 ) ) +garonne_3.AddPoint( 0, gp_XY( 46378.94, 25872.21 ) ) +garonne_3.AddPoint( 0, gp_XY( 46885.57, 25937.64 ) ) +garonne_3.AddPoint( 0, gp_XY( 47278.36, 25782.88 ) ) +garonne_3.AddPoint( 0, gp_XY( 47153.86, 25728.04 ) ) +garonne_3.AddPoint( 0, gp_XY( 46987.51, 25749.97 ) ) +garonne_3.AddPoint( 0, gp_XY( 46658.26, 25715.71 ) ) +garonne_3.AddPoint( 0, gp_XY( 45650.76, 25634.46 ) ) +garonne_3.AddPoint( 0, gp_XY( 45122.63, 25748.21 ) ) +garonne_3.AddPoint( 0, gp_XY( 44797.63, 26325.09 ) ) +garonne_3.AddPoint( 0, gp_XY( 45114.51, 27168.75 ) ) +garonne_3.AddPoint( 0, gp_XY( 45508.28, 27713.21 ) ) +garonne_3.AddPoint( 0, gp_XY( 45994.19, 28382.53 ) ) +garonne_3.AddPoint( 0, gp_XY( 45927.01, 29201.34 ) ) +garonne_3.AddPoint( 0, gp_XY( 45756.39, 29859.47 ) ) +garonne_3.AddPoint( 0, gp_XY( 45390.76, 30151.97 ) ) +garonne_3.AddPoint( 0, gp_XY( 45039.85, 30120.84 ) ) +garonne_3.AddPoint( 0, gp_XY( 44513.26, 30084.28 ) ) +garonne_3.AddPoint( 0, gp_XY( 43923.42, 30426.28 ) ) +garonne_3.AddPoint( 0, gp_XY( 43768.81, 30934.29 ) ) +garonne_3.AddPoint( 0, gp_XY( 43820.10, 31425.20 ) ) +garonne_3.AddPoint( 0, gp_XY( 43854.78, 31801.12 ) ) +garonne_3.AddPoint( 0, gp_XY( 43479.64, 32053.54 ) ) +garonne_3.AddPoint( 0, gp_XY( 42923.47, 32051.85 ) ) +garonne_3.AddPoint( 0, gp_XY( 42695.92, 32118.36 ) ) +garonne_3.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) ) + +garonne_3.Update() + + +garonne_4 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +garonne_4.SetName( "garonne_4" ) + +garonne_4.SetZLevel( 35 ) + +garonne_4.AddSection( "Section_1", 1, 0 ) +garonne_4.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) ) +garonne_4.AddPoint( 0, gp_XY( 42610.32, 32148.41 ) ) +garonne_4.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) ) + +garonne_4.Update() + + +garonne_5 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +garonne_5.SetName( "garonne_5" ) + +garonne_5.SetZLevel( 34 ) + +garonne_5.AddSection( "Section_1", 1, 0 ) +garonne_5.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) ) +garonne_5.AddPoint( 0, gp_XY( 42532.63, 32175.19 ) ) +garonne_5.AddPoint( 0, gp_XY( 42493.64, 32187.97 ) ) +garonne_5.AddPoint( 0, gp_XY( 42074.27, 32302.91 ) ) +garonne_5.AddPoint( 0, gp_XY( 41624.75, 32330.93 ) ) +garonne_5.AddPoint( 0, gp_XY( 41325.93, 32187.97 ) ) +garonne_5.AddPoint( 0, gp_XY( 40879.52, 31987.29 ) ) +garonne_5.AddPoint( 0, gp_XY( 40308.78, 32018.46 ) ) +garonne_5.AddPoint( 0, gp_XY( 39782.86, 32207.17 ) ) +garonne_5.AddPoint( 0, gp_XY( 38814.10, 32560.43 ) ) +garonne_5.AddPoint( 0, gp_XY( 38302.17, 32903.70 ) ) +garonne_5.AddPoint( 0, gp_XY( 38191.48, 33184.55 ) ) +garonne_5.AddSection( "Section_2", 1, 0 ) +garonne_5.AddPoint( 1, gp_XY( 38191.48, 33184.55 ) ) +garonne_5.AddPoint( 1, gp_XY( 38553.78, 33013.53 ) ) +garonne_5.AddPoint( 1, gp_XY( 38993.90, 32767.64 ) ) +garonne_5.AddPoint( 1, gp_XY( 39678.58, 32533.58 ) ) +garonne_5.AddPoint( 1, gp_XY( 40240.26, 32305.27 ) ) +garonne_5.AddPoint( 1, gp_XY( 40717.94, 32193.70 ) ) +garonne_5.AddPoint( 1, gp_XY( 41361.00, 32464.18 ) ) +garonne_5.AddPoint( 1, gp_XY( 41831.41, 32626.69 ) ) +garonne_5.AddPoint( 1, gp_XY( 41950.14, 32618.24 ) ) +garonne_5.AddPoint( 1, gp_XY( 42524.97, 32419.61 ) ) +garonne_5.AddPoint( 1, gp_XY( 42616.62, 32385.32 ) ) +garonne_5.AddPoint( 1, gp_XY( 42652.10, 32372.34 ) ) + +garonne_5.Update() + + +zonePont_1 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +zonePont_1.SetName( "zonePont_1" ) + +zonePont_1.SetZLevel( 33 ) + +zonePont_1.AddSection( "Section_1", 0, 0 ) +zonePont_1.AddPoint( 0, gp_XY( 42652.10, 32372.34 ) ) +zonePont_1.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) ) + +zonePont_1.Update() + + +zonePont_2 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +zonePont_2.SetName( "zonePont_2" ) + +zonePont_2.SetZLevel( 32 ) + +zonePont_2.AddSection( "Section_1", 0, 0 ) +zonePont_2.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) ) +zonePont_2.AddPoint( 0, gp_XY( 42550.53, 32102.00 ) ) +zonePont_2.AddPoint( 0, gp_XY( 42634.02, 32078.91 ) ) +zonePont_2.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) ) + +zonePont_2.Update() + + +zonePont_3 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +zonePont_3.SetName( "zonePont_3" ) + +zonePont_3.SetZLevel( 31 ) + +zonePont_3.AddSection( "Section_1", 0, 0 ) +zonePont_3.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) ) +zonePont_3.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) ) + +zonePont_3.Update() + + +zonePont_4 = hydro_doc.CreateObject( KIND_POLYLINEXY ) +zonePont_4.SetName( "zonePont_4" ) + +zonePont_4.SetZLevel( 30 ) + +zonePont_4.AddSection( "Section_1", 0, 0 ) +zonePont_4.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) ) +zonePont_4.AddPoint( 0, gp_XY( 42760.14, 32375.55 ) ) +zonePont_4.AddPoint( 0, gp_XY( 42665.99, 32409.30 ) ) +zonePont_4.AddPoint( 0, gp_XY( 42652.10, 32372.34 ) ) + +zonePont_4.Update() + + +litMineurPont = hydro_doc.CreateObject( KIND_POLYLINEXY ) +litMineurPont.SetName( "litMineurPont" ) + +litMineurPont.AddSection( "Section_1_1", 1, 0 ) +litMineurPont.AddPoint( 0, gp_XY( 42652.10, 32372.34 ) ) +litMineurPont.AddPoint( 0, gp_XY( 42693.37, 32357.54 ) ) +litMineurPont.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) ) +litMineurPont.AddSection( "Section_1_2", 1, 0 ) +litMineurPont.AddPoint( 1, gp_XY( 42656.54, 32131.87 ) ) +litMineurPont.AddPoint( 1, gp_XY( 42610.32, 32148.41 ) ) +litMineurPont.AddPoint( 1, gp_XY( 42572.86, 32161.44 ) ) +litMineurPont.AddSection( "Section_1_3", 0, 0 ) +litMineurPont.AddPoint( 2, gp_XY( 42652.10, 32372.34 ) ) +litMineurPont.AddPoint( 2, gp_XY( 42572.86, 32161.44 ) ) +litMineurPont.AddSection( "Section_1_4", 0, 0 ) +litMineurPont.AddPoint( 3, gp_XY( 42656.54, 32131.87 ) ) +litMineurPont.AddPoint( 3, gp_XY( 42744.75, 32339.36 ) ) + +litMineurPont.Update() + + +litMineurAval = hydro_doc.CreateObject( KIND_POLYLINEXY ) +litMineurAval.SetName( "litMineurAval" ) + +litMineurAval.AddSection( "Section_1_1", 1, 0 ) +litMineurAval.AddPoint( 0, gp_XY( 42572.86, 32161.44 ) ) +litMineurAval.AddPoint( 0, gp_XY( 42532.63, 32175.19 ) ) +litMineurAval.AddPoint( 0, gp_XY( 42493.64, 32187.97 ) ) +litMineurAval.AddPoint( 0, gp_XY( 42074.27, 32302.91 ) ) +litMineurAval.AddPoint( 0, gp_XY( 41624.75, 32330.93 ) ) +litMineurAval.AddPoint( 0, gp_XY( 41325.93, 32187.97 ) ) +litMineurAval.AddPoint( 0, gp_XY( 40879.52, 31987.29 ) ) +litMineurAval.AddPoint( 0, gp_XY( 40308.78, 32018.46 ) ) +litMineurAval.AddPoint( 0, gp_XY( 39782.86, 32207.17 ) ) +litMineurAval.AddPoint( 0, gp_XY( 38814.10, 32560.43 ) ) +litMineurAval.AddPoint( 0, gp_XY( 38302.17, 32903.70 ) ) +litMineurAval.AddPoint( 0, gp_XY( 38191.48, 33184.55 ) ) +litMineurAval.AddSection( "Section_2_1", 1, 0 ) +litMineurAval.AddPoint( 1, gp_XY( 38191.48, 33184.55 ) ) +litMineurAval.AddPoint( 1, gp_XY( 38553.78, 33013.53 ) ) +litMineurAval.AddPoint( 1, gp_XY( 38993.90, 32767.64 ) ) +litMineurAval.AddPoint( 1, gp_XY( 39678.58, 32533.58 ) ) +litMineurAval.AddPoint( 1, gp_XY( 40240.26, 32305.27 ) ) +litMineurAval.AddPoint( 1, gp_XY( 40717.94, 32193.70 ) ) +litMineurAval.AddPoint( 1, gp_XY( 41361.00, 32464.18 ) ) +litMineurAval.AddPoint( 1, gp_XY( 41831.41, 32626.69 ) ) +litMineurAval.AddPoint( 1, gp_XY( 41950.14, 32618.24 ) ) +litMineurAval.AddPoint( 1, gp_XY( 42524.97, 32419.61 ) ) +litMineurAval.AddPoint( 1, gp_XY( 42616.62, 32385.32 ) ) +litMineurAval.AddPoint( 1, gp_XY( 42652.10, 32372.34 ) ) +litMineurAval.AddSection( "Section_1_2", 0, 0 ) +litMineurAval.AddPoint( 2, gp_XY( 42652.10, 32372.34 ) ) +litMineurAval.AddPoint( 2, gp_XY( 42572.86, 32161.44 ) ) + +litMineurAval.Update() + + +litMineurAmont = hydro_doc.CreateObject( KIND_POLYLINEXY ) +litMineurAmont.SetName( "litMineurAmont" ) + +litMineurAmont.AddSection( "Section_1_1", 1, 0 ) +litMineurAmont.AddPoint( 0, gp_XY( 42744.75, 32339.36 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 42779.45, 32327.87 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 42909.80, 32291.33 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 43177.03, 32269.95 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 43465.65, 32344.78 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 43754.27, 32152.37 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 44128.40, 31842.37 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 44003.90, 31269.93 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 44010.82, 30869.63 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 44064.26, 30655.84 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 44434.73, 30366.18 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45208.04, 30484.81 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45705.01, 30287.34 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45933.89, 30046.87 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46127.34, 29490.68 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46111.60, 29226.08 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46228.62, 28784.05 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46247.64, 28449.75 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46108.48, 28086.94 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45618.52, 27553.74 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45276.77, 27042.78 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45001.89, 26273.15 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45167.76, 25975.34 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46018.15, 25848.84 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46378.94, 25872.21 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46885.57, 25937.64 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 47278.36, 25782.88 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 47153.86, 25728.04 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46987.51, 25749.97 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 46658.26, 25715.71 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45650.76, 25634.46 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45122.63, 25748.21 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 44797.63, 26325.09 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45114.51, 27168.75 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45508.28, 27713.21 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45994.19, 28382.53 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45927.01, 29201.34 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45756.39, 29859.47 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45390.76, 30151.97 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 45039.85, 30120.84 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 44513.26, 30084.28 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 43923.42, 30426.28 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 43768.81, 30934.29 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 43820.10, 31425.20 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 43854.78, 31801.12 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 43479.64, 32053.54 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 42923.47, 32051.85 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 42695.92, 32118.36 ) ) +litMineurAmont.AddPoint( 0, gp_XY( 42656.54, 32131.87 ) ) +litMineurAmont.AddSection( "Section_1_2", 0, 0 ) +litMineurAmont.AddPoint( 1, gp_XY( 42656.54, 32131.87 ) ) +litMineurAmont.AddPoint( 1, gp_XY( 42744.75, 32339.36 ) ) + +litMineurAmont.Update() + + +Cloud_02 = hydro_doc.CreateObject( KIND_BATHYMETRY ) +Cloud_02.SetName( "Cloud_02" ) + +Cloud_02.SetAltitudesInverted( 0 ) +if not(Cloud_02.ImportFromFile( os.path.join(HYDRO_SAMPLES, "Cloud_02.xyz" ))): + raise ValueError('problem while loading bathymetry') + +Cloud_02.Update() + + +garonne_point_L93 = hydro_doc.CreateObject( KIND_BATHYMETRY ) +garonne_point_L93.SetName( "garonne_point_L93" ) + +garonne_point_L93.SetAltitudesInverted( 0 ) +if not(garonne_point_L93.ImportFromFile( os.path.join(HYDRO_SAMPLES, "garonne_point_L93.xyz" ))): + raise ValueError('problem while loading bathymetry') + +garonne_point_L93.Update() + + +litMajeur = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +litMajeur.SetName( "litMajeur" ) + +litMajeur.SetZLevel( 5 ) + +litMajeur.SetFillingColor( QColor( 0, 170, 127, 255 ) ) + +litMajeur.SetAltitudeObject( Cloud_02 ) +litMajeur.SetPolyline( lit_majeur ) + +litMajeur.Update() + + +domaineEtendu = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +domaineEtendu.SetName( "domaineEtendu" ) + +domaineEtendu.SetZLevel( 4 ) + +domaineEtendu.SetFillingColor( QColor( 201, 203, 55, 255 ) ) + +domaineEtendu.SetAltitudeObject( Cloud_02 ) +domaineEtendu.SetPolyline( domaine ) + +domaineEtendu.Update() + + +litMineur_aval = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +litMineur_aval.SetName( "litMineur_aval" ) + +litMineur_aval.SetZLevel( 38 ) + +litMineur_aval.SetFillingColor( QColor( 255, 255, 0, 255 ) ) + +litMineur_aval.SetAltitudeObject( garonne_point_L93 ) +litMineur_aval.SetPolyline( litMineurAval ) + +litMineur_aval.Update() + + +litMineur_pont = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +litMineur_pont.SetName( "litMineur_pont" ) + +litMineur_pont.SetZLevel( 39 ) + +litMineur_pont.SetFillingColor( QColor( 170, 255, 255, 255 ) ) + +litMineur_pont.SetAltitudeObject( garonne_point_L93 ) +litMineur_pont.SetPolyline( litMineurPont ) + +litMineur_pont.Update() + + +litMineur_amont = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +litMineur_amont.SetName( "litMineur_amont" ) + +litMineur_amont.SetZLevel( 40 ) + +litMineur_amont.SetFillingColor( QColor( 170, 255, 127, 255 ) ) + +litMineur_amont.SetAltitudeObject( garonne_point_L93 ) +litMineur_amont.SetPolyline( litMineurAmont ) + +litMineur_amont.Update() + + +pile1 = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +pile1.SetName( "pile1" ) + +pile1.SetZLevel( 41 ) + +pile1.SetPolyline( pontEtPiles_7 ) +pile1.SetIsSubmersible(False) + +pile1.Update() + + +pile2 = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +pile2.SetName( "pile2" ) + +pile2.SetZLevel( 42 ) + +pile2.SetPolyline( pontEtPiles_8 ) +pile2.SetIsSubmersible(False) + +pile2.Update() + + +pile3 = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +pile3.SetName( "pile3" ) + +pile3.SetZLevel( 43 ) + +pile3.SetPolyline( pontEtPiles_9 ) +pile3.SetIsSubmersible(False) + +pile3.Update() + + +pile4 = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +pile4.SetName( "pile4" ) + +pile4.SetZLevel( 44 ) + +pile4.SetPolyline( pontEtPiles_10 ) +pile4.SetIsSubmersible(False) + +pile4.Update() + + +# Calculation case +casGaronne_1 = hydro_doc.CreateObject( KIND_CALCULATION ) +casGaronne_1.SetName( "casGaronne_1" ) + +casGaronne_1.SetAssignmentMode( HYDROData_CalculationCase.MANUAL ) +casGaronne_1.AddGeometryObject( domaineEtendu ) +casGaronne_1.AddGeometryObject( litMajeur ) +casGaronne_1.AddGeometryObject( litMineur_amont ) +casGaronne_1.AddGeometryObject( litMineur_aval ) +casGaronne_1.AddGeometryObject( litMineur_pont ) +casGaronne_1.AddGeometryObject( pile1 ) +casGaronne_1.AddGeometryObject( pile2 ) +casGaronne_1.AddGeometryObject( pile3 ) +casGaronne_1.AddGeometryObject( pile4 ) + +case_geom_group = domaineEtendu.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = litMajeur.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = litMineur_amont.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = litMineur_aval.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = litMineur_pont.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = pile1.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = pile2.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = pile3.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = pile4.GetGroup( 0 ) +casGaronne_1.AddGeometryGroup( case_geom_group ) +casGaronne_1.SetBoundaryPolyline( domaine ) + +# Start the algorithm of the partition and assignment +casGaronne_1.Update() +casGaronne_1_riveDroite = hydro_doc.FindObjectByName( "casGaronne_1_Reg_1" ) +casGaronne_1_Zone_1 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_1" ) +casGaronne_1_riveDroite.AddZone( casGaronne_1_Zone_1 ) +casGaronne_1_Zone_2 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_2" ) +casGaronne_1_riveDroite.AddZone( casGaronne_1_Zone_2 ) +casGaronne_1_aval = hydro_doc.FindObjectByName( "casGaronne_1_Reg_2" ) +casGaronne_1_Zone_3 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_3" ) +casGaronne_1_Zone_3.SetMergeType( HYDROData_Zone.Merge_Object ) +garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" ) +casGaronne_1_Zone_3.SetMergeObject( garonne_point_L93 ) +casGaronne_1_aval.AddZone( casGaronne_1_Zone_3 ) +casGaronne_1_riveGauche = hydro_doc.FindObjectByName( "casGaronne_1_Reg_3" ) +casGaronne_1_Zone_4 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_4" ) +casGaronne_1_riveGauche.AddZone( casGaronne_1_Zone_4 ) +casGaronne_1_Zone_6 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_6" ) +casGaronne_1_riveGauche.AddZone( casGaronne_1_Zone_6 ) +casGaronne_1_pont = hydro_doc.FindObjectByName( "casGaronne_1_Reg_4" ) +casGaronne_1_Zone_5 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_5" ) +casGaronne_1_Zone_5.SetMergeType( HYDROData_Zone.Merge_Object ) +garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" ) +casGaronne_1_Zone_5.SetMergeObject( garonne_point_L93 ) +casGaronne_1_pont.AddZone( casGaronne_1_Zone_5 ) +casGaronne_1_amont = hydro_doc.FindObjectByName( "casGaronne_1_Reg_5" ) +casGaronne_1_Zone_7 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_7" ) +casGaronne_1_Zone_7.SetMergeType( HYDROData_Zone.Merge_Object ) +garonne_point_L93 = hydro_doc.FindObjectByName( "garonne_point_L93" ) +casGaronne_1_Zone_7.SetMergeObject( garonne_point_L93 ) +casGaronne_1_amont.AddZone( casGaronne_1_Zone_7 ) +casGaronne_1_pile1 = hydro_doc.FindObjectByName( "casGaronne_1_Reg_6" ) +casGaronne_1_Zone_8 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_8" ) +casGaronne_1_Zone_8.SetMergeType( HYDROData_Zone.Merge_ZMAX ) +casGaronne_1_pile1.AddZone( casGaronne_1_Zone_8 ) +casGaronne_1_pile2 = hydro_doc.FindObjectByName( "casGaronne_1_Reg_7" ) +casGaronne_1_Zone_9 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_9" ) +casGaronne_1_Zone_9.SetMergeType( HYDROData_Zone.Merge_ZMAX ) +casGaronne_1_pile2.AddZone( casGaronne_1_Zone_9 ) +casGaronne_1_pile3 = hydro_doc.FindObjectByName( "casGaronne_1_Reg_8" ) +casGaronne_1_Zone_10 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_10" ) +casGaronne_1_Zone_10.SetMergeType( HYDROData_Zone.Merge_ZMAX ) +casGaronne_1_pile3.AddZone( casGaronne_1_Zone_10 ) +casGaronne_1_pile4 = hydro_doc.FindObjectByName( "casGaronne_1_Reg_9" ) +casGaronne_1_Zone_11 = hydro_doc.FindObjectByName( "casGaronne_1_Zone_11" ) +casGaronne_1_Zone_11.SetMergeType( HYDROData_Zone.Merge_ZMAX ) +casGaronne_1_pile4.AddZone( casGaronne_1_Zone_11 ) +casGaronne_1_riveDroite.SetName( "casGaronne_1_riveDroite" ) +casGaronne_1_aval.SetName( "casGaronne_1_aval" ) +casGaronne_1_riveGauche.SetName( "casGaronne_1_riveGauche" ) +casGaronne_1_pont.SetName( "casGaronne_1_pont" ) +casGaronne_1_amont.SetName( "casGaronne_1_amont" ) +casGaronne_1_pile1.SetName( "casGaronne_1_pile1" ) +casGaronne_1_pile2.SetName( "casGaronne_1_pile2" ) +casGaronne_1_pile3.SetName( "casGaronne_1_pile3" ) +casGaronne_1_pile4.SetName( "casGaronne_1_pile4" ) + +# Export of the calculation case +casGaronne_1_entry = casGaronne_1.Export( theStudy._get_StudyId() ) + +# Get geometry shape and print debug information +import GEOM +print "Entry:", casGaronne_1_entry +HYDRO_casGaronne_1 = salome.IDToObject( str( casGaronne_1_entry ) ) +print "Geom shape:", HYDRO_casGaronne_1 +print "Geom shape name:", HYDRO_casGaronne_1.GetName() + + +### +### GEOM component +### + +import GEOM +from salome.geom import geomBuilder +import math +import SALOMEDS +from salome.hydrotools.controls import controlGeomProps + +geompy = geomBuilder.New(theStudy) + +casGaronne_1_pile3_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(casGaronne_1_pile3_Outer, [68, 70, 66, 63]) +casGaronne_1_pile1_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(casGaronne_1_pile1_Outer, [77, 79, 75, 72]) +casGaronne_1_pile2_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(casGaronne_1_pile2_Outer, [57, 54, 59, 61]) +casGaronne_1_pile4_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(casGaronne_1_pile4_Outer, [84, 81, 86, 88]) +casGaronne_1_litMineur_amont_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(casGaronne_1_litMineur_amont_Outer, [21, 39]) +casGaronne_1_litMineur_aval_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(casGaronne_1_litMineur_aval_Outer, [17, 30]) +casGaronne_1_litMineur_pont_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(casGaronne_1_litMineur_pont_Outer, [52, 32, 19, 37]) +casGaronne_1_domaineEtendu_Outer = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(casGaronne_1_domaineEtendu_Outer, [28, 91, 13, 4, 7, 9, 11, 15, 23, 25, 35, 43, 41, 49, 47, 45]) +geomObj_1 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(geomObj_1, [52, 32, 19, 37]) +geomObj_2 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(geomObj_2, [57, 54, 59, 61]) +geomObj_3 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(geomObj_3, [21, 39]) +geomObj_4 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(geomObj_4, [17, 30]) +geomObj_5 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(geomObj_5, [77, 79, 75, 72]) +geomObj_6 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(geomObj_6, [84, 81, 86, 88]) +geomObj_7 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(geomObj_7, [28, 91, 13, 4, 7, 9, 11, 15, 23, 25, 35, 43, 41, 49, 47, 45]) +geomObj_8 = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(geomObj_8, [68, 70, 66, 63]) +riveDroite = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"]) +geompy.UnionIDs(riveDroite, [2]) +riveGauche = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"]) +geompy.UnionIDs(riveGauche, [33]) +litMineur_aval = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"]) +geompy.UnionIDs(litMineur_aval, [26]) +litMineur_pont = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"]) +geompy.UnionIDs(litMineur_pont, [50]) +litMineur_amont = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["FACE"]) +geompy.UnionIDs(litMineur_amont, [89]) +sections = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(sections, [32, 91, 28, 52]) +amont = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(amont, [91]) +aval = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(aval, [28]) +bordDroit = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(bordDroit, [4, 7, 25, 9, 15, 23, 13, 11]) +bordGauche = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(bordGauche, [43, 45, 49, 47, 41, 35]) +piles = geompy.CreateGroup(HYDRO_casGaronne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(piles, [57, 75, 88, 68, 63, 59, 54, 77, 61, 86, 81, 66, 84, 72, 70, 79]) +geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_pile3_Outer, 'casGaronne_1_pile3_Outer' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_pile1_Outer, 'casGaronne_1_pile1_Outer' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_pile2_Outer, 'casGaronne_1_pile2_Outer' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_pile4_Outer, 'casGaronne_1_pile4_Outer' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_litMineur_amont_Outer, 'casGaronne_1_litMineur_amont_Outer' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_litMineur_aval_Outer, 'casGaronne_1_litMineur_aval_Outer' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_litMineur_pont_Outer, 'casGaronne_1_litMineur_pont_Outer' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, casGaronne_1_domaineEtendu_Outer, 'casGaronne_1_domaineEtendu_Outer' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, riveDroite, 'riveDroite' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, riveGauche, 'riveGauche' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, litMineur_aval, 'litMineur_aval' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, litMineur_pont, 'litMineur_pont' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, litMineur_amont, 'litMineur_amont' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, sections, 'sections' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, amont, 'amont' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, aval, 'aval' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, bordDroit, 'bordDroit' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, bordGauche, 'bordGauche' ) +geompy.addToStudyInFather( HYDRO_casGaronne_1, piles, 'piles' ) + +# --- basic properties control: edges length, surfaces +controlGeomProps(geompy, riveGauche, 29149.1353799, 35949580.6716) +controlGeomProps(geompy, litMineur_aval, 7965.23431497, 935955.786347) +controlGeomProps(geompy, litMineur_pont, 961.8255222, 19618.016847) +controlGeomProps(geompy, litMineur_amont, 22635.6212065, 2531409.65041) +controlGeomProps(geompy, riveDroite, 32012.2241814, 25998085.6892) + +### +### SMESH component +### + +import SMESH, SALOMEDS +from salome.smesh import smeshBuilder +from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats + +smesh = smeshBuilder.New(theStudy) +casGaronne_1 = smesh.Mesh(HYDRO_casGaronne_1) +NETGEN_2D = casGaronne_1.Triangle(algo=smeshBuilder.NETGEN_1D2D) +NETGEN_2D_Parameters_1 = NETGEN_2D.Parameters() +NETGEN_2D_Parameters_1.SetMaxSize( 200 ) +NETGEN_2D_Parameters_1.SetSecondOrder( 0 ) +NETGEN_2D_Parameters_1.SetOptimize( 1 ) +NETGEN_2D_Parameters_1.SetFineness( 4 ) +NETGEN_2D_Parameters_1.SetMinSize( 50 ) +NETGEN_2D_Parameters_1.SetUseSurfaceCurvature( 1 ) +NETGEN_2D_Parameters_1.SetFuseEdges( 1 ) +NETGEN_2D_Parameters_1.SetQuadAllowed( 0 ) +Regular_1D = casGaronne_1.Segment(geom=litMineur_aval) +litMineur_aval_1 = Regular_1D.GetSubMesh() +nbseg_litMineur_aval = Regular_1D.NumberOfSegments(100) +QuadFromMedialAxis_1D2D = casGaronne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=litMineur_aval) +nbseg_litMineur_amont = smesh.CreateHypothesis('NumberOfSegments') +nbseg_litMineur_amont.SetNumberOfSegments( 150 ) +Regular_1D_1 = casGaronne_1.Segment(geom=litMineur_amont) +litMineur_amont_1 = Regular_1D_1.GetSubMesh() +nbSeg_litMineur_amont = Regular_1D_1.NumberOfSegments(150) +QuadFromMedialAxis_1D2D_1 = casGaronne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=litMineur_amont) +Regular_1D_2 = casGaronne_1.Segment(geom=sections) +sections_1 = Regular_1D_2.GetSubMesh() +nbseg_sections = Regular_1D_2.NumberOfSegments(10) +isDone = casGaronne_1.SetMeshOrder( [ [ sections_1, litMineur_aval_1, litMineur_amont_1 ] ]) +NETGEN_2D_1 = casGaronne_1.Triangle(algo=smeshBuilder.NETGEN_1D2D,geom=litMineur_pont) +litMineur_pont_1 = NETGEN_2D_1.GetSubMesh() +NETGEN_2D_Parameters_2 = NETGEN_2D_1.Parameters() +NETGEN_2D_Parameters_2.SetMaxSize( 50 ) +NETGEN_2D_Parameters_2.SetSecondOrder( 0 ) +NETGEN_2D_Parameters_2.SetOptimize( 1 ) +NETGEN_2D_Parameters_2.SetFineness( 3 ) +NETGEN_2D_Parameters_2.SetMinSize( 10 ) +NETGEN_2D_Parameters_2.SetUseSurfaceCurvature( 1 ) +NETGEN_2D_Parameters_2.SetFuseEdges( 1 ) +NETGEN_2D_Parameters_2.SetQuadAllowed( 0 ) +isDone = casGaronne_1.SetMeshOrder( [ [ sections_1, litMineur_aval_1, litMineur_amont_1, litMineur_pont_1 ] ]) +isDone = casGaronne_1.Compute() +isDone = casGaronne_1.SplitQuadObject( casGaronne_1, 1 ) + + +riveDroite_1 = casGaronne_1.GroupOnGeom(riveDroite,'riveDroite',SMESH.FACE) +riveGauche_1 = casGaronne_1.GroupOnGeom(riveGauche,'riveGauche',SMESH.FACE) +litMineur_aval_2 = casGaronne_1.GroupOnGeom(litMineur_aval,'litMineur_aval',SMESH.FACE) +litMineur_pont_2 = casGaronne_1.GroupOnGeom(litMineur_pont,'litMineur_pont',SMESH.FACE) +litMineur_amont_2 = casGaronne_1.GroupOnGeom(litMineur_amont,'litMineur_amont',SMESH.FACE) +riveDroite_2 = casGaronne_1.GroupOnGeom(riveDroite,'riveDroite',SMESH.NODE) +riveGauche_2 = casGaronne_1.GroupOnGeom(riveGauche,'riveGauche',SMESH.NODE) +litMineur_aval_3 = casGaronne_1.GroupOnGeom(litMineur_aval,'litMineur_aval',SMESH.NODE) +litMineur_pont_3 = casGaronne_1.GroupOnGeom(litMineur_pont,'litMineur_pont',SMESH.NODE) +litMineur_amont_3 = casGaronne_1.GroupOnGeom(litMineur_amont,'litMineur_amont',SMESH.NODE) +sections_2 = casGaronne_1.GroupOnGeom(sections,'sections',SMESH.EDGE) +amont_1 = casGaronne_1.GroupOnGeom(amont,'amont',SMESH.EDGE) +aval_1 = casGaronne_1.GroupOnGeom(aval,'aval',SMESH.EDGE) +bordDroit_1 = casGaronne_1.GroupOnGeom(bordDroit,'bordDroit',SMESH.EDGE) +bordGauche_1 = casGaronne_1.GroupOnGeom(bordGauche,'bordGauche',SMESH.EDGE) +piles_1 = casGaronne_1.GroupOnGeom(piles,'piles',SMESH.EDGE) +sections_3 = casGaronne_1.GroupOnGeom(sections,'sections',SMESH.NODE) +amont_2 = casGaronne_1.GroupOnGeom(amont,'amont',SMESH.NODE) +aval_2 = casGaronne_1.GroupOnGeom(aval,'aval',SMESH.NODE) +bordDroit_2 = casGaronne_1.GroupOnGeom(bordDroit,'bordDroit',SMESH.NODE) +bordGauche_2 = casGaronne_1.GroupOnGeom(bordGauche,'bordGauche',SMESH.NODE) +piles_2 = casGaronne_1.GroupOnGeom(piles,'piles',SMESH.NODE) + +## Set names of Mesh objects +smesh.SetName(QuadFromMedialAxis_1D2D.GetAlgorithm(), 'QuadFromMedialAxis_1D2D') +smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') +smesh.SetName(NETGEN_2D.GetAlgorithm(), 'NETGEN_2D') +smesh.SetName(casGaronne_1.GetMesh(), 'casGaronne_1') +smesh.SetName(litMineur_pont_1, 'litMineur_pont') +smesh.SetName(litMineur_amont_1, 'litMineur_amont') +smesh.SetName(litMineur_aval_1, 'litMineur_aval') +smesh.SetName(nbSeg_litMineur_amont, 'nbSeg_litMineur_amont') +smesh.SetName(nbseg_sections, 'nbseg_sections') +smesh.SetName(NETGEN_2D_Parameters_2, 'NETGEN 2D Parameters_2') +smesh.SetName(NETGEN_2D_Parameters_1, 'NETGEN 2D Parameters_1') +smesh.SetName(nbseg_litMineur_aval, 'nbseg_litMineur_aval') +smesh.SetName(nbseg_litMineur_amont, 'nbseg_litMineur_amont') +smesh.SetName(sections_1, 'sections') + +casGaronne_1.SetAutoColor( 1 ) +casGaronne_1.ExportMED( r'/tmp/casGaronne_1.med', 0, SMESH.MED_V2_2, 1, None ,1) + +controlMeshStats(casGaronne_1, 6985, 745, 13761) +controlSubMeshStats(litMineur_pont_2, 185) +controlSubMeshStats(litMineur_amont_2, 3000) +controlSubMeshStats(litMineur_aval_2, 2000) +controlSubMeshStats(riveDroite_1, 3941) +controlSubMeshStats(riveGauche_1, 4635) + + +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser(1) -- 2.39.2