from PyQt5.QtCore import *
from PyQt5.QtGui import *
-hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
+hydro_doc = HYDROData_Document.Document()
hydro_doc.SetLocalCS( 430000.000, 6350000.000 )
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( "Pelouses et pâturages naturels", 1.0321 )
+Strickler_table_1.SetAttrValue( "Pelouses et pâturages naturels", "321" )
+Strickler_table_1.SetColor( "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( "Aéroports", 1.0124 )
+Strickler_table_1.SetAttrValue( "Aéroports", "124" )
+Strickler_table_1.SetColor( "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( "Systèmes culturaux et parcellaires complexes", 1.0242 )
+Strickler_table_1.SetAttrValue( "Systèmes culturaux et parcellaires complexes", "242" )
+Strickler_table_1.SetColor( "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( "Cultures annuelles associées à des cultures permanentes", 1.0241 )
+Strickler_table_1.SetAttrValue( "Cultures annuelles associées à des cultures permanentes", "241" )
+Strickler_table_1.SetColor( "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( "Forêt et végétation arbustive en mutation", 1.0324 )
+Strickler_table_1.SetAttrValue( "Forêt et végétation arbustive en mutation", "324" )
+Strickler_table_1.SetColor( "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( "Décharges", 1.0132 )
+Strickler_table_1.SetAttrValue( "Décharges", "132" )
+Strickler_table_1.SetColor( "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( "Végétation clairsemée", 1.0333 )
+Strickler_table_1.SetAttrValue( "Végétation clairsemée", "333" )
+Strickler_table_1.SetColor( "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( "Prairies et autres surfaces toujours en herbe à usage agricole", 1.0231 )
+Strickler_table_1.SetAttrValue( "Prairies et autres surfaces toujours en herbe à usage agricole", "231" )
+Strickler_table_1.SetColor( "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( "Périmètres irrigués en permanence", 1.0212 )
+Strickler_table_1.SetAttrValue( "Périmètres irrigués en permanence", "212" )
+Strickler_table_1.SetColor( "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( "Plans d'eau", 1.0512 )
+Strickler_table_1.SetAttrValue( "Plans d'eau", "512" )
+Strickler_table_1.SetColor( "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( "Territoires agroforestiers", 1.0244 )
+Strickler_table_1.SetAttrValue( "Territoires agroforestiers", "244" )
+Strickler_table_1.SetColor( "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( "Forêts mélangées", 1.0313 )
+Strickler_table_1.SetAttrValue( "Forêts mélangées", "313" )
+Strickler_table_1.SetColor( "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( "Glaciers et neiges éternelles", 1.0335 )
+Strickler_table_1.SetAttrValue( "Glaciers et neiges éternelles", "335" )
+Strickler_table_1.SetColor( "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( "Plages, dunes et sable", 1.0331 )
+Strickler_table_1.SetAttrValue( "Plages, dunes et sable", "331" )
+Strickler_table_1.SetColor( "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( "Zones incendiées", 1.0334 )
+Strickler_table_1.SetAttrValue( "Zones incendiées", "334" )
+Strickler_table_1.SetColor( "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( "Tissu urbain continu", 1.0111 )
+Strickler_table_1.SetAttrValue( "Tissu urbain continu", "111" )
+Strickler_table_1.SetColor( "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( "Chantiers", 1.0133 )
+Strickler_table_1.SetAttrValue( "Chantiers", "133" )
+Strickler_table_1.SetColor( "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( "Estuaires", 1.0522 )
+Strickler_table_1.SetAttrValue( "Estuaires", "522" )
+Strickler_table_1.SetColor( "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( "Marais maritimes", 1.0421 )
+Strickler_table_1.SetAttrValue( "Marais maritimes", "421" )
+Strickler_table_1.SetColor( "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( "Forêts de conifères", 1.0312 )
+Strickler_table_1.SetAttrValue( "Forêts de conifères", "312" )
+Strickler_table_1.SetColor( "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( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", 1.0243 )
+Strickler_table_1.SetAttrValue( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", "243" )
+Strickler_table_1.SetColor( "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( "Tourbières", 1.0412 )
+Strickler_table_1.SetAttrValue( "Tourbières", "412" )
+Strickler_table_1.SetColor( "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( "Extraction de matériaux", 1.0131 )
+Strickler_table_1.SetAttrValue( "Extraction de matériaux", "131" )
+Strickler_table_1.SetColor( "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( "Réseaux routier et ferroviaire et espaces associés", 1.0122 )
+Strickler_table_1.SetAttrValue( "Réseaux routier et ferroviaire et espaces associés", "122" )
+Strickler_table_1.SetColor( "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( "Mers et océans", 1.0523 )
+Strickler_table_1.SetAttrValue( "Mers et océans", "523" )
+Strickler_table_1.SetColor( "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( "Equipements sportifs et de loisirs", 1.0142 )
+Strickler_table_1.SetAttrValue( "Equipements sportifs et de loisirs", "142" )
+Strickler_table_1.SetColor( "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( "Forêts de feuillus", 1.0311 )
+Strickler_table_1.SetAttrValue( "Forêts de feuillus", "311" )
+Strickler_table_1.SetColor( "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( "Vergers et petits fruits", 1.0222 )
+Strickler_table_1.SetAttrValue( "Vergers et petits fruits", "222" )
+Strickler_table_1.SetColor( "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( "Végétation sclérophylle", 1.0323 )
+Strickler_table_1.SetAttrValue( "Végétation sclérophylle", "323" )
+Strickler_table_1.SetColor( "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( "Landes et broussailles", 1.0322 )
+Strickler_table_1.SetAttrValue( "Landes et broussailles", "322" )
+Strickler_table_1.SetColor( "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( "Tissu urbain discontinu", 1.0112 )
+Strickler_table_1.SetAttrValue( "Tissu urbain discontinu", "112" )
+Strickler_table_1.SetColor( "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( "Cours et voies d'eau", 1.0511 )
+Strickler_table_1.SetAttrValue( "Cours et voies d'eau", "511" )
+Strickler_table_1.SetColor( "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( "Oliveraies", 1.0223 )
+Strickler_table_1.SetAttrValue( "Oliveraies", "223" )
+Strickler_table_1.SetColor( "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( "Vignobles", 1.0221 )
+Strickler_table_1.SetAttrValue( "Vignobles", "221" )
+Strickler_table_1.SetColor( "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( "Rizières", 1.0213 )
+Strickler_table_1.SetAttrValue( "Rizières", "213" )
+Strickler_table_1.SetColor( "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( "Zones portuaires", 1.0123 )
+Strickler_table_1.SetAttrValue( "Zones portuaires", "123" )
+Strickler_table_1.SetColor( "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( "Zones industrielles ou commerciales et installations publiques", 1.0121 )
+Strickler_table_1.SetAttrValue( "Zones industrielles ou commerciales et installations publiques", "121" )
+Strickler_table_1.SetColor( "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( "Marais salants", 1.0422 )
+Strickler_table_1.SetAttrValue( "Marais salants", "422" )
+Strickler_table_1.SetColor( "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( "Marais intérieurs", 1.0411 )
+Strickler_table_1.SetAttrValue( "Marais intérieurs", "411" )
+Strickler_table_1.SetColor( "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( "Espaces verts urbains", 1.0141 )
+Strickler_table_1.SetAttrValue( "Espaces verts urbains", "141" )
+Strickler_table_1.SetColor( "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( "Lagunes littorales", 1.0521 )
+Strickler_table_1.SetAttrValue( "Lagunes littorales", "521" )
+Strickler_table_1.SetColor( "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( "Roches nues", 1.0332 )
+Strickler_table_1.SetAttrValue( "Roches nues", "332" )
+Strickler_table_1.SetColor( "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( "Terres arables hors périmètres d'irrigation", 1.0211 )
+Strickler_table_1.SetAttrValue( "Terres arables hors périmètres d'irrigation", "211" )
+Strickler_table_1.SetColor( "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.Set( "Zones intertidales", 1.0423 )
+Strickler_table_1.SetAttrValue( "Zones intertidales", "423" )
+Strickler_table_1.SetColor( "Zones intertidales", QColor( 166, 166, 230 ) )
Strickler_table_1.Update()
garonne_1_pile4.SetName( "garonne_1_pile4" )
# Export of the calculation case
-garonne_1_entry = garonne_1.Export( theStudy._get_StudyId() )
+garonne_1_entry = garonne_1.Export()
# Get geometry shape and print debug information
import GEOM
-print "Entry:", garonne_1_entry
+print("Entry:", garonne_1_entry)
HYDRO_garonne_1 = salome.IDToObject( str( garonne_1_entry ) )
-print "Geom shape:", HYDRO_garonne_1
-print "Geom shape name:", HYDRO_garonne_1.GetName()
+print("Geom shape:", HYDRO_garonne_1)
+print("Geom shape name:", HYDRO_garonne_1.GetName())
###
import SALOMEDS
from salome.hydrotools.controls import controlGeomProps
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
[garonne_riveDroite,garonne_aval,garonne_riveGauche,garonne_pont,garonne_amont] = geompy.SubShapeAll(HYDRO_garonne_1, geompy.ShapeType["FACE"])
# --- manual identification of all useful edge groups (boundary conditions)
allEdgesIds = geompy.SubShapeAllIDs(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
-print "allEdgesIds", allEdgesIds
+print("allEdgesIds", allEdgesIds)
(isDone, ClosedFreeBoundary, OpenFreeBoundary) = geompy.GetFreeBoundary(HYDRO_garonne_1)
geompy.addToStudyInFather(HYDRO_garonne_1, ClosedFreeBoundary[0], "OuterFreeBoundary")
freeBoundary = geompy.ExtractShapes(ClosedFreeBoundary[0], geompy.ShapeType["EDGE"], True)
freeBoundaryIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, freeBoundary[i]) for i in range(len(freeBoundary)) ]
-print "freeBoundaryIds", freeBoundaryIds
+print("freeBoundaryIds", freeBoundaryIds)
edgesPile1 = geompy.ExtractShapes(ClosedFreeBoundary[1], geompy.ShapeType["EDGE"], True)
edgesPile2 = geompy.ExtractShapes(ClosedFreeBoundary[2], geompy.ShapeType["EDGE"], True)
pilesPont3Ids = [ geompy.GetSubShapeID(HYDRO_garonne_1, edgesPile3[i]) for i in range(len(edgesPile3)) ]
pilesPont4Ids = [ geompy.GetSubShapeID(HYDRO_garonne_1, edgesPile4[i]) for i in range(len(edgesPile4)) ]
pilesPontIds = pilesPont1Ids + pilesPont2Ids + pilesPont3Ids + pilesPont4Ids
-print "pilesPontIds", pilesPontIds
+print("pilesPontIds", pilesPontIds)
[garonne_aval_droite] = geompy.GetSharedShapesMulti([garonne_riveDroite, garonne_aval], geompy.ShapeType["EDGE"], True)
[garonne_aval_gauche] = geompy.GetSharedShapesMulti([garonne_riveGauche, garonne_aval], geompy.ShapeType["EDGE"], True)
geompy.addToStudyInFather(HYDRO_garonne_1, garonne_pont_gauche, "garonne_pont_gauche")
rives = [garonne_aval_droite, garonne_aval_gauche, garonne_amont_droite, garonne_amont_gauche, garonne_pont_droite, garonne_pont_gauche]
rivesIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, rives[i]) for i in range(len(rives)) ]
-print "rivesIds", rivesIds
+print("rivesIds", rivesIds)
edges_garonne_aval = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_aval], geompy.ShapeType["EDGE"], True)
edges_garonne_amont = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_amont], geompy.ShapeType["EDGE"], True)
edges_riveGaucheIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_riveGauche[i]) for i in range(len(edges_riveGauche)) ]
edges_riveDroiteIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_riveDroite[i]) for i in range(len(edges_riveDroite)) ]
-print "edges_garonne_amontIds", edges_garonne_amontIds
-print "edges_garonne_avalIds", edges_garonne_avalIds
-print "edges_garonne_pontIds", edges_garonne_pontIds
-print "edges_riveGaucheIds", edges_riveGaucheIds
-print "edges_riveDroiteIds", edges_riveDroiteIds
+print("edges_garonne_amontIds", edges_garonne_amontIds)
+print("edges_garonne_avalIds", edges_garonne_avalIds)
+print("edges_garonne_pontIds", edges_garonne_pontIds)
+print("edges_riveGaucheIds", edges_riveGaucheIds)
+print("edges_riveDroiteIds", edges_riveDroiteIds)
edges_litMineurIds = edges_garonne_amontIds
for edge in edges_garonne_avalIds:
edges_litMineurIds.append(edge)
sectionsIds = [Id for Id in edges_litMineurIds if Id not in rivesIds]
-print "sectionsIds", sectionsIds
+print("sectionsIds", sectionsIds)
SectionsGaronne = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
geompy.UnionIDs(SectionsGaronne, sectionsIds)
geompy.addToStudyInFather(HYDRO_garonne_1, SectionsGaronne, "SectionsGaronne")
bordGaucheDomaineIds = [Id for Id in freeBoundaryIds if Id in edges_riveGaucheIds]
bordDroiteDomaineIds = [Id for Id in freeBoundaryIds if Id in edges_riveDroiteIds]
-print "bordGaucheDomaineIds", bordGaucheDomaineIds
-print "bordDroiteDomaineIds", bordDroiteDomaineIds
+print("bordGaucheDomaineIds", bordGaucheDomaineIds)
+print("bordDroiteDomaineIds", bordDroiteDomaineIds)
bordGaucheDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
geompy.UnionIDs(bordGaucheDomaine, bordGaucheDomaineIds)
geompy.addToStudyInFather(HYDRO_garonne_1, bordGaucheDomaine, "bordGaucheDomaine")
from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
import tempfile
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
garonne_1 = smesh.Mesh(HYDRO_garonne_1)
NETGEN_1D_2D = garonne_1.Triangle(algo=smeshBuilder.NETGEN_1D2D)
NETGEN_2D_Parameters_1 = NETGEN_1D_2D.Parameters()
garonne_1.SetAutoColor( 1 )
tmpdir = tempfile.mkdtemp()
-print "tmpdir=",tmpdir
+print("tmpdir=",tmpdir)
fichierMaillage = os.path.join(tmpdir, 'garonne_1.med')
garonne_1.ExportMED(fichierMaillage, 0, SMESH.MED_V2_2, 1, None ,1)
controlSubMeshStats(garonne_riveGauche_2, 4635)
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(1)
+ salome.sg.updateObjBrowser()