From dde1dd28f577de6f01fef03a2ae7938848044f39 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 26 Oct 2015 14:52:01 +0300 Subject: [PATCH] code revision --- src/HYDROData/HYDROData_CalculationCase.cxx | 11 +++++++++-- src/HYDRO_tests/TestViewer.cxx | 12 ++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) 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 ); -- 2.39.2