From 1ec93ac38cad3fabc1e9ee82b779edc5434089a4 Mon Sep 17 00:00:00 2001 From: adv Date: Fri, 24 Jan 2014 06:26:43 +0000 Subject: [PATCH] Minor changes. --- src/HYDROData/HYDROData_ObstacleAltitude.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.39.2