From: asl Date: Mon, 26 Oct 2015 11:52:01 +0000 (+0300) Subject: code revision X-Git-Tag: v1.5~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dde1dd28f577de6f01fef03a2ae7938848044f39;p=modules%2Fhydro.git code revision --- diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index 48ee53c6..34b413fa 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -848,8 +848,15 @@ NCollection_Sequence HYDROData_CalculationCase::GetAltitudesForPoints( double HYDROData_CalculationCase::GetStricklerCoefficientForPoint( const gp_XY& thePoint ) const { - //TODO: #652 - return 0.0; + Handle( HYDROData_LandCoverMap ) aMap = GetLandCoverMap(); + Handle( HYDROData_StricklerTable ) aTable = GetStricklerTable(); + if( aMap.IsNull() ) + return 0.0; + + QString aType; + aMap->FindByPoint( thePoint, aType ); + double aCoeff = aTable->Get( aType, 0.0 ); + return aCoeff; } Handle(HYDROData_Region) HYDROData_CalculationCase::GetRegionFromPoint( const gp_XY& thePoint ) const diff --git a/src/HYDRO_tests/TestViewer.cxx b/src/HYDRO_tests/TestViewer.cxx index a3d5054b..ce1f8eb5 100644 --- a/src/HYDRO_tests/TestViewer.cxx +++ b/src/HYDRO_tests/TestViewer.cxx @@ -238,12 +238,12 @@ Handle_Aspect_ColorScale TestViewer::showColorScale( bool isShow ) if( aColorScale.IsNull() ) return aColorScale; - Standard_Real anXPos = 0.05; //TODO - Standard_Real anYPos = 0.1; //TODO - Standard_Real aWidth = 0.2; //TODO - Standard_Real aHeight = 0.5; //TODO - Standard_Integer aTextHeight = 14; //TODO - Standard_Integer aNbIntervals = 30; //TODO + Standard_Real anXPos = 0.05; + Standard_Real anYPos = 0.1; + Standard_Real aWidth = 0.2; + Standard_Real aHeight = 0.5; + Standard_Integer aTextHeight = 14; + Standard_Integer aNbIntervals = 30; aColorScale->SetXPosition( anXPos ); aColorScale->SetYPosition( anYPos );