Salome HOME
Merge branch 'BR_HYDRO_IMPS_2016' of ssh://gitolite3@git.salome-platform.org/modules...
authorasl <asl@opencascade.com>
Wed, 18 Jan 2017 07:30:56 +0000 (10:30 +0300)
committerasl <asl@opencascade.com>
Wed, 18 Jan 2017 07:30:56 +0000 (10:30 +0300)
Conflicts:
src/HYDROData/HYDROData_DTM.cxx
src/HYDROData/HYDROData_DTM.h
src/HYDROPy/HYDROData_Stream.sip

26 files changed:
doc/salome/examples/CMakeLists.txt
doc/salome/examples/h018_streamInterpolation.py [new file with mode: 0644]
doc/salome/examples/profilsStream.sx [new file with mode: 0644]
doc/salome/examples/profilsStream.xyz [new file with mode: 0644]
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_Channel.h
src/HYDROData/HYDROData_DTM.cxx
src/HYDROData/HYDROData_DTM.h
src/HYDROData/HYDROData_GeomTool.cxx
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_PolylineOperator.cxx
src/HYDROData/HYDROData_Stream.cxx
src/HYDROData/HYDROData_Stream.h
src/HYDROGUI/HYDROGUI_ImportLandCoverMapDlg.cxx
src/HYDROGUI/HYDROGUI_ImportLandCoverMapDlg.h
src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx
src/HYDROGUI/HYDROGUI_StreamOp.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts
src/HYDROPy/HYDROData_Stream.sip
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/reference_data/CMakeLists.txt
src/HYDRO_tests/reference_data/Channel.png
src/HYDRO_tests/reference_data/stream_dtm_2d.png
src/HYDRO_tests/reference_data/stream_dtm_3d.png
src/HYDRO_tests/test_HYDROData_CalcCase.cxx
src/HYDRO_tests/test_HYDROData_ShapeFile.cxx

index 5c89302e763cf7bdffe37083f5ca7d0d7bc6a22c..cfd41c73379adbed6f54de3b3267203f3f997f75 100644 (file)
@@ -37,6 +37,7 @@ SET(EXAMPLES_TESTS
   h015_normalCaseManualTelemac.py
   h016_pilesPontManualMesh.py
   h017_interpolationLineaire.py
+  h018_streamInterpolation.py
 )
 
 SET(HYDRO_SAMPLES
@@ -50,6 +51,8 @@ SET(HYDRO_SAMPLES
   garonne_profiles.sx
   garonne_profiles.xyz
   lignedo_lambert93.xyz
+  profilsStream.sx
+  profilsStream.xyz
   lignedo.sx
 )
 
@@ -58,8 +61,9 @@ SET(HYDRO_SAMPLES
 
 # Application tests
 
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/HYDRO)
-INSTALL(FILES ${EXAMPLES_TESTS} ${HYDRO_SAMPLES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
+INSTALL(FILES ${EXAMPLES_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY})
+INSTALL(FILES ${HYDRO_SAMPLES} DESTINATION ${TEST_INSTALL_DIRECTORY}/HYDRO)
 
 INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${TEST_INSTALL_DIRECTORY}
diff --git a/doc/salome/examples/h018_streamInterpolation.py b/doc/salome/examples/h018_streamInterpolation.py
new file mode 100644 (file)
index 0000000..600f51e
--- /dev/null
@@ -0,0 +1,475 @@
+# -*- coding: utf-8 -*-
+
+###
+### This file is generated automatically by SALOME v7.8.0 with dump python functionality
+###
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.NoteBook(theStudy)
+sys.path.insert( 0, r'/local00/home/B27118/projets/salome_hydro/bugs/V780H2016')
+
+###
+### HYDRO component
+###
+
+from HYDROPy import *
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
+
+hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
+
+hydro_doc.SetLocalCS( 0.000, 0.000 )
+
+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()
+
+axe = hydro_doc.CreateObject( KIND_POLYLINEXY )
+axe.SetName( "axe" )
+
+axe.SetZLevel( 0 )
+
+axe.AddSection( "Section_1", 1, 0 )
+axe.AddPoint( 0, gp_XY( 107.09, -10.91 ) )
+axe.AddPoint( 0, gp_XY( 102.60, 39.37 ) )
+axe.AddPoint( 0, gp_XY( 70.28, 83.06 ) )
+axe.AddPoint( 0, gp_XY( 28.39, 106.10 ) )
+axe.AddPoint( 0, gp_XY( -14.11, 109.99 ) )
+
+axe.Update()
+
+
+domain = hydro_doc.CreateObject( KIND_POLYLINEXY )
+domain.SetName( "domain" )
+
+domain.SetZLevel( 3 )
+
+domain.AddSection( "Section_1", 0, 1 )
+domain.AddPoint( 0, gp_XY( 0.46, 0.37 ) )
+domain.AddPoint( 0, gp_XY( 125.71, 0.18 ) )
+domain.AddPoint( 0, gp_XY( 109.60, 112.58 ) )
+domain.AddPoint( 0, gp_XY( 1.03, 123.51 ) )
+
+domain.Update()
+
+
+bathyFlat = hydro_doc.CreateObject( KIND_BATHYMETRY )
+bathyFlat.SetName( "bathyFlat" )
+
+bathyFlat.SetAltitudesInverted( 0 )
+if not(bathyFlat.ImportFromFile( "/local00/home/B27118/projets/salome_hydro/bugs/V780H2016/bathyFlat.xyz" )):
+  raise ValueError('problem while loading bathymetry')
+
+bathyFlat.Update()
+
+profiles = hydro_doc.CreateObject( KIND_PROFILE )
+profiles.SetName( "profiles" )
+badProfilesIds=[]
+isToProject=True
+nbp = profiles.ImportFromFile(hydro_doc, "/local00/home/B27118/projets/salome_hydro/V780H2016/modules/src/HYDRO/doc/salome/examples/profilsStream.xyz", badProfilesIds, isToProject)
+print "nombre profils: " , nbp
+if not(nbp):
+  raise ValueError('problem while loading profiles')
+#profiles.Update()
+
+nomsprofs = ["Profile_%d"%i for i in range(1,nbp+1)]
+seqProfs = hydro_doc.FindObjectsByNames(nomsprofs)
+
+
+plaine = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE )
+plaine.SetName( "plaine" )
+
+plaine.SetZLevel( 1 )
+
+plaine.SetFillingColor( QColor( 185, 171, 101, 255 ) )
+
+plaine.SetAltitudeObject( bathyFlat )
+plaine.SetPolyline( domain )
+
+plaine.Update()
+
+
+Stream_1 = hydro_doc.CreateObject( KIND_STREAM )
+Stream_1.SetName( "Stream_1" )
+
+Stream_1.SetZLevel( 2 )
+
+Stream_1.SetHydraulicAxis( axe )
+for profil in seqProfs:
+  Stream_1.AddProfile(profil)
+
+Stream_1.SetDDZ( 0.200 )
+Stream_1.SetSpatialStep( 0.5 )
+
+Stream_1.Update()
+
+
+# Calculation case
+Case_1 = hydro_doc.CreateObject( KIND_CALCULATION )
+Case_1.SetName( "Case_1" )
+
+Case_1.SetAssignmentMode( HYDROData_CalculationCase.MANUAL )
+Case_1.AddGeometryObject( plaine )
+Case_1.AddGeometryObject( Stream_1 )
+
+case_geom_group = plaine.GetGroup( 0 )
+Case_1.AddGeometryGroup( case_geom_group )
+case_geom_group = Stream_1.GetGroup( 2 )
+Case_1.AddGeometryGroup( case_geom_group )
+case_geom_group = Stream_1.GetGroup( 0 )
+Case_1.AddGeometryGroup( case_geom_group )
+case_geom_group = Stream_1.GetGroup( 3 )
+Case_1.AddGeometryGroup( case_geom_group )
+case_geom_group = Stream_1.GetGroup( 1 )
+Case_1.AddGeometryGroup( case_geom_group )
+Case_1.SetBoundaryPolyline( domain )
+Case_1.SetStricklerTable( Strickler_table_1 )
+
+# Start the algorithm of the partition and assignment
+Case_1.Update()
+riveGauche = hydro_doc.FindObjectByName( "Case_1_Reg_1" )
+Case_1_Zone_1 = hydro_doc.FindObjectByName( "Case_1_Zone_1" )
+Case_1_Zone_1.SetColor( QColor( 156, 192, 64 ))
+riveGauche.AddZone( Case_1_Zone_1 )
+litMineur = hydro_doc.FindObjectByName( "Case_1_Reg_2" )
+Case_1_Zone_2 = hydro_doc.FindObjectByName( "Case_1_Zone_2" )
+Case_1_Zone_2.SetMergeType( HYDROData_Zone.Merge_Object )
+Stream_1_Altitude_1 = hydro_doc.FindObjectByName( "Stream_1_Altitude_1" )
+Case_1_Zone_2.SetMergeObject( Stream_1_Altitude_1 )
+Case_1_Zone_2.SetColor( QColor( 64, 75, 192 ))
+litMineur.AddZone( Case_1_Zone_2 )
+riveDroite = hydro_doc.FindObjectByName( "Case_1_Reg_3" )
+Case_1_Zone_3 = hydro_doc.FindObjectByName( "Case_1_Zone_3" )
+Case_1_Zone_3.SetColor( QColor( 192, 109, 64 ))
+riveDroite.AddZone( Case_1_Zone_3 )
+riveGauche.SetName( "riveGauche" )
+litMineur.SetName( "litMineur" )
+riveDroite.SetName( "riveDroite" )
+
+# Export of the calculation case
+Case_1_entry = Case_1.Export( theStudy._get_StudyId() )
+
+# Get geometry shape and print debug information
+import GEOM
+print "Entry:", Case_1_entry
+HYDRO_Case_1 = salome.IDToObject( str( Case_1_entry ) )
+print "Geom shape:", HYDRO_Case_1
+print "Geom shape name:", HYDRO_Case_1.GetName()
+
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+#geomObj_1 = geompy.RestoreShape("") # the shape string has not been dump for performance reason
+#[geomObj_2,geomObj_3,geomObj_4] = geompy.SubShapeAll(geomObj_1, geompy.ShapeType["FACE"])
+geomObj_5 = geompy.CreateGroup(geomObj_1, geompy.ShapeType["EDGE"])
+geompy.UnionIDs(geomObj_5, [4, 12, 19, 23, 25, 21, 14, 9])
+HYDRO_Case_1 = geompy.RestoreShape("") # the shape string has not been dump for performance reason
+[riveGauche,litMineur,riveDroite] = geompy.SubShapeAll(HYDRO_Case_1, geompy.ShapeType["FACE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["VERTEX"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["VERTEX"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+#listSubShapeIDs = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+Case_1_plaine_Outer = geompy.CreateGroup(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+geompy.UnionIDs(Case_1_plaine_Outer, [4, 12, 19, 23, 25, 21, 14, 9])
+sections = geompy.CreateGroup(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+geompy.UnionIDs(sections, [14, 12])
+geompy.addToStudy( HYDRO_Case_1, 'HYDRO_Case_1' )
+geompy.addToStudyInFather( HYDRO_Case_1, riveGauche, 'riveGauche' )
+geompy.addToStudyInFather( HYDRO_Case_1, litMineur, 'litMineur' )
+geompy.addToStudyInFather( HYDRO_Case_1, riveDroite, 'riveDroite' )
+geompy.addToStudyInFather( HYDRO_Case_1, Case_1_plaine_Outer, 'Case_1_plaine_Outer' )
+geompy.addToStudyInFather( HYDRO_Case_1, sections, 'sections' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+plaine = smesh.Mesh(HYDRO_Case_1)
+NETGEN_2D = plaine.Triangle(algo=smeshBuilder.NETGEN_1D2D)
+NETGEN_2D_Parameters_1 = NETGEN_2D.Parameters()
+NETGEN_2D_Parameters_1.SetMaxSize( 10 )
+NETGEN_2D_Parameters_1.SetSecondOrder( 0 )
+NETGEN_2D_Parameters_1.SetOptimize( 1 )
+NETGEN_2D_Parameters_1.SetFineness( 3 )
+NETGEN_2D_Parameters_1.SetMinSize( 1 )
+NETGEN_2D_Parameters_1.SetUseSurfaceCurvature( 1 )
+NETGEN_2D_Parameters_1.SetFuseEdges( 1 )
+NETGEN_2D_Parameters_1.SetQuadAllowed( 0 )
+Regular_1D = plaine.Segment(geom=litMineur)
+litMineur_1 = Regular_1D.GetSubMesh()
+Local_Length_1 = Regular_1D.LocalLength(3,None,1e-07)
+QuadFromMedialAxis_1D2D = plaine.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=litMineur)
+Regular_1D_1 = plaine.Segment(geom=sections)
+sections_1 = Regular_1D_1.GetSubMesh()
+Nb_Segments_1 = Regular_1D_1.NumberOfSegments(20)
+isDone = plaine.SetMeshOrder( [ [ sections_1, litMineur_1 ] ])
+
+isDone = plaine.Compute()
+isDone = plaine.SplitQuadObject( plaine, 1 )
+
+riveGauche_1 = plaine.GroupOnGeom(riveGauche,'riveGauche',SMESH.FACE)
+litMineur_2 = plaine.GroupOnGeom(litMineur,'litMineur',SMESH.FACE)
+riveDroite_1 = plaine.GroupOnGeom(riveDroite,'riveDroite',SMESH.FACE)
+Case_1_plaine_Outer_1 = plaine.GroupOnGeom(Case_1_plaine_Outer,'Case_1_plaine_Outer',SMESH.EDGE)
+sections_2 = plaine.GroupOnGeom(sections,'sections',SMESH.EDGE)
+riveGauche_2 = plaine.GroupOnGeom(riveGauche,'riveGauche',SMESH.NODE)
+litMineur_3 = plaine.GroupOnGeom(litMineur,'litMineur',SMESH.NODE)
+riveDroite_2 = plaine.GroupOnGeom(riveDroite,'riveDroite',SMESH.NODE)
+Case_1_plaine_Outer_2 = plaine.GroupOnGeom(Case_1_plaine_Outer,'Case_1_plaine_Outer',SMESH.NODE)
+sections_3 = plaine.GroupOnGeom(sections,'sections',SMESH.NODE)
+smesh.SetName(plaine, 'plaine')
+
+try:
+  plaine.ExportMED( r'/local00/home/B27118/projets/salome_hydro/bugs/V780H2016/plaine.med', 0, SMESH.MED_V2_2, 1, None ,1)
+except:
+  print 'ExportToMEDX() failed. Invalid file name?'
+
+#controlMeshStats(plaine, 6190, 691, 12201)
+#controlSubMeshStats(litMineur_2, 2384)
+#controlSubMeshStats(riveDroite_1, 2400)
+#controlSubMeshStats(riveGauche_1, 6585)
+
+#----------------------
+# --- Z interpolation with HYDRO
+#----------------------
+
+from salome.hydrotools.interpolZ import interpolZ, createZfield2
+from salome.hydrotools.controls import controlStatZ
+
+# --- case name in HYDRO
+nomCas = 'Case_1'
+
+# --- med file 2D(x,y) of the case produced by SMESH
+fichierMaillage = med_file
+
+# --- dictionary [med group name] = region name
+dicoGroupeRegion= dict(litMineur  = 'litMineur',
+                       riveDroite = 'riveDroite',
+                       riveGauche = 'riveGauche',
+                       )
+# --- value to use for Z when the node is not in a region (used to detect problems)
+zUndef = 110
+
+# --- Z interpolation on the bathymety/altimetry on the mesh nodes
+statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef)
+refstatz = {'riveDroite': (10.88, 32.47999954), 'riveGauche': (7.72, 71.38999939), 'litMineur': (2.06, 25.41)}
+controlStatZ(statz, refstatz)
+
+# --- add a field on nodes of type double with z values, named "BOTTOM"
+createZfield2(fichierMaillage)
+
+
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/profilsStream.sx b/doc/salome/examples/profilsStream.sx
new file mode 100644 (file)
index 0000000..963c215
--- /dev/null
@@ -0,0 +1,618 @@
+C  Generated by HYDRO Module
+C
+B P
+CN Profile_1
+CP 0 0
+CP 100.000 0.000 120.000 0.000
+CP 2
+ 0.000 0.000 100.000
+ 0.400 0.000 99.000
+ 0.800 0.000 98.000
+ 1.200 0.000 97.000
+ 1.600 0.000 96.000
+ 2.000 0.000 95.000
+ 2.400 0.000 94.000
+ 2.800 0.000 93.000
+ 3.200 0.000 92.000
+ 3.600 0.000 91.000
+ 4.000 0.000 90.000
+ 4.400 0.000 90.250
+ 4.800 0.000 90.500
+ 5.200 0.000 90.750
+ 5.600 0.000 91.000
+ 6.000 0.000 91.250
+ 6.400 0.000 91.500
+ 6.800 0.000 91.750
+ 7.200 0.000 92.000
+ 7.600 0.000 92.250
+ 8.000 0.000 92.500
+ 8.400 0.000 92.750
+ 8.800 0.000 93.000
+ 9.200 0.000 93.250
+ 9.600 0.000 93.500
+ 10.000 0.000 93.750
+ 10.400 0.000 94.000
+ 10.800 0.000 94.250
+ 11.200 0.000 94.500
+ 11.600 0.000 94.750
+ 12.000 0.000 95.000
+ 12.400 0.000 95.250
+ 12.800 0.000 95.500
+ 13.200 0.000 95.750
+ 13.600 0.000 96.000
+ 14.000 0.000 96.250
+ 14.400 0.000 96.500
+ 14.800 0.000 96.750
+ 15.200 0.000 97.000
+ 15.600 0.000 97.250
+ 16.000 0.000 97.500
+ 16.400 0.000 97.750
+ 16.800 0.000 98.000
+ 17.200 0.000 98.250
+ 17.600 0.000 98.500
+ 18.000 0.000 98.750
+ 18.400 0.000 99.000
+ 18.800 0.000 99.250
+ 19.200 0.000 99.500
+ 19.600 0.000 99.750
+ 20.000 0.000 100.000
+B P
+CN Profile_2
+CP 0 0
+CP 98.769 15.643 118.523 18.772
+CP 2
+ 0.000 0.000 100.000
+ 0.400 0.000 99.154
+ 0.800 0.000 98.308
+ 1.200 0.000 97.462
+ 1.600 0.000 96.615
+ 2.000 0.000 95.769
+ 2.400 0.000 94.923
+ 2.799 0.000 94.077
+ 3.199 0.000 93.231
+ 3.600 0.000 92.385
+ 4.000 0.000 91.538
+ 4.400 0.000 90.692
+ 4.800 0.000 89.846
+ 5.200 0.000 89.000
+ 5.600 0.000 89.297
+ 6.000 0.000 89.595
+ 6.400 0.000 89.892
+ 6.800 0.000 90.189
+ 7.200 0.000 90.486
+ 7.600 0.000 90.784
+ 8.000 0.000 91.081
+ 8.399 0.000 91.378
+ 8.799 0.000 91.676
+ 9.200 0.000 91.973
+ 9.600 0.000 92.270
+ 10.000 0.000 92.568
+ 10.400 0.000 92.865
+ 10.800 0.000 93.162
+ 11.200 0.000 93.459
+ 11.600 0.000 93.757
+ 12.000 0.000 94.054
+ 12.400 0.000 94.351
+ 12.800 0.000 94.649
+ 13.200 0.000 94.946
+ 13.600 0.000 95.243
+ 14.000 0.000 95.541
+ 14.400 0.000 95.838
+ 14.800 0.000 96.135
+ 15.200 0.000 96.432
+ 15.600 0.000 96.730
+ 16.000 0.000 97.027
+ 16.400 0.000 97.324
+ 16.800 0.000 97.622
+ 17.200 0.000 97.919
+ 17.600 0.000 98.216
+ 18.000 0.000 98.514
+ 18.400 0.000 98.811
+ 18.799 0.000 99.108
+ 19.199 0.000 99.405
+ 19.600 0.000 99.703
+ 20.000 0.000 100.000
+B P
+CN Profile_3
+CP 0 0
+CP 95.106 30.902 114.127 37.082
+CP 2
+ 0.000 0.000 100.000
+ 0.399 0.000 99.250
+ 0.799 0.000 98.500
+ 1.200 0.000 97.750
+ 1.599 0.000 97.000
+ 2.000 0.000 96.250
+ 2.399 0.000 95.500
+ 2.800 0.000 94.750
+ 3.200 0.000 94.000
+ 3.599 0.000 93.250
+ 4.000 0.000 92.500
+ 4.399 0.000 91.750
+ 4.800 0.000 91.000
+ 5.200 0.000 90.250
+ 5.600 0.000 89.500
+ 6.000 0.000 88.750
+ 6.399 0.000 88.000
+ 6.800 0.000 88.353
+ 7.199 0.000 88.706
+ 7.600 0.000 89.059
+ 8.000 0.000 89.412
+ 8.400 0.000 89.765
+ 8.800 0.000 90.118
+ 9.199 0.000 90.471
+ 9.600 0.000 90.824
+ 9.999 0.000 91.176
+ 10.400 0.000 91.529
+ 10.799 0.000 91.882
+ 11.199 0.000 92.235
+ 11.600 0.000 92.588
+ 11.999 0.000 92.941
+ 12.400 0.000 93.294
+ 12.799 0.000 93.647
+ 13.200 0.000 94.000
+ 13.599 0.000 94.353
+ 13.999 0.000 94.706
+ 14.400 0.000 95.059
+ 14.799 0.000 95.412
+ 15.200 0.000 95.765
+ 15.599 0.000 96.118
+ 16.000 0.000 96.471
+ 16.400 0.000 96.824
+ 16.799 0.000 97.176
+ 17.200 0.000 97.529
+ 17.599 0.000 97.882
+ 18.000 0.000 98.235
+ 18.400 0.000 98.588
+ 18.800 0.000 98.941
+ 19.200 0.000 99.294
+ 19.599 0.000 99.647
+ 20.000 0.000 100.000
+B P
+CN Profile_4
+CP 0 0
+CP 89.101 45.399 106.921 54.479
+CP 2
+ 0.000 0.000 100.000
+ 0.400 0.000 99.316
+ 0.799 0.000 98.632
+ 1.200 0.000 97.947
+ 1.599 0.000 97.263
+ 2.000 0.000 96.579
+ 2.400 0.000 95.895
+ 2.799 0.000 95.211
+ 3.200 0.000 94.526
+ 3.599 0.000 93.842
+ 4.000 0.000 93.158
+ 4.400 0.000 92.474
+ 4.799 0.000 91.789
+ 5.200 0.000 91.105
+ 5.599 0.000 90.421
+ 6.000 0.000 89.737
+ 6.400 0.000 89.053
+ 6.799 0.000 88.368
+ 7.200 0.000 87.684
+ 7.599 0.000 87.000
+ 8.000 0.000 87.419
+ 8.400 0.000 87.839
+ 8.800 0.000 88.258
+ 9.200 0.000 88.677
+ 9.599 0.000 89.097
+ 10.000 0.000 89.516
+ 10.400 0.000 89.935
+ 10.800 0.000 90.355
+ 11.200 0.000 90.774
+ 11.599 0.000 91.194
+ 12.000 0.000 91.613
+ 12.400 0.000 92.032
+ 12.800 0.000 92.452
+ 13.200 0.000 92.871
+ 13.599 0.000 93.290
+ 14.000 0.000 93.710
+ 14.400 0.000 94.129
+ 14.800 0.000 94.548
+ 15.200 0.000 94.968
+ 15.599 0.000 95.387
+ 16.000 0.000 95.806
+ 16.399 0.000 96.226
+ 16.800 0.000 96.645
+ 17.200 0.000 97.065
+ 17.599 0.000 97.484
+ 18.000 0.000 97.903
+ 18.399 0.000 98.323
+ 18.800 0.000 98.742
+ 19.200 0.000 99.161
+ 19.599 0.000 99.581
+ 20.000 0.000 100.000
+B P
+CN Profile_5
+CP 0 0
+CP 80.902 58.779 97.082 70.534
+CP 2
+ 0.000 0.000 100.000
+ 0.399 0.000 99.364
+ 0.800 0.000 98.727
+ 1.200 0.000 98.091
+ 1.599 0.000 97.455
+ 2.000 0.000 96.818
+ 2.399 0.000 96.182
+ 2.799 0.000 95.545
+ 3.200 0.000 94.909
+ 3.600 0.000 94.273
+ 4.000 0.000 93.636
+ 4.399 0.000 93.000
+ 4.800 0.000 92.364
+ 5.200 0.000 91.727
+ 5.599 0.000 91.091
+ 5.999 0.000 90.455
+ 6.399 0.000 89.818
+ 6.799 0.000 89.182
+ 7.200 0.000 88.545
+ 7.599 0.000 87.909
+ 8.000 0.000 87.273
+ 8.399 0.000 86.636
+ 8.799 0.000 86.000
+ 9.200 0.000 86.500
+ 9.599 0.000 87.000
+ 9.999 0.000 87.500
+ 10.399 0.000 88.000
+ 10.800 0.000 88.500
+ 11.200 0.000 89.000
+ 11.599 0.000 89.500
+ 12.000 0.000 90.000
+ 12.400 0.000 90.500
+ 12.799 0.000 91.000
+ 13.200 0.000 91.500
+ 13.599 0.000 92.000
+ 14.000 0.000 92.500
+ 14.400 0.000 93.000
+ 14.800 0.000 93.500
+ 15.200 0.000 94.000
+ 15.599 0.000 94.500
+ 15.999 0.000 95.000
+ 16.400 0.000 95.500
+ 16.799 0.000 96.000
+ 17.199 0.000 96.500
+ 17.599 0.000 97.000
+ 18.000 0.000 97.500
+ 18.400 0.000 98.000
+ 18.799 0.000 98.500
+ 19.200 0.000 99.000
+ 19.599 0.000 99.500
+ 19.999 0.000 100.000
+B P
+CN Profile_6
+CP 0 0
+CP 70.711 70.711 84.853 84.853
+CP 2
+ 0.000 0.000 100.000
+ 0.400 0.000 99.400
+ 0.799 0.000 98.800
+ 1.199 0.000 98.200
+ 1.599 0.000 97.600
+ 2.000 0.000 97.000
+ 2.400 0.000 96.400
+ 2.800 0.000 95.800
+ 3.199 0.000 95.200
+ 3.599 0.000 94.600
+ 3.999 0.000 94.000
+ 4.400 0.000 93.400
+ 4.800 0.000 92.800
+ 5.200 0.000 92.200
+ 5.599 0.000 91.600
+ 5.999 0.000 91.000
+ 6.399 0.000 90.400
+ 6.800 0.000 89.800
+ 7.200 0.000 89.200
+ 7.600 0.000 88.600
+ 8.000 0.000 88.000
+ 8.399 0.000 87.400
+ 8.799 0.000 86.800
+ 9.199 0.000 86.200
+ 9.600 0.000 85.600
+ 10.000 0.000 85.000
+ 10.400 0.000 85.600
+ 10.799 0.000 86.200
+ 11.199 0.000 86.800
+ 11.599 0.000 87.400
+ 12.000 0.000 88.000
+ 12.400 0.000 88.600
+ 12.800 0.000 89.200
+ 13.199 0.000 89.800
+ 13.599 0.000 90.400
+ 13.999 0.000 91.000
+ 14.400 0.000 91.600
+ 14.800 0.000 92.200
+ 15.200 0.000 92.800
+ 15.600 0.000 93.400
+ 15.999 0.000 94.000
+ 16.399 0.000 94.600
+ 16.799 0.000 95.200
+ 17.200 0.000 95.800
+ 17.600 0.000 96.400
+ 18.000 0.000 97.000
+ 18.399 0.000 97.600
+ 18.799 0.000 98.200
+ 19.199 0.000 98.800
+ 19.600 0.000 99.400
+ 20.000 0.000 100.000
+B P
+CN Profile_7
+CP 0 0
+CP 58.779 80.902 70.534 97.082
+CP 2
+ 0.000 0.000 100.000
+ 0.399 0.000 99.429
+ 0.800 0.000 98.857
+ 1.200 0.000 98.286
+ 1.599 0.000 97.714
+ 2.000 0.000 97.143
+ 2.399 0.000 96.571
+ 2.799 0.000 96.000
+ 3.200 0.000 95.429
+ 3.600 0.000 94.857
+ 4.000 0.000 94.286
+ 4.399 0.000 93.714
+ 4.800 0.000 93.143
+ 5.200 0.000 92.571
+ 5.599 0.000 92.000
+ 5.999 0.000 91.429
+ 6.399 0.000 90.857
+ 6.799 0.000 90.286
+ 7.200 0.000 89.714
+ 7.599 0.000 89.143
+ 8.000 0.000 88.571
+ 8.399 0.000 88.000
+ 8.799 0.000 87.429
+ 9.200 0.000 86.857
+ 9.599 0.000 86.286
+ 9.999 0.000 85.714
+ 10.399 0.000 85.143
+ 10.800 0.000 84.571
+ 11.200 0.000 84.000
+ 11.599 0.000 84.727
+ 12.000 0.000 85.455
+ 12.400 0.000 86.182
+ 12.799 0.000 86.909
+ 13.200 0.000 87.636
+ 13.599 0.000 88.364
+ 14.000 0.000 89.091
+ 14.400 0.000 89.818
+ 14.800 0.000 90.545
+ 15.200 0.000 91.273
+ 15.599 0.000 92.000
+ 15.999 0.000 92.727
+ 16.400 0.000 93.455
+ 16.799 0.000 94.182
+ 17.199 0.000 94.909
+ 17.599 0.000 95.636
+ 18.000 0.000 96.364
+ 18.400 0.000 97.091
+ 18.799 0.000 97.818
+ 19.200 0.000 98.545
+ 19.599 0.000 99.273
+ 19.999 0.000 100.000
+B P
+CN Profile_8
+CP 0 0
+CP 45.399 89.101 54.479 106.921
+CP 2
+ 0.000 0.000 100.000
+ 0.400 0.000 99.452
+ 0.799 0.000 98.903
+ 1.200 0.000 98.355
+ 1.599 0.000 97.806
+ 2.000 0.000 97.258
+ 2.400 0.000 96.710
+ 2.799 0.000 96.161
+ 3.200 0.000 95.613
+ 3.599 0.000 95.065
+ 4.000 0.000 94.516
+ 4.400 0.000 93.968
+ 4.799 0.000 93.419
+ 5.200 0.000 92.871
+ 5.599 0.000 92.323
+ 6.000 0.000 91.774
+ 6.400 0.000 91.226
+ 6.799 0.000 90.677
+ 7.200 0.000 90.129
+ 7.599 0.000 89.581
+ 8.000 0.000 89.032
+ 8.400 0.000 88.484
+ 8.800 0.000 87.935
+ 9.200 0.000 87.387
+ 9.599 0.000 86.839
+ 10.000 0.000 86.290
+ 10.400 0.000 85.742
+ 10.800 0.000 85.194
+ 11.200 0.000 84.645
+ 11.599 0.000 84.097
+ 12.000 0.000 83.548
+ 12.400 0.000 83.000
+ 12.800 0.000 83.895
+ 13.200 0.000 84.789
+ 13.599 0.000 85.684
+ 14.000 0.000 86.579
+ 14.400 0.000 87.474
+ 14.800 0.000 88.368
+ 15.200 0.000 89.263
+ 15.599 0.000 90.158
+ 16.000 0.000 91.053
+ 16.399 0.000 91.947
+ 16.800 0.000 92.842
+ 17.200 0.000 93.737
+ 17.599 0.000 94.632
+ 18.000 0.000 95.526
+ 18.399 0.000 96.421
+ 18.800 0.000 97.316
+ 19.200 0.000 98.211
+ 19.599 0.000 99.105
+ 20.000 0.000 100.000
+B P
+CN Profile_9
+CP 0 0
+CP 30.902 95.106 37.082 114.127
+CP 2
+ 0.000 0.000 100.000
+ 0.399 0.000 99.471
+ 0.799 0.000 98.941
+ 1.200 0.000 98.412
+ 1.599 0.000 97.882
+ 2.000 0.000 97.353
+ 2.399 0.000 96.824
+ 2.800 0.000 96.294
+ 3.200 0.000 95.765
+ 3.599 0.000 95.235
+ 4.000 0.000 94.706
+ 4.399 0.000 94.176
+ 4.800 0.000 93.647
+ 5.200 0.000 93.118
+ 5.600 0.000 92.588
+ 6.000 0.000 92.059
+ 6.399 0.000 91.529
+ 6.800 0.000 91.000
+ 7.199 0.000 90.471
+ 7.600 0.000 89.941
+ 8.000 0.000 89.412
+ 8.400 0.000 88.882
+ 8.800 0.000 88.353
+ 9.199 0.000 87.824
+ 9.600 0.000 87.294
+ 9.999 0.000 86.765
+ 10.400 0.000 86.235
+ 10.799 0.000 85.706
+ 11.199 0.000 85.176
+ 11.600 0.000 84.647
+ 11.999 0.000 84.118
+ 12.400 0.000 83.588
+ 12.799 0.000 83.059
+ 13.200 0.000 82.529
+ 13.599 0.000 82.000
+ 13.999 0.000 83.125
+ 14.400 0.000 84.250
+ 14.799 0.000 85.375
+ 15.200 0.000 86.500
+ 15.599 0.000 87.625
+ 16.000 0.000 88.750
+ 16.400 0.000 89.875
+ 16.799 0.000 91.000
+ 17.200 0.000 92.125
+ 17.599 0.000 93.250
+ 18.000 0.000 94.375
+ 18.400 0.000 95.500
+ 18.800 0.000 96.625
+ 19.200 0.000 97.750
+ 19.599 0.000 98.875
+ 20.000 0.000 100.000
+B P
+CN Profile_10
+CP 0 0
+CP 15.643 98.769 18.772 118.523
+CP 2
+ 0.000 0.000 100.000
+ 0.400 0.000 99.486
+ 0.800 0.000 98.973
+ 1.200 0.000 98.459
+ 1.600 0.000 97.946
+ 2.000 0.000 97.432
+ 2.400 0.000 96.919
+ 2.799 0.000 96.405
+ 3.199 0.000 95.892
+ 3.600 0.000 95.378
+ 4.000 0.000 94.865
+ 4.400 0.000 94.351
+ 4.800 0.000 93.838
+ 5.200 0.000 93.324
+ 5.600 0.000 92.811
+ 6.000 0.000 92.297
+ 6.400 0.000 91.784
+ 6.800 0.000 91.270
+ 7.200 0.000 90.757
+ 7.600 0.000 90.243
+ 8.000 0.000 89.730
+ 8.399 0.000 89.216
+ 8.799 0.000 88.703
+ 9.200 0.000 88.189
+ 9.600 0.000 87.676
+ 10.000 0.000 87.162
+ 10.400 0.000 86.649
+ 10.800 0.000 86.135
+ 11.200 0.000 85.622
+ 11.600 0.000 85.108
+ 12.000 0.000 84.595
+ 12.400 0.000 84.081
+ 12.800 0.000 83.568
+ 13.200 0.000 83.054
+ 13.600 0.000 82.541
+ 14.000 0.000 82.027
+ 14.400 0.000 81.514
+ 14.800 0.000 81.000
+ 15.200 0.000 82.462
+ 15.600 0.000 83.923
+ 16.000 0.000 85.385
+ 16.400 0.000 86.846
+ 16.800 0.000 88.308
+ 17.200 0.000 89.769
+ 17.600 0.000 91.231
+ 18.000 0.000 92.692
+ 18.400 0.000 94.154
+ 18.799 0.000 95.615
+ 19.199 0.000 97.077
+ 19.600 0.000 98.538
+ 20.000 0.000 100.000
+B P
+CN Profile_11
+CP 0 0
+CP 0.000 100.000 0.000 120.000
+CP 2
+ 0.000 0.000 100.000
+ 0.400 0.000 99.500
+ 0.800 0.000 99.000
+ 1.200 0.000 98.500
+ 1.600 0.000 98.000
+ 2.000 0.000 97.500
+ 2.400 0.000 97.000
+ 2.800 0.000 96.500
+ 3.200 0.000 96.000
+ 3.600 0.000 95.500
+ 4.000 0.000 95.000
+ 4.400 0.000 94.500
+ 4.800 0.000 94.000
+ 5.200 0.000 93.500
+ 5.600 0.000 93.000
+ 6.000 0.000 92.500
+ 6.400 0.000 92.000
+ 6.800 0.000 91.500
+ 7.200 0.000 91.000
+ 7.600 0.000 90.500
+ 8.000 0.000 90.000
+ 8.400 0.000 89.500
+ 8.800 0.000 89.000
+ 9.200 0.000 88.500
+ 9.600 0.000 88.000
+ 10.000 0.000 87.500
+ 10.400 0.000 87.000
+ 10.800 0.000 86.500
+ 11.200 0.000 86.000
+ 11.600 0.000 85.500
+ 12.000 0.000 85.000
+ 12.400 0.000 84.500
+ 12.800 0.000 84.000
+ 13.200 0.000 83.500
+ 13.600 0.000 83.000
+ 14.000 0.000 82.500
+ 14.400 0.000 82.000
+ 14.800 0.000 81.500
+ 15.200 0.000 81.000
+ 15.600 0.000 80.500
+ 16.000 0.000 80.000
+ 16.400 0.000 82.000
+ 16.800 0.000 84.000
+ 17.200 0.000 86.000
+ 17.600 0.000 88.000
+ 18.000 0.000 90.000
+ 18.400 0.000 92.000
+ 18.800 0.000 94.000
+ 19.200 0.000 96.000
+ 19.600 0.000 98.000
+ 20.000 0.000 100.000
diff --git a/doc/salome/examples/profilsStream.xyz b/doc/salome/examples/profilsStream.xyz
new file mode 100644 (file)
index 0000000..f8ea682
--- /dev/null
@@ -0,0 +1,571 @@
+   100.000      0.000    100.000
+   100.400      0.000     99.000
+   100.800      0.000     98.000
+   101.200      0.000     97.000
+   101.600      0.000     96.000
+   102.000      0.000     95.000
+   102.400      0.000     94.000
+   102.800      0.000     93.000
+   103.200      0.000     92.000
+   103.600      0.000     91.000
+   104.000      0.000     90.000
+   104.400      0.000     90.250
+   104.800      0.000     90.500
+   105.200      0.000     90.750
+   105.600      0.000     91.000
+   106.000      0.000     91.250
+   106.400      0.000     91.500
+   106.800      0.000     91.750
+   107.200      0.000     92.000
+   107.600      0.000     92.250
+   108.000      0.000     92.500
+   108.400      0.000     92.750
+   108.800      0.000     93.000
+   109.200      0.000     93.250
+   109.600      0.000     93.500
+   110.000      0.000     93.750
+   110.400      0.000     94.000
+   110.800      0.000     94.250
+   111.200      0.000     94.500
+   111.600      0.000     94.750
+   112.000      0.000     95.000
+   112.400      0.000     95.250
+   112.800      0.000     95.500
+   113.200      0.000     95.750
+   113.600      0.000     96.000
+   114.000      0.000     96.250
+   114.400      0.000     96.500
+   114.800      0.000     96.750
+   115.200      0.000     97.000
+   115.600      0.000     97.250
+   116.000      0.000     97.500
+   116.400      0.000     97.750
+   116.800      0.000     98.000
+   117.200      0.000     98.250
+   117.600      0.000     98.500
+   118.000      0.000     98.750
+   118.400      0.000     99.000
+   118.800      0.000     99.250
+   119.200      0.000     99.500
+   119.600      0.000     99.750
+   120.000      0.000    100.000
+
+    98.769     15.643    100.000
+    99.164     15.706     99.154
+    99.559     15.769     98.308
+    99.954     15.831     97.462
+   100.349     15.894     96.615
+   100.744     15.956     95.769
+   101.139     16.019     94.923
+   101.534     16.081     94.077
+   101.929     16.144     93.231
+   102.325     16.207     92.385
+   102.720     16.269     91.538
+   103.115     16.332     90.692
+   103.510     16.394     89.846
+   103.905     16.457     89.000
+   104.300     16.519     89.297
+   104.695     16.582     89.595
+   105.090     16.645     89.892
+   105.485     16.707     90.189
+   105.880     16.770     90.486
+   106.275     16.832     90.784
+   106.670     16.895     91.081
+   107.065     16.957     91.378
+   107.460     17.020     91.676
+   107.856     17.083     91.973
+   108.251     17.145     92.270
+   108.646     17.208     92.568
+   109.041     17.270     92.865
+   109.436     17.333     93.162
+   109.831     17.396     93.459
+   110.226     17.458     93.757
+   110.621     17.521     94.054
+   111.016     17.583     94.351
+   111.411     17.646     94.649
+   111.806     17.708     94.946
+   112.201     17.771     95.243
+   112.596     17.834     95.541
+   112.992     17.896     95.838
+   113.387     17.959     96.135
+   113.782     18.021     96.432
+   114.177     18.084     96.730
+   114.572     18.146     97.027
+   114.967     18.209     97.324
+   115.362     18.272     97.622
+   115.757     18.334     97.919
+   116.152     18.397     98.216
+   116.547     18.459     98.514
+   116.942     18.522     98.811
+   117.337     18.584     99.108
+   117.732     18.647     99.405
+   118.128     18.710     99.703
+   118.523     18.772    100.000
+
+    95.106     30.902    100.000
+    95.486     31.025     99.250
+    95.866     31.149     98.500
+    96.247     31.273     97.750
+    96.627     31.396     97.000
+    97.008     31.520     96.250
+    97.388     31.643     95.500
+    97.769     31.767     94.750
+    98.149     31.891     94.000
+    98.529     32.014     93.250
+    98.910     32.138     92.500
+    99.290     32.261     91.750
+    99.671     32.385     91.000
+   100.051     32.509     90.250
+   100.432     32.632     89.500
+   100.812     32.756     88.750
+   101.192     32.879     88.000
+   101.573     33.003     88.353
+   101.953     33.127     88.706
+   102.334     33.250     89.059
+   102.714     33.374     89.412
+   103.095     33.497     89.765
+   103.475     33.621     90.118
+   103.855     33.745     90.471
+   104.236     33.868     90.824
+   104.616     33.992     91.176
+   104.997     34.115     91.529
+   105.377     34.239     91.882
+   105.757     34.363     92.235
+   106.138     34.486     92.588
+   106.518     34.610     92.941
+   106.899     34.734     93.294
+   107.279     34.857     93.647
+   107.660     34.981     94.000
+   108.040     35.104     94.353
+   108.420     35.228     94.706
+   108.801     35.352     95.059
+   109.181     35.475     95.412
+   109.562     35.599     95.765
+   109.942     35.722     96.118
+   110.323     35.846     96.471
+   110.703     35.970     96.824
+   111.083     36.093     97.176
+   111.464     36.217     97.529
+   111.844     36.340     97.882
+   112.225     36.464     98.235
+   112.605     36.588     98.588
+   112.986     36.711     98.941
+   113.366     36.835     99.294
+   113.746     36.958     99.647
+   114.127     37.082    100.000
+
+    89.101     45.399    100.000
+    89.457     45.581     99.316
+    89.813     45.762     98.632
+    90.170     45.944     97.947
+    90.526     46.125     97.263
+    90.883     46.307     96.579
+    91.239     46.489     95.895
+    91.595     46.670     95.211
+    91.952     46.852     94.526
+    92.308     47.033     93.842
+    92.665     47.215     93.158
+    93.021     47.397     92.474
+    93.377     47.578     91.789
+    93.734     47.760     91.105
+    94.090     47.941     90.421
+    94.447     48.123     89.737
+    94.803     48.305     89.053
+    95.159     48.486     88.368
+    95.516     48.668     87.684
+    95.872     48.849     87.000
+    96.229     49.031     87.419
+    96.585     49.213     87.839
+    96.942     49.394     88.258
+    97.298     49.576     88.677
+    97.654     49.757     89.097
+    98.011     49.939     89.516
+    98.367     50.121     89.935
+    98.724     50.302     90.355
+    99.080     50.484     90.774
+    99.436     50.665     91.194
+    99.793     50.847     91.613
+   100.149     51.029     92.032
+   100.506     51.210     92.452
+   100.862     51.392     92.871
+   101.218     51.573     93.290
+   101.575     51.755     93.710
+   101.931     51.937     94.129
+   102.288     52.118     94.548
+   102.644     52.300     94.968
+   103.000     52.481     95.387
+   103.357     52.663     95.806
+   103.713     52.844     96.226
+   104.070     53.026     96.645
+   104.426     53.208     97.065
+   104.782     53.389     97.484
+   105.139     53.571     97.903
+   105.495     53.752     98.323
+   105.852     53.934     98.742
+   106.208     54.116     99.161
+   106.564     54.297     99.581
+   106.921     54.479    100.000
+
+    80.902     58.779    100.000
+    81.225     59.014     99.364
+    81.549     59.249     98.727
+    81.873     59.484     98.091
+    82.196     59.719     97.455
+    82.520     59.954     96.818
+    82.843     60.189     96.182
+    83.167     60.424     95.545
+    83.491     60.659     94.909
+    83.814     60.895     94.273
+    84.138     61.130     93.636
+    84.461     61.365     93.000
+    84.785     61.600     92.364
+    85.109     61.835     91.727
+    85.432     62.070     91.091
+    85.756     62.305     90.455
+    86.079     62.540     89.818
+    86.403     62.775     89.182
+    86.727     63.011     88.545
+    87.050     63.246     87.909
+    87.374     63.481     87.273
+    87.697     63.716     86.636
+    88.021     63.951     86.000
+    88.345     64.186     86.500
+    88.668     64.421     87.000
+    88.992     64.656     87.500
+    89.315     64.891     88.000
+    89.639     65.127     88.500
+    89.963     65.362     89.000
+    90.286     65.597     89.500
+    90.610     65.832     90.000
+    90.934     66.067     90.500
+    91.257     66.302     91.000
+    91.581     66.537     91.500
+    91.904     66.772     92.000
+    92.228     67.008     92.500
+    92.552     67.243     93.000
+    92.875     67.478     93.500
+    93.199     67.713     94.000
+    93.522     67.948     94.500
+    93.846     68.183     95.000
+    94.170     68.418     95.500
+    94.493     68.653     96.000
+    94.817     68.888     96.500
+    95.140     69.124     97.000
+    95.464     69.359     97.500
+    95.788     69.594     98.000
+    96.111     69.829     98.500
+    96.435     70.064     99.000
+    96.758     70.299     99.500
+    97.082     70.534    100.000
+
+    70.711     70.711    100.000
+    70.994     70.994     99.400
+    71.276     71.276     98.800
+    71.559     71.559     98.200
+    71.842     71.842     97.600
+    72.125     72.125     97.000
+    72.408     72.408     96.400
+    72.691     72.691     95.800
+    72.973     72.973     95.200
+    73.256     73.256     94.600
+    73.539     73.539     94.000
+    73.822     73.822     93.400
+    74.105     74.105     92.800
+    74.388     74.388     92.200
+    74.670     74.670     91.600
+    74.953     74.953     91.000
+    75.236     75.236     90.400
+    75.519     75.519     89.800
+    75.802     75.802     89.200
+    76.085     76.085     88.600
+    76.368     76.368     88.000
+    76.650     76.650     87.400
+    76.933     76.933     86.800
+    77.216     77.216     86.200
+    77.499     77.499     85.600
+    77.782     77.782     85.000
+    78.065     78.065     85.600
+    78.347     78.347     86.200
+    78.630     78.630     86.800
+    78.913     78.913     87.400
+    79.196     79.196     88.000
+    79.479     79.479     88.600
+    79.762     79.762     89.200
+    80.044     80.044     89.800
+    80.327     80.327     90.400
+    80.610     80.610     91.000
+    80.893     80.893     91.600
+    81.176     81.176     92.200
+    81.459     81.459     92.800
+    81.742     81.742     93.400
+    82.024     82.024     94.000
+    82.307     82.307     94.600
+    82.590     82.590     95.200
+    82.873     82.873     95.800
+    83.156     83.156     96.400
+    83.439     83.439     97.000
+    83.721     83.721     97.600
+    84.004     84.004     98.200
+    84.287     84.287     98.800
+    84.570     84.570     99.400
+    84.853     84.853    100.000
+
+    58.779     80.902    100.000
+    59.014     81.225     99.429
+    59.249     81.549     98.857
+    59.484     81.873     98.286
+    59.719     82.196     97.714
+    59.954     82.520     97.143
+    60.189     82.843     96.571
+    60.424     83.167     96.000
+    60.659     83.491     95.429
+    60.895     83.814     94.857
+    61.130     84.138     94.286
+    61.365     84.461     93.714
+    61.600     84.785     93.143
+    61.835     85.109     92.571
+    62.070     85.432     92.000
+    62.305     85.756     91.429
+    62.540     86.079     90.857
+    62.775     86.403     90.286
+    63.011     86.727     89.714
+    63.246     87.050     89.143
+    63.481     87.374     88.571
+    63.716     87.697     88.000
+    63.951     88.021     87.429
+    64.186     88.345     86.857
+    64.421     88.668     86.286
+    64.656     88.992     85.714
+    64.891     89.315     85.143
+    65.127     89.639     84.571
+    65.362     89.963     84.000
+    65.597     90.286     84.727
+    65.832     90.610     85.455
+    66.067     90.934     86.182
+    66.302     91.257     86.909
+    66.537     91.581     87.636
+    66.772     91.904     88.364
+    67.008     92.228     89.091
+    67.243     92.552     89.818
+    67.478     92.875     90.545
+    67.713     93.199     91.273
+    67.948     93.522     92.000
+    68.183     93.846     92.727
+    68.418     94.170     93.455
+    68.653     94.493     94.182
+    68.888     94.817     94.909
+    69.124     95.140     95.636
+    69.359     95.464     96.364
+    69.594     95.788     97.091
+    69.829     96.111     97.818
+    70.064     96.435     98.545
+    70.299     96.758     99.273
+    70.534     97.082    100.000
+
+    45.399     89.101    100.000
+    45.581     89.457     99.452
+    45.762     89.813     98.903
+    45.944     90.170     98.355
+    46.125     90.526     97.806
+    46.307     90.883     97.258
+    46.489     91.239     96.710
+    46.670     91.595     96.161
+    46.852     91.952     95.613
+    47.033     92.308     95.065
+    47.215     92.665     94.516
+    47.397     93.021     93.968
+    47.578     93.377     93.419
+    47.760     93.734     92.871
+    47.941     94.090     92.323
+    48.123     94.447     91.774
+    48.305     94.803     91.226
+    48.486     95.159     90.677
+    48.668     95.516     90.129
+    48.849     95.872     89.581
+    49.031     96.229     89.032
+    49.213     96.585     88.484
+    49.394     96.942     87.935
+    49.576     97.298     87.387
+    49.757     97.654     86.839
+    49.939     98.011     86.290
+    50.121     98.367     85.742
+    50.302     98.724     85.194
+    50.484     99.080     84.645
+    50.665     99.436     84.097
+    50.847     99.793     83.548
+    51.029    100.149     83.000
+    51.210    100.506     83.895
+    51.392    100.862     84.789
+    51.573    101.218     85.684
+    51.755    101.575     86.579
+    51.937    101.931     87.474
+    52.118    102.288     88.368
+    52.300    102.644     89.263
+    52.481    103.000     90.158
+    52.663    103.357     91.053
+    52.844    103.713     91.947
+    53.026    104.070     92.842
+    53.208    104.426     93.737
+    53.389    104.782     94.632
+    53.571    105.139     95.526
+    53.752    105.495     96.421
+    53.934    105.852     97.316
+    54.116    106.208     98.211
+    54.297    106.564     99.105
+    54.479    106.921    100.000
+
+    30.902     95.106    100.000
+    31.025     95.486     99.471
+    31.149     95.866     98.941
+    31.273     96.247     98.412
+    31.396     96.627     97.882
+    31.520     97.008     97.353
+    31.643     97.388     96.824
+    31.767     97.769     96.294
+    31.891     98.149     95.765
+    32.014     98.529     95.235
+    32.138     98.910     94.706
+    32.261     99.290     94.176
+    32.385     99.671     93.647
+    32.509    100.051     93.118
+    32.632    100.432     92.588
+    32.756    100.812     92.059
+    32.879    101.192     91.529
+    33.003    101.573     91.000
+    33.127    101.953     90.471
+    33.250    102.334     89.941
+    33.374    102.714     89.412
+    33.497    103.095     88.882
+    33.621    103.475     88.353
+    33.745    103.855     87.824
+    33.868    104.236     87.294
+    33.992    104.616     86.765
+    34.115    104.997     86.235
+    34.239    105.377     85.706
+    34.363    105.757     85.176
+    34.486    106.138     84.647
+    34.610    106.518     84.118
+    34.734    106.899     83.588
+    34.857    107.279     83.059
+    34.981    107.660     82.529
+    35.104    108.040     82.000
+    35.228    108.420     83.125
+    35.352    108.801     84.250
+    35.475    109.181     85.375
+    35.599    109.562     86.500
+    35.722    109.942     87.625
+    35.846    110.323     88.750
+    35.970    110.703     89.875
+    36.093    111.083     91.000
+    36.217    111.464     92.125
+    36.340    111.844     93.250
+    36.464    112.225     94.375
+    36.588    112.605     95.500
+    36.711    112.986     96.625
+    36.835    113.366     97.750
+    36.958    113.746     98.875
+    37.082    114.127    100.000
+
+    15.643     98.769    100.000
+    15.706     99.164     99.486
+    15.769     99.559     98.973
+    15.831     99.954     98.459
+    15.894    100.349     97.946
+    15.956    100.744     97.432
+    16.019    101.139     96.919
+    16.081    101.534     96.405
+    16.144    101.929     95.892
+    16.207    102.325     95.378
+    16.269    102.720     94.865
+    16.332    103.115     94.351
+    16.394    103.510     93.838
+    16.457    103.905     93.324
+    16.519    104.300     92.811
+    16.582    104.695     92.297
+    16.645    105.090     91.784
+    16.707    105.485     91.270
+    16.770    105.880     90.757
+    16.832    106.275     90.243
+    16.895    106.670     89.730
+    16.957    107.065     89.216
+    17.020    107.460     88.703
+    17.083    107.856     88.189
+    17.145    108.251     87.676
+    17.208    108.646     87.162
+    17.270    109.041     86.649
+    17.333    109.436     86.135
+    17.396    109.831     85.622
+    17.458    110.226     85.108
+    17.521    110.621     84.595
+    17.583    111.016     84.081
+    17.646    111.411     83.568
+    17.708    111.806     83.054
+    17.771    112.201     82.541
+    17.834    112.596     82.027
+    17.896    112.992     81.514
+    17.959    113.387     81.000
+    18.021    113.782     82.462
+    18.084    114.177     83.923
+    18.146    114.572     85.385
+    18.209    114.967     86.846
+    18.272    115.362     88.308
+    18.334    115.757     89.769
+    18.397    116.152     91.231
+    18.459    116.547     92.692
+    18.522    116.942     94.154
+    18.584    117.337     95.615
+    18.647    117.732     97.077
+    18.710    118.128     98.538
+    18.772    118.523    100.000
+
+     0.000    100.000    100.000
+     0.000    100.400     99.500
+     0.000    100.800     99.000
+     0.000    101.200     98.500
+     0.000    101.600     98.000
+     0.000    102.000     97.500
+     0.000    102.400     97.000
+     0.000    102.800     96.500
+     0.000    103.200     96.000
+     0.000    103.600     95.500
+     0.000    104.000     95.000
+     0.000    104.400     94.500
+     0.000    104.800     94.000
+     0.000    105.200     93.500
+     0.000    105.600     93.000
+     0.000    106.000     92.500
+     0.000    106.400     92.000
+     0.000    106.800     91.500
+     0.000    107.200     91.000
+     0.000    107.600     90.500
+     0.000    108.000     90.000
+     0.000    108.400     89.500
+     0.000    108.800     89.000
+     0.000    109.200     88.500
+     0.000    109.600     88.000
+     0.000    110.000     87.500
+     0.000    110.400     87.000
+     0.000    110.800     86.500
+     0.000    111.200     86.000
+     0.000    111.600     85.500
+     0.000    112.000     85.000
+     0.000    112.400     84.500
+     0.000    112.800     84.000
+     0.000    113.200     83.500
+     0.000    113.600     83.000
+     0.000    114.000     82.500
+     0.000    114.400     82.000
+     0.000    114.800     81.500
+     0.000    115.200     81.000
+     0.000    115.600     80.500
+     0.000    116.000     80.000
+     0.000    116.400     82.000
+     0.000    116.800     84.000
+     0.000    117.200     86.000
+     0.000    117.600     88.000
+     0.000    118.000     90.000
+     0.000    118.400     92.000
+     0.000    118.800     94.000
+     0.000    119.200     96.000
+     0.000    119.600     98.000
+     0.000    120.000    100.000
\ No newline at end of file
index 110509437a20d897ac83e98255c5d24bb8c1b98a..7f87d0c6c0989b9c28a9d17c9350c850c1886a90 100644 (file)
@@ -751,13 +751,13 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
       aResAltitude = GetAltitudeForPoint( thePoint, aZone, theMethod );
     else
       {
-        DEBTRACE("GetAltitudeForPoint Region " << aRefRegion->GetName().toStdString() << " Zone " << aZone->GetName().toStdString() << " ---------------------------");
+        //DEBTRACE("GetAltitudeForPoint Region " << aRefRegion->GetName().toStdString() << " Zone " << aZone->GetName().toStdString() << " ---------------------------");
         aResAltitude = GetAltitudeForPoint( thePoint, aZone, theMethod );
       }
   }
   else
     {
-      DEBTRACE(" --- GetAltitudeForPoint No Zone ---");
+      //DEBTRACE(" --- GetAltitudeForPoint No Zone ---");
     }
 
   return aResAltitude;
@@ -784,7 +784,7 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
   }
   else if ( aZoneMergeType == HYDROData_Zone::Merge_UNKNOWN )
   {
-       DEBTRACE("GetAltitudeForPoint Zone " << theZone->GetName().toStdString() << " Merge_UNKNOWN");
+       //DEBTRACE("GetAltitudeForPoint Zone " << theZone->GetName().toStdString() << " Merge_UNKNOWN");
     return aResAltitude;
   }
 
index 163601c0d718be20b2d5ead90c5ad0febacdce2f..3ba6e2c9a2e4cc15defffc426515226b706bc9f1 100644 (file)
@@ -39,10 +39,10 @@ public:
   {
     TopoDS_Shape myPrs3D;
     TopoDS_Face  myPrs2D;
-    TopoDS_Wire  myLeftBank;
-    TopoDS_Wire  myRightBank;
-    TopoDS_Wire  myInlet;
-    TopoDS_Wire  myOutlet;
+    TopoDS_Shape myLeftBank;
+    TopoDS_Shape myRightBank;
+    TopoDS_Shape myInlet;
+    TopoDS_Shape myOutlet;
   };
 
 protected:
index 4b0a1392cc70a9c3982a6608607818f954833d50..aae21b43f937fa9d807cc983d35a64ca8e0b29e5 100644 (file)
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <BRepBuilderAPI_MakeFace.hxx>
 #include <TopExp.hxx>
+<<<<<<< HEAD
+=======
+#include <TopTools_IndexedMapOfOrientedShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+>>>>>>> origin/BR_HYDRO_IMPS_2016
 
 #include <BRepLib_MakeEdge.hxx>
 #include <BRepLib_MakeWire.hxx>
 #include <ShapeUpgrade_UnifySameDomain.hxx>
 #include <BRepBuilderAPI_MakePolygon.hxx>
 #include <BOPAlgo_Builder.hxx>
-
+#include <BRepAdaptor_Curve.hxx>
+#include <GeomProjLib.hxx>
+#include <gp_Pln.hxx>
 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_SequenceOfShape.hxx>
+#include <assert.h>
 
 IMPLEMENT_STANDARD_RTTIEXT( HYDROData_DTM, HYDROData_Bathymetry )
 
@@ -157,19 +166,9 @@ void HYDROData_DTM::SetSpatialStep( double theSpatialStep )
   Changed( Geom_3d );
 }
 
-void HYDROData_DTM::PointToWire(const AltitudePoints& pnts, TopoDS_Wire& W )
+void HYDROData_DTM::PointsToWire(const AltitudePoints& pnts, TopoDS_Wire& W )
 {
-  /*BRepLib_MakeWire WM;
-  if (pnts.empty())
-    return;
-  for (int i = 0; i < pnts.size() - 1; i++)
-  {
-    gp_Pnt p1(pnts[i].X, pnts[i].Y, pnts[i].Z);
-    gp_Pnt p2(pnts[i+1].X, pnts[i+1].Y, pnts[i+1].Z);    
-    WM.Add(BRepLib_MakeEdge(p1, p2).Edge()); 
-  }
-  if (WM.IsDone())*/
-  
   BRepBuilderAPI_MakePolygon PM;
   for (int i = 0; i < pnts.size(); i++)
     PM.Add(gp_Pnt(pnts[i].X, pnts[i].Y, pnts[i].Z));
@@ -177,29 +176,48 @@ void HYDROData_DTM::PointToWire(const AltitudePoints& pnts, TopoDS_Wire& W )
   W = PM.Wire();
 }
 
+void HYDROData_DTM::PointsToEdge(const AltitudePoints& pnts, TopoDS_Edge& E )
+{ 
+  Handle(TColgp_HArray1OfPnt) gpPoints = new TColgp_HArray1OfPnt(1, (int)pnts.size());
+
+  for (int i = 0; i < pnts.size(); i++)
+    gpPoints->SetValue(i+1, gp_Pnt(pnts[i].X, pnts[i].Y, pnts[i].Z));
+
+  GeomAPI_Interpolate anInterpolator(gpPoints, Standard_False,1.0e-6);
+  anInterpolator.Perform() ;
+  if (anInterpolator.IsDone()) 
+  {
+    Handle(Geom_Curve) C = anInterpolator.Curve();
+    E = BRepBuilderAPI_MakeEdge(C).Edge();
+  }
+}
+
 TopTools_IndexedMapOfOrientedShape HYDROData_DTM::Create3DShape(const AltitudePoints& left,
                                                                 const AltitudePoints& right,
                                                                 const std::vector<AltitudePoints>& main_profiles)
 {  
   TopTools_IndexedMapOfOrientedShape ll;
-  TopoDS_Wire LWire, RWire;
-  PointToWire(left, LWire);
-  PointToWire(right, RWire);
-  if (!LWire.IsNull())
-    ll.Add(LWire.Oriented(TopAbs_FORWARD));
+  //TopoDS_Wire LWire, RWire;
+  //PointsToWire(left, LWire);
+  //PointsToWire(right, RWire);
+  TopoDS_Edge LEdge, REdge;
+  PointsToEdge(left, LEdge);
+  PointsToEdge(right, REdge);
+  if (!LEdge.IsNull())
+    ll.Add(LEdge.Oriented(TopAbs_FORWARD));
 
   for (int k = 0; k < main_profiles.size(); k++)
   {
     TopoDS_Wire W;
-    PointToWire(main_profiles[k], W);
+    PointsToWire(main_profiles[k], W);
     TopAbs_Orientation Ori = TopAbs_INTERNAL;
     if (k == 0 || k == main_profiles.size() - 1)
       Ori = TopAbs_FORWARD;
     ll.Add(W.Oriented(Ori));
   }
 
-  if (!RWire.IsNull())
-    ll.Add(RWire.Oriented(TopAbs_FORWARD)); 
+  if (!REdge.IsNull())
+    ll.Add(REdge.Oriented(TopAbs_FORWARD)); 
   //yes, add subshapes in this order (left + profiles + right)
   //otherwise the projected wire will be non-manifold
 
@@ -224,7 +242,7 @@ void HYDROData_DTM::Update()
   bool WireIntersections; //__TODO
   CreateProfilesFromDTM( objs, ddz, step, points, Out3dPres, Out2dPres, OutLeftB, OutRightB, OutInlet, OutOutlet, true, true, InvInd, -1, WireIntersections );
   SetAltitudePoints( points );  
-
+  
   SetShape( DataTag_LeftBankShape, OutLeftB);
   SetShape( DataTag_RightBankShape, OutRightB);
   SetShape( DataTag_InletShape, OutInlet);
@@ -294,179 +312,44 @@ void HYDROData_DTM::CreateProfilesFromDTM (const HYDROData_SequenceOfObjects& In
     Out3dPres, Out2dPres, OutLeftB, OutRightB, OutInlet, OutOutlet, Create3dPres, Create2dPres, InvInd, WireIntersections );
 }
 
-void HYDROData_DTM::ProjWireOnPlane(const TopoDS_Shape& inpWire, const Handle(Geom_Plane)& RefPlane, 
-  TopTools_DataMapOfShapeListOfShape* E2PE)
+bool HYDROData_DTM::GetPlanarFaceFromBanks( const TopoDS_Edge& LB, const TopoDS_Edge& RB, TopoDS_Face& outF,
+  TopTools_SequenceOfShape* Boundr)
 {
   BRep_Builder BB;
-
-  //project shape (edges) on planar face
   TopoDS_Face F;
-  BB.MakeFace(F, RefPlane, Precision::Confusion());
-  BRepAlgo_NormalProjection nproj(F);
-  nproj.Add(inpWire);
-  nproj.SetDefaultParams();
-  nproj.Build();
-  if(!nproj.IsDone())
-    return;
+  Handle_Geom_Plane refpl = new Geom_Plane(gp_Pnt(0,0,0), gp_Dir(0,0,1));
 
-  TopoDS_Shape projRes = nproj.Projection();
+  TopoDS_Vertex VFI, VLI, VFO, VLO;
+  TopoDS_Edge prLB;
+  TopoDS_Edge prRB;
 
-  // unite all vertexes/edges from projected result
-  BOPAlgo_Builder anAlgo;
-  TopExp_Explorer exp(projRes, TopAbs_EDGE);
-  for (;exp.More(); exp.Next())
-  {
-    const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
-    if (E.Orientation() != TopAbs_INTERNAL)
-      anAlgo.AddArgument(E);
-  }
-  anAlgo.Perform(); 
-  int stat = anAlgo.ErrorStatus();
-  TopoDS_Shape projResConn = anAlgo.Shape();
-
-  // make wire => vertexes and edges should be untouched after this operation!
-  exp.Init(projResConn, TopAbs_EDGE);
-  //TopTools_ListOfShape llE;
-  //TopoDS_Wire RW;
-  //BRepLib_MakeWire WM;
-
-  //for (;exp.More();exp.Next()) 
-  //  llE.Append(exp.Current());
-  //
-  //WM.Add(llE);
-  //outWire = WM.Wire();
-
-  //outWire.Orientation(inpWire.Orientation()); //take from the original wire
-
-  //history mode: edge to projected edges
-  if (E2PE)
-  {
-    TopExp_Explorer ex(inpWire, TopAbs_EDGE);
-    for (;ex.More();ex.Next())
-    {
-      const TopoDS_Edge& CE = TopoDS::Edge(ex.Current());
-      TopTools_ListOfShape NEL;
-      const TopTools_ListOfShape& LS = nproj.Generated(CE);
-      TopTools_ListIteratorOfListOfShape it(LS);
-      for (;it.More();it.Next())
-      {
-        const TopoDS_Shape& PCE = it.Value();
-        TopTools_ListOfShape PLS = anAlgo.Modified(PCE);
-        if (PLS.IsEmpty())
-          PLS.Append(PCE);
-        TopTools_ListIteratorOfListOfShape itp(PLS);
-        for (;itp.More();itp.Next())
-          NEL.Append(itp.Value());
-      }
-
-      E2PE->Bind(CE, NEL);
-    }
-  }
-}
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-bool HYDROData_DTM::Get2dFaceFrom3dPres(const TopoDS_Compound& cmp, TopoDS_Face& outF,
-  TopTools_SequenceOfShape* Boundr, std::set<int> ind )
-{
-  //ind : set of indices (starts with 0). index == number of boundary (inlet, outlet, etc..)
-  //in compound cmp. 
-  //if Boundr is not null => this method will return sequence of boundary wires (inlet, outlet...)
-
-  Handle(Geom_Plane) refpl = new Geom_Plane(gp_Pnt(0,0,0), gp_Dir(0,0,1));
-  TopTools_DataMapOfShapeListOfShape E2PE;
-  ProjWireOnPlane(cmp, refpl, &E2PE);
-  TopTools_ListOfShape ELL;
-
-  TopoDS_Iterator it(cmp);
-  int i = 0;
-  for (;it.More(); it.Next())
-  {
-    const TopoDS_Wire& W = TopoDS::Wire(it.Value());
-    if (W.Orientation() != TopAbs_INTERNAL)
-    {
-      TopoDS_Wire PW;
-      TopExp_Explorer ex(W, TopAbs_EDGE);   
-      TopTools_ListOfShape LEpW;
-      TopTools_ListOfShape LEpWDummy;
-      for (;ex.More();ex.Next())
-      {
-        const TopoDS_Edge& CE = TopoDS::Edge(ex.Current());
-        TopTools_ListOfShape LS = E2PE.Find(CE);
-        LEpW.Append(LS);
-      }
-      
-      if (ind.count(i) != 0)
-      {
-        BRepLib_MakeWire WM;
-        WM.Add(LEpW);
-        const TopoDS_Wire& WMW = WM.Wire();
-        //assume that wire is a straight line,
-        //take first and last vertex and make simple edge (RE)
-        TopoDS_Vertex VF, VL;
-        TopExp::Vertices(WMW, VF, VL);
-        TopoDS_Edge RE = BRepLib_MakeEdge(VF, VL).Edge();
-        if (RE.IsNull())
-        {
-          LEpWDummy = LEpW; //LEpW will be nullified after appending to ELL
-          ELL.Append(LEpW);
-        }
-        else
-        {
-          LEpWDummy.Append(RE); 
-          ELL.Append(RE);
-        }
-        //TODO: in the new version of OCCT, USD can process separate wires
-        //ShapeUpgrade_UnifySameDomain USD(WMW, 1U, 0U, 1U); //concat bsplines
-        //USD.Build();
-        //const TopoDS_Shape& RSU = USD.Shape();
-        //TopExp_Explorer exp(RSU, TopAbs_EDGE);
-        //TopTools_ListOfShape DummyL;
-        //for (;it.More();it.Next())
-        //  DummyL.Append(it.Value());
-        //if (DummyL.Extent() == 1)
-        //  ELL.Append(DummyL.First()); //if one edge => accept this result 
-        //else
-        //  ELL.Append(LEpW);  //else put 'as is'
-      }
-      else
-      {
-        LEpWDummy = LEpW;
-        ELL.Append(LEpW);
-      }
-
-      if (Boundr)
-      {
-        //make inlet, outlet, left/tight banks [wires]
-        //shouldn't change topology of the edges
-        BRepLib_MakeWire IWM;
-        IWM.Add(LEpWDummy);
-        Boundr->Append(IWM.Wire());
-      }
-    }
-    i++;
-  }
 
-  //make primary wire
-  BRepLib_MakeWire WME;
-  WME.Add(ELL);
+  BRepAdaptor_Curve LBAD(LB);
+  Handle_Geom_Curve LBPC = GeomProjLib::ProjectOnPlane(LBAD.Curve().Curve(), refpl, gp_Dir(0, 0, -1), 1 );
+  prLB = BRepLib_MakeEdge(LBPC).Edge();
 
-  const TopoDS_Wire& resW = WME.Wire();
-  BRepBuilderAPI_MakeFace mf(refpl, resW, true); //check inside is true by def
-  outF = mf.Face();
+  BRepAdaptor_Curve RBAD(RB);
+  Handle_Geom_Curve RBPC = GeomProjLib::ProjectOnPlane(RBAD.Curve().Curve(), refpl, gp_Dir(0, 0, -1), 1 );
+  prRB = BRepLib_MakeEdge(RBPC).Edge();
 
-  ShapeAnalysis_Wire WA(resW, outF, Precision::Confusion());
-  bool res = WA.CheckSelfIntersection(); //TODO check that this return false if OK
-  return res;
+  TopExp::Vertices(prLB, VFI, VFO, 1);
+  TopExp::Vertices(prRB, VLI, VLO, 1);
+  TopoDS_Edge prIL = BRepLib_MakeEdge(VFI, VLI).Edge();
+  TopoDS_Edge prOL = BRepLib_MakeEdge(VFO, VLO).Edge();
+  TopoDS_Wire prW = BRepLib_MakeWire(prLB, prIL, prOL, prRB).Wire();
+  outF = BRepBuilderAPI_MakeFace(refpl->Pln(), prW, 1).Face();
 
-  ///!!! the internal wires cant be added with 'internal' ori.
-  // it's possible to do with brep builder yet the result will not be correct!
-  // more proper way is to use BOP operation here.
-  /*for (int i = 1; i <= IntW.Extent(); i++)
+  if (Boundr)
   {
-  TopoDS_Wire outIW;
-  const TopoDS_Wire& W = TopoDS::Wire(IntW(i));
-  ProjWireOnPlane(W, refpl, outIW);
-  BB.Add(outF, outIW);
-  }*/
+    Boundr->Append(prLB);
+    Boundr->Append(prIL);
+    Boundr->Append(prOL);
+    Boundr->Append(prRB);
+  }
+
+  ShapeAnalysis_Wire WA(prW, outF, Precision::Confusion());
+  bool res = WA.CheckSelfIntersection();
+  return !res;
 }
 
 void HYDROData_DTM::CreateProfiles(const std::vector<Handle(HYDROData_Profile)>& theProfiles,
@@ -485,7 +368,7 @@ void HYDROData_DTM::CreateProfiles(const std::vector<Handle(HYDROData_Profile)>&
                                    bool Create3dPres,
                                    bool Create2dPres,
                                    std::set<int>& InvInd,
-                                   bool& WireIntersections)
+                                   bool& ProjStat)
 {
   if (theProfiles.empty())
     return;
@@ -517,7 +400,7 @@ void HYDROData_DTM::CreateProfiles(const std::vector<Handle(HYDROData_Profile)>&
     if (Create2dPres)
     {
       TopoDS_Face outF;
-      WireIntersections = Get2dFaceFrom3dPres(cmp, outF); //__TODO
+      ProjStat = GetPlanarFaceFromBanks(TopoDS::Edge(OutLeftB), TopoDS::Edge(OutRightB), outF, NULL);
       Out2dPres = outF;
     };
   }
@@ -652,13 +535,14 @@ Handle(Geom2d_BSplineCurve) HYDROData_DTM::CreateHydraulicAxis(
   TColgp_Array1OfVec2d tangents( 1, (int)n );
   Handle(TColStd_HArray1OfBoolean) flags = new TColStd_HArray1OfBoolean( 1, (int)n );
 
-  for( size_t i = 1; i <= n; i++ )
+  // Stage 1. Orient all profiles to be co-oriented with the first profile
+  theProfiles[0]->Update();
+  for( size_t i = 1; i < n; i++ )
   {
-    Handle(HYDROData_Profile) aProfile = theProfiles[i-1];
-    Handle(HYDROData_Profile) aPrevProfile = i==1 ? theProfiles[i-1] : theProfiles[i-2];
-    Handle(HYDROData_Profile) aNextProfile = i==n ? theProfiles[i-1] : theProfiles[i];
+    Handle_HYDROData_Profile aProfile = theProfiles[i];
+    Handle_HYDROData_Profile aPrevProfile = theProfiles[i-1];
 
-    if( !IsCooriented( aProfile, aNextProfile ) )
+    if( !IsCooriented( aProfile, aPrevProfile ) )
     {
       gp_XY lp, rp;
       aProfile->GetLeftPoint( lp, true );
@@ -667,20 +551,22 @@ Handle(Geom2d_BSplineCurve) HYDROData_DTM::CreateHydraulicAxis(
       aProfile->SetRightPoint( lp, true );
     }
     aProfile->Update();
+  }
+
+  // Stage 2. Calculate normals so that each normal "points" to the next profile
+  for( size_t i = 0; i < n; i++ )
+  {
+    Handle_HYDROData_Profile aProfile = theProfiles[i];
+    Handle_HYDROData_Profile aNextProfile = i==n-1 ? theProfiles[i-1] : theProfiles[i+1];
 
     gp_Pnt aLowest;
     gp_Vec2d aNormal;
     double zmin, zmax;
 
-    gp_XYZ curP = aProfile->GetBottomPoint();
+    gp_XYZ curP = aProfile->GetBottomPoint(true);
     gp_XY curP2d = gp_XY(curP.X(), curP.Y());
 
-    gp_XYZ nextP;
-    if( i==n )
-      nextP = aPrevProfile->GetBottomPoint(true);
-    else
-      nextP = aNextProfile->GetBottomPoint(true);
-
+    gp_XYZ nextP = aNextProfile->GetBottomPoint(true);
     gp_XY nextP2d = gp_XY(nextP.X(), nextP.Y());
 
     gp_Vec2d aPrTangent;
@@ -688,16 +574,17 @@ Handle(Geom2d_BSplineCurve) HYDROData_DTM::CreateHydraulicAxis(
     aNormal.SetCoord( -aPrTangent.Y(), aPrTangent.X() );
 
     gp_Vec2d aDirToNextProfile(nextP2d.X() - curP2d.X(), nextP2d.Y() - curP2d.Y() );
-    if( i==n )
+    if( i==n-1 )
       aDirToNextProfile.Reverse();
+
     if (aNormal.Dot(aDirToNextProfile) < 0)
       aNormal.Reverse();
 
     aNormal.Normalize();
 
-    points->SetValue( (int)i, gp_Pnt2d( aLowest.X(), aLowest.Y() ) );
-    tangents.SetValue( (int)i, aNormal );
-    flags->SetValue( (int)i, Standard_True );
+    points->SetValue( (int)(i+1), gp_Pnt2d( aLowest.X(), aLowest.Y() ) );
+    tangents.SetValue( (int)(i+1), aNormal );
+    flags->SetValue( (int)(i+1), Standard_True );
   }
 
   Geom2dAPI_Interpolate anInterpolator( points, Standard_False, Standard_False );
index 7b67be1a59ff06e93cf35c3953c2ef771457d911..7f2de733cc173ed0acaf8aa92414bd23ab78905d 100644 (file)
@@ -157,10 +157,15 @@ protected:
                                      std::vector<AltitudePoints>& theMainProfiles,
                                      std::set<int>& invalInd );
 
-  static void PointToWire(const AltitudePoints& pnts, TopoDS_Wire& W );
+  static void PointsToWire(const AltitudePoints& pnts, TopoDS_Wire& W );
 
-  static void ProjWireOnPlane(const TopoDS_Shape& inpWire, const Handle(Geom_Plane)& RefPlane,
-    TopTools_DataMapOfShapeListOfShape* E2PE);
+  static void PointsToEdge(const AltitudePoints& pnts, TopoDS_Edge& E );
+
+  //static void ProjWireOnPlane(const TopoDS_Shape& inpWire, const Handle_Geom_Plane& RefPlane,
+    //TopTools_DataMapOfShapeListOfShape* E2PE);
+
+  static bool GetPlanarFaceFromBanks(const TopoDS_Edge& LB, const TopoDS_Edge& RB, TopoDS_Face& outF,
+    TopTools_SequenceOfShape* Boundr);
 
   static TopTools_IndexedMapOfOrientedShape Create3DShape(const AltitudePoints& left,
                                                           const AltitudePoints& right,
@@ -182,10 +187,10 @@ protected:
                              bool Create3dPres,
                              bool Create2dPres,
                              std::set<int>& InvInd,
-                             bool& WireIntersections);
+                             bool& ProjStat);
 
-  static bool Get2dFaceFrom3dPres(const TopoDS_Compound& cmp, TopoDS_Face& outF, 
-    TopTools_SequenceOfShape* Boundr = NULL, std::set<int> ind = std::set<int>() );
+  //static bool Get2dFaceFrom3dPres(const TopoDS_Compound& cmp, TopoDS_Face& outF, 
+    //TopTools_SequenceOfShape* Boundr = NULL, std::set<int> ind = std::set<int>() );
   
   static int EstimateNbPoints( const std::vector<Handle(HYDROData_Profile)>& theProfiles,
                                double theDDZ, double theSpatialStep );
index 3d54e13f34e87e59f3cb4d8b03723619ca9f2f92..a152909c98247f0e26f54693bd0f917b820c8ba7 100644 (file)
@@ -197,7 +197,12 @@ GEOM::GEOM_Object_ptr HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( GEOM::GE
   }
 
   for (size_t i = 0; i < aFc->length(); i++)
-    GEOMBase::PublishSubObject(aFc->operator[](i), Names[i]);  
+  {
+    std::string name = Names[i].toStdString();
+    GEOM::GEOM_Object_ptr anObj = aFc->operator[](i);
+    //GEOMBase::PublishSubObject( anObj, name.c_str() );
+    theGeomEngine->AddInStudy( theStudy, anObj, name.c_str(), aGeomObj );
+  }
 
   return aGeomObj;
 }
index bf73726b33343069ef44c36692ad7db956540d2f..b6165033c40d2fd535765156092af5034243d8a6 100644 (file)
@@ -316,8 +316,8 @@ void HYDROData_Object::checkAndSetAltitudeObject()
   if ( anAltitudeObjectType == KIND_UNKNOWN )
     return; // No need to create altitude object
 
-  TDF_Label aLabel = myLab.FindChild( DataTag_ChildAltitudeObject, false );
-  if ( !aLabel.IsNull() )
+  Handle(HYDROData_IAltitudeObject) altObject = GetAltitudeObject();
+  if( !altObject.IsNull() && altObject->GetKind()==anAltitudeObjectType )
     return;
 
   TDF_Label aChildLabel = myLab.FindChild( DataTag_ChildAltitudeObject ).FindChild( 0 );
index 43fb6799520b45b8e48c4b31bbd961c3d72ccba0..07387a6e9d0cf085fba22e6aca6e2ee26cee61fc 100644 (file)
@@ -487,13 +487,22 @@ bool HYDROData_PolylineOperator::Extract( const Handle(HYDROData_Document)& theD
       LSE.Append(E);
     }
 
-    BRepLib_MakeWire WM;
-    WM.Add(LSE);
-    TopoDS_Shape aShapeW;
-    if (WM.IsDone())
-      aShapeW = WM.Wire();
-    else
-      continue;
+
+    TopoDS_Shape aShapeOut;
+    if (LSE.Extent() == 1)
+    {
+      aShapeOut = LSE.First();
+    }
+    else if (LSE.Extent() > 1)
+    {
+      BRepLib_MakeWire WM;
+      WM.Add(LSE);
+      if (WM.IsDone())
+        aShapeOut = WM.Wire();
+      else
+        continue;
+    }
+    else continue;
 
     Handle( HYDROData_PolylineXY ) aPolyline = 
       Handle( HYDROData_PolylineXY )::DownCast( theDocument->CreateObject( KIND_POLYLINEXY ) );
@@ -501,7 +510,7 @@ bool HYDROData_PolylineOperator::Extract( const Handle(HYDROData_Document)& theD
     if( aPolyline.IsNull() )
       return false;
 
-    aPolyline->SetShape( aShapeW );
+    aPolyline->SetShape( aShapeOut );
 
     int anIndex = 0;
     QString aName = K;
index 3ecb3e779857587c501eccf20aad1fc2705bd0ff..91718cb223d29f341008d5dbf1e439b07c2f80ba 100644 (file)
@@ -215,10 +215,10 @@ bool HYDROData_Stream::CreatePresentations( const Handle(HYDROData_DTM)& theDTM,
 
   theDTM->GetPresentationShapes(Out3dPres, Out2dPres, OutLeftB, OutRightB, OutInlet, OutOutlet);
 
-  thePrs.myInlet = TopoDS::Wire(OutInlet);
-  thePrs.myOutlet = TopoDS::Wire(OutOutlet);
-  thePrs.myLeftBank = TopoDS::Wire(OutLeftB);
-  thePrs.myRightBank = TopoDS::Wire(OutRightB);
+  thePrs.myInlet = OutInlet;
+  thePrs.myOutlet = OutOutlet;
+  thePrs.myLeftBank = OutLeftB;
+  thePrs.myRightBank = OutRightB;
   thePrs.myPrs2D = Out2dPres;
   thePrs.myPrs3D = Out3dPres;
   /*std::vector<TopoDS_Wire> profiles3d;
@@ -533,6 +533,8 @@ bool HYDROData_Stream::AddProfile( const Handle(HYDROData_Profile)& theProfile )
   
   int aProfileIndex = insertParameter( aPar );
   insertProfileInToOrder( theProfile, aProfileIndex );
+
+  DTM()->SetProfiles( GetProfiles() );
   
   // Indicate model of the need to update the stream presentation
   Changed( Geom_3d );
@@ -1077,8 +1079,14 @@ void HYDROData_Stream::CreatePresentations( const Handle(TColgp_HArray1OfPnt)
 
   if (!ll.IsEmpty())
   {
-    LB = TopoDS::Wire(ll(1));
-    RB = TopoDS::Wire(ll(2));
+    TopAbs_ShapeEnum ll1_sht = ll(1).ShapeType();
+    TopAbs_ShapeEnum ll2_sht = ll(2).ShapeType();
+    if ((ll1_sht == TopAbs_WIRE || ll1_sht == TopAbs_EDGE) &&
+      (ll2_sht == TopAbs_WIRE || ll2_sht == TopAbs_EDGE))
+    {
+      LB = ll(1);
+      RB = ll(2);
+    }
   }
 
   IL = TopoDS::Wire(theArrOfProfiles->Value(theArrOfProfiles->Lower())); //TODO check that
@@ -1094,12 +1102,11 @@ void HYDROData_Stream::CreatePresentations( const Handle(TColgp_HArray1OfPnt)
   BB.Add(newCmp, RB);
 
   thePrs.myPrs3D = newCmp;
-  std::set<int> ind;
-  ind.insert(1); //inlet ind
-  ind.insert(2); //outlet ind
 
   TopTools_SequenceOfShape LS;
-  HYDROData_DTM::Get2dFaceFrom3dPres( newCmp, TopoDS::Face(thePrs.myPrs2D), &LS, ind );
+  //HYDROData_DTM::Get2dFaceFrom3dPres( newCmp, TopoDS::Face(thePrs.myPrs2D), &LS, ind );
+  
+  HYDROData_DTM::GetPlanarFaceFromBanks(TopoDS::Edge(LB), TopoDS::Edge(RB), TopoDS::Face(thePrs.myPrs2D), &LS);
 
 #ifndef NDEBUG
   TopTools_IndexedMapOfShape EE;
@@ -1117,9 +1124,9 @@ void HYDROData_Stream::CreatePresentations( const Handle(TColgp_HArray1OfPnt)
   assert(noncontNb == 0);
 #endif
 
-  thePrs.myLeftBank = TopoDS::Wire(LS(1));  
-  thePrs.myInlet = TopoDS::Wire(LS(2));  
-  thePrs.myOutlet = TopoDS::Wire(LS(3));  
-  thePrs.myRightBank = TopoDS::Wire(LS(4));
+  thePrs.myLeftBank = LS(1);  
+  thePrs.myInlet = LS(2);  
+  thePrs.myOutlet = LS(3);  
+  thePrs.myRightBank = LS(4);
 
 }
index 923c23f55fe73a390c9809a133781348a4d08793..902ad5a0c9d46f886dbc0a58411c4be3b3e0fd90 100644 (file)
@@ -48,10 +48,10 @@ public:
   {
     TopoDS_Shape myPrs3D;
     TopoDS_Shape myPrs2D;
-    TopoDS_Wire  myLeftBank;   // 3d curve of the left bank
-    TopoDS_Wire  myRightBank;  // 3d curve of the right bank
-    TopoDS_Wire  myInlet;      // first (inlet) 2d profile 
-    TopoDS_Wire  myOutlet;     // last (inlet) 2d profile 
+    TopoDS_Shape myLeftBank;   // 3d curve of the left bank
+    TopoDS_Shape myRightBank;  // 3d curve of the right bank
+    TopoDS_Shape myInlet;      // first (inlet) 2d profile 
+    TopoDS_Shape myOutlet;     // last (inlet) 2d profile 
   };
 
 protected:
index 8bca430933432e5d0beb02ee22424ef72dac9f01..3ad5e1dcc1869bc7eabc66c51a6c28275a41ef40 100644 (file)
@@ -415,6 +415,16 @@ bool HYDROGUI_ImportLandCoverMapDlg::getDbfState() const
   return myDbfState;
 }
 
+void HYDROGUI_ImportLandCoverMapDlg::setDbfRecordsNb(int theRecordsNbs)
+{
+  myDbfRecordsNbs = theRecordsNbs;
+}
+
+int HYDROGUI_ImportLandCoverMapDlg::getDbfRecordsNb() const
+{
+  return myDbfRecordsNbs;
+}
+
 int HYDROGUI_ImportLandCoverMapDlg::getCurrentWizardIndex() const
 {
   return wizard()->currentIndex();
@@ -452,5 +462,10 @@ bool HYDROGUI_ImportLandCoverMapDlg::CheckFirstPageFilling() const
      SUIT_MessageBox::critical( module()->getApp()->desktop(), tr( "DBF_LOAD_ERROR" ), tr("DBF_LOAD_ERR_MESS"));
      return false;
   }
+  if (this->getAttrCheckBoxState() && this->getDbfRecordsNb() == 0)
+  {
+     SUIT_MessageBox::warning( module()->getApp()->desktop(), tr( "DBF_NB_RECORDS_IS_NULL" ), tr("DBF_NB_RECORDS_IS_NULL_MESS"));
+     return false;
+  }
   return true;
 }
index 524f41a65455208e03e61538ae0cf007993059e3..c7378578294a2634fa3d39c662d03cfdcc04230d 100644 (file)
@@ -66,6 +66,10 @@ public:
 
   void                  setDbfState(bool theState);
   bool                  getDbfState() const;
+
+  void                  setDbfRecordsNb(int theRecordsNbs);
+  int                   getDbfRecordsNb() const;
+
   int                   getCurrentWizardIndex() const;
 
   void                  setViewerState(bool theState);
@@ -115,6 +119,7 @@ private:
   bool                  myFirstPageState;
   QVector<QColor>       myStrColors;
   bool                  myDbfState;
+  int                   myDbfRecordsNbs;
 
   bool                  myUpdateViewerState;
 };
index 5cb9d9478c73085f4c5aa6accd6cdfabae58dbde..ecae18361cb619bea75232c9b8ada2d15f44852d 100644 (file)
@@ -188,6 +188,7 @@ void HYDROGUI_ImportLandCoverMapOp::onFileSelected()
       aPanel->setAttributeNames(myFieldList);
     }
     aPanel->setDbfState(DBF_Stat);
+    aPanel->setDbfRecordsNb(myImporter.DBF_GetNbRecords());
   }
   else
   {
index d39868ccf3d9f68f94b76db38acffbaea9f32431..89f44d9997b97399b97559e2d379a1deb63634f7 100755 (executable)
@@ -420,24 +420,24 @@ void HYDROGUI_StreamOp::createPreview()
 
   HYDROData_Bathymetry::AltitudePoints points;
 
-  bool WireIntersections = false;
+  bool ProjStat = true;
   HYDROData_DTM::CreateProfilesFromDTM( aRefProfiles, ddz, ss, points, Out3dPres, Out2dPres, OutLeftB, OutRightB,
-    OutInlet, OutOutlet, true, true, InvInd, MAX_POINTS_IN_PREVIEW, WireIntersections );
+    OutInlet, OutOutlet, true, true, InvInd, MAX_POINTS_IN_PREVIEW, ProjStat );
 
   aPanel->clearAllBackgroundColorsForProfileList();
   for (std::set<int>::const_iterator it = InvInd.begin(); it != InvInd.end(); it++)
     aPanel->setBackgroundColorForProfileList(*it, QColor(Qt::yellow));
 
-  aPrsDef.myInlet = TopoDS::Wire(OutInlet);
-  aPrsDef.myOutlet = TopoDS::Wire(OutOutlet);
-  aPrsDef.myLeftBank = TopoDS::Wire(OutLeftB);
-  aPrsDef.myRightBank = TopoDS::Wire(OutRightB);
-  if (!WireIntersections)
+  aPrsDef.myInlet = OutInlet;
+  aPrsDef.myOutlet = OutOutlet;
+  aPrsDef.myLeftBank = OutLeftB;
+  aPrsDef.myRightBank = OutRightB;
+  if (ProjStat)
     aPrsDef.myPrs2D = Out2dPres;
   aPrsDef.myPrs3D = Out3dPres;
 
-  if (WireIntersections)
-    aPanel->addWarning(tr("STREAM_SELF_INTERSECTIONS"));
+  if (!ProjStat)
+    aPanel->addWarning(tr("STREAM_PROJECTION_FAILED"));
 
   myPreviewPrs->setShape( aPrsDef.myPrs2D );
 }
index e19e9fad620280277b88133f4742e4af7bc5ed9e..2dabcab2e592316f4ad69b2d57241504790b28e3 100644 (file)
@@ -255,8 +255,8 @@ All supported formats (*.brep *.iges *.igs *.step *.stp)</translation>
       <translation>Stream Warnings</translation>
     </message>
      <message>
-      <source>STREAM_SELF_INTERSECTIONS</source>
-      <translation>Warning: intersection(s) of banks/profiles are found</translation>
+      <source>STREAM_PROJECTION_FAILED</source>
+      <translation>Warning: Projection of banks/profiles are failed</translation>
     </message>
     <message>
       <source>PREF_TAB_GENERAL</source>
@@ -2392,6 +2392,11 @@ file cannot be correctly imported for an Obstacle definition.</translation>
       <source>DBF_LOAD_ERROR</source>
       <translation>Cannot load DBF file</translation>
     </message>
+    <message>
+      <source>DBF_NB_RECORDS_IS_NULL</source>
+      <translation>DBF Warning</translation>
+    </message>
+
     <message>
       <source>FILE_ISNT_CHOSEN</source>
       <translation>File isn't chosen</translation>
@@ -2410,6 +2415,12 @@ file cannot be correctly imported for an Obstacle definition.</translation>
       <translation>Cannot open DBF file or it's corrupted</translation>
     </message>
 
+   <message>
+      <source>DBF_NB_RECORDS_IS_NULL_MESS</source>
+      <translation>Cannot use DBF data - number of records is null</translation>
+    </message>
+
+
   </context>
 
   <context>
index 7963b776caa4dc2310a23d4932d4db6a620f302f..cb233c5c8f03c41143c9cc5766f7dbae654ecdca 100644 (file)
@@ -40,8 +40,8 @@ public:
   /**
    * Returns true if given polyline can be used as stream axis.
    */
-  static bool IsValidAsAxis( HYDROData_PolylineXY theAxis ) 
-  [bool ( const opencascade::handle<HYDROData_PolylineXY>& )];
+  static bool IsValidAsAxis( HYDROData_PolylineXY theAxis )
+  [bool ( const Handle_HYDROData_PolylineXY& )];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef =
       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
@@ -53,7 +53,7 @@ public:
     }
   %End
 
-public:      
+public:
   // Public methods to work with Stream data fields
 
   /**
@@ -80,12 +80,12 @@ public:
   [opencascade::handle<HYDROData_PolylineXY> ()];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef;
-    
+
     Py_BEGIN_ALLOW_THREADS
-    aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetHydraulicAxis() : 
+    aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetHydraulicAxis() :
                            sipCpp->GetHydraulicAxis();
     Py_END_ALLOW_THREADS
-    
+
     sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
   %End
 
@@ -150,15 +150,15 @@ public:
   [opencascade::handle<HYDROData_Polyline3D> ()];
   %MethodCode
     Handle(HYDROData_Polyline3D) aRef;
-    
+
     Py_BEGIN_ALLOW_THREADS
-    aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetBottomPolyline() : 
+    aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetBottomPolyline() :
                            sipCpp->GetBottomPolyline();
     Py_END_ALLOW_THREADS
-    
+
     sipRes = (HYDROData_Polyline3D*)createPointer( aRef );
   %End
-  
+
   /**
    * Sets reference bottom polyline object for stream.
    */
@@ -183,9 +183,19 @@ public:
    */
   virtual bool Interpolate( HYDROData_IProfilesInterpolator* theInterpolator );
 
+  /**
+   * Set vertical slicing step for profiles interpolation.
+   */
+  void   SetDDZ( double theDDZ );
+
+  /**
+   * Set horizontal step for profiles interpolation.
+   */
+  void   SetSpatialStep( double theSpatialStep );
+
 protected:
   /**
-   * Creates new object in the internal data structure. Use higher level objects 
+   * Creates new object in the internal data structure. Use higher level objects
    * to create objects with real content.
    */
   HYDROData_Stream();
index 9630670eb3cc012a4aec9ba7789fa733169ac396..5ef6d2d9529afa0b6042d491bb0535c1eebb8232 100644 (file)
@@ -277,7 +277,7 @@ bool TestViewer::AssertImages( QString& theMessage, const QImage* theImage, cons
   if( theCase )
     myKey = theCase;
 
-  QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
+  QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
   anExpectedRefFilePath += "/" + myKey + ".png";
   QImage anExpectedRefImage; 
   anExpectedRefImage.load( anExpectedRefFilePath );
@@ -380,7 +380,7 @@ bool TestViewer::areScriptsEqual( const QString& theBaseName,
                                   int theLinesToOmit,
                                   QString& theMsg )
 {
-  QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
+  QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
   anExpectedRefFilePath += "/" + theBaseName;
   
   QString anActualFilePath = QDir::tempPath() + "/" + theBaseName;
index d315e492bf8d8dbedb9049569c1182de1ee1efce..dedc104ae2953e6c80266f2175cdd9634a2cf739 100644 (file)
@@ -121,5 +121,5 @@ SET(REFERENCE_DATA
 
 # Application tests
 
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_BINS}/test)
+SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_BINS}/test/HYDRO)
 INSTALL(FILES ${REFERENCE_DATA} DESTINATION ${TEST_INSTALL_DIRECTORY})
index 028435ec70e4db8ebc7a7eb1ee14a9745b54b327..369807de4473c18df94d41e40a5d5042f0aa0228 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Channel.png and b/src/HYDRO_tests/reference_data/Channel.png differ
index f42860b178d50f9b26419d29b617f72f77868628..4ddd4ec9263b01630f70766855be7323170bf1dd 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/stream_dtm_2d.png and b/src/HYDRO_tests/reference_data/stream_dtm_2d.png differ
index caa7ef13f8b81c4e25624160ea84ba077cf72402..dca76771398db752ab5620ac83495c227febb075 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/stream_dtm_3d.png and b/src/HYDRO_tests/reference_data/stream_dtm_3d.png differ
index 028684913046d63529a264a6f9289b7e4f055971..1d4b877c16cebb466cb58339d3b647b4d13ad1f6 100644 (file)
@@ -34,7 +34,7 @@
 #include <BRepTools.hxx>
 
 
-QString REF_DATA_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
+QString REF_DATA_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
 
 
 void test_HYDROData_CalcCase::test_add_int_wires()
index 752811948dccf863a0a47f3764804645e97f23c3..b4007ceaab6b03cbaab3386bb72d37b7f12274aa 100644 (file)
@@ -21,7 +21,7 @@
 #include <QStringList>
 #include <vector>
 
-const QString REF_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
+const QString REF_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
 
 bool test_HYDROData_ShapeFile::compare_two_files(const QString& File1, const QString& File2)
 {