From: adv Date: Fri, 24 Jan 2014 06:26:43 +0000 (+0000) Subject: Minor changes. X-Git-Tag: BR_hydro_v_1_0~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1ec93ac38cad3fabc1e9ee82b779edc5434089a4;p=modules%2Fhydro.git Minor changes. --- diff --git a/src/HYDROData/HYDROData_ObstacleAltitude.cxx b/src/HYDROData/HYDROData_ObstacleAltitude.cxx index 0c300146..4d0679aa 100644 --- a/src/HYDROData/HYDROData_ObstacleAltitude.cxx +++ b/src/HYDROData/HYDROData_ObstacleAltitude.cxx @@ -34,12 +34,12 @@ double HYDROData_ObstacleAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) if ( anObjectShape3D.IsNull() ) return aResAltitude; - gp_Pnt aHighestPoint; - HYDROData_Make3dMesh aMesher3D( anObjectShape3D, Precision::Intersection() ); - aMesher3D.GetHighestOriginal( thePoint.X(), thePoint.Y(), aHighestPoint ); - aResAltitude = aHighestPoint.Z(); + gp_Pnt aHighestPoint; + if ( aMesher3D.GetHighestOriginal( thePoint.X(), thePoint.Y(), aHighestPoint ) ) + aResAltitude = aHighestPoint.Z(); + return aResAltitude; }