#include "HYDROData_ObstacleAltitude.h"
+
#include "HYDROData_Document.h"
+#include "HYDROData_Object.h"
+#include "HYDROData_Projection.h"
+
+#include <Precision.hxx>
-#include <QStringList>
+#include <TopoDS_Shape.hxx>
IMPLEMENT_STANDARD_HANDLE(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject)
{
double aResAltitude = GetInvalidAltitude();
- // TODO
+ Handle(HYDROData_Object) anObject =
+ Handle(HYDROData_Object)::DownCast( GetFatherObject() );
+ if ( anObject.IsNull() )
+ return aResAltitude;
+
+ TopoDS_Shape anObjectShape3D = anObject->GetShape3D();
+ if ( anObjectShape3D.IsNull() )
+ return aResAltitude;
+
+ gp_Pnt aHighestPoint;
+
+ HYDROData_Make3dMesh aMesher3D( anObjectShape3D, Precision::Intersection() );
+ aMesher3D.GetHighestOriginal( thePoint.X(), thePoint.Y(), aHighestPoint );
+ aResAltitude = aHighestPoint.Z();
return aResAltitude;
}