]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Minor changes.
authoradv <adv@opencascade.com>
Fri, 24 Jan 2014 06:26:43 +0000 (06:26 +0000)
committeradv <adv@opencascade.com>
Fri, 24 Jan 2014 06:26:43 +0000 (06:26 +0000)
src/HYDROData/HYDROData_ObstacleAltitude.cxx

index 0c300146196f86a2839d6104966a3af6469e7d80..4d0679aaf6c47cd8b1f9dbefdb9cf79966c30d90 100644 (file)
@@ -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;
 }