HYDROData_ShapeFile.h
HYDROData_LandCoverMap.h
HYDROData_LCM_FaceClassifier.h
-
+ HYDROData_DTM.h
)
set(PROJECT_SOURCES
HYDROData_ShapeFile.cxx
HYDROData_LandCoverMap.cxx
HYDROData_LCM_FaceClassifier.cxx
-
+ HYDROData_DTM.cxx
)
add_definitions(
#include "HYDROData_Document.h"
#include "HYDROData_Tool.h"
#include "HYDROData_PolylineXY.h"
+#include "HYDROData_QuadtreeNode.hxx"
#include <gp_XY.hxx>
#include <gp_XYZ.hxx>
#define HYDROData_Bathymetry_HeaderFile
#include "HYDROData_IAltitudeObject.h"
-#include "HYDROData_QuadtreeNode.hxx"
-
-#ifndef LIGHT_MODE
-#include <vtkPolyData.h>
-#include <vtkIdList.h>
-#endif
class QFile;
class gp_XYZ;
class gp_XY;
class Handle_HYDROData_PolylineXY;
-
+class HYDROData_QuadtreeNode;
+class vtkPolyData;
+class vtkIdList;
DEFINE_STANDARD_HANDLE(HYDROData_Bathymetry, HYDROData_IAltitudeObject)
--- /dev/null
+
+#include <HYDROData_DTM.h>
+#include <HYDROData_Profile.h>
+
+#include <Geom2d_BSplineCurve.hxx>
+#include <Geom2dAPI_Interpolate.hxx>
+#include <TColgp_HArray1OfPnt2d.hxx>
+#include <TColgp_Array1OfVec2d.hxx>
+#include <TColStd_HArray1OfBoolean.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Wire.hxx>
+#include <TopExp_Explorer.hxx>
+#include <BRep_Tool.hxx>
+#include <gp_Ax3.hxx>
+#include <Geom_Line.hxx>
+#include <Geom2d_Line.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
+#include <TColStd_Array1OfReal.hxx>
+#include <TColStd_Array1OfInteger.hxx>
+#include <TColgp_Array1OfPnt.hxx>
+
+IMPLEMENT_STANDARD_HANDLE( HYDROData_DTM, HYDROData_Bathymetry )
+IMPLEMENT_STANDARD_RTTIEXT( HYDROData_DTM, HYDROData_Bathymetry )
+
+HYDROData_DTM::HYDROData_DTM()
+{
+}
+
+HYDROData_DTM::~HYDROData_DTM()
+{
+}
+
+
+void GetProperties( const Handle_HYDROData_Profile& theProfile,
+ gp_Pnt& theLowestPoint,
+ gp_Vec2d& theDir,
+ bool isNormalDir )
+{
+ theLowestPoint = theProfile->GetBottomPoint();
+
+ gp_XY aLeft, aRight;
+ theProfile->GetLeftPoint( aLeft, true, true );
+ theProfile->GetRightPoint( aRight, true, true );
+ double x = aRight.X()-aLeft.X();
+ double y = aRight.Y()-aLeft.Y();
+ if( isNormalDir )
+ theDir = gp_Vec2d( -y, x );
+ else
+ theDir = gp_Vec2d( x, y );
+}
+
+inline gp_Pnt2d To2D( const gp_Pnt& thePnt, const gp_Trsf& theTr )
+{
+ gp_Pnt p = thePnt.Transformed( theTr );
+ return gp_Pnt2d( p.X(), p.Z() );
+}
+
+Handle(TColgp_HArray1OfPnt2d) To2D( const TColgp_Array1OfPnt& thePoints, const gp_Trsf& theTr )
+{
+ int low = thePoints.Lower(), up = thePoints.Upper();
+ Handle(TColgp_HArray1OfPnt2d) points = new TColgp_HArray1OfPnt2d( low, up );
+ for( int i=low; i<=up; i++ )
+ points->SetValue( i, To2D( thePoints.Value( i ), theTr ) );
+ return points;
+}
+
+Handle(Geom2d_Curve) CurveTo2D( const Handle(Geom_Curve)& theCurve,
+ Standard_Real theFirst, Standard_Real theLast,
+ const gp_Trsf& theTr )
+{
+ if( theCurve->IsKind( STANDARD_TYPE( Geom_Line ) ) )
+ {
+ gp_Pnt aFirstPnt, aLastPnt;
+ theCurve->D0( theFirst, aFirstPnt );
+ theCurve->D0( theLast, aLastPnt );
+
+ gp_Pnt2d
+ aFirst2d = To2D( aFirstPnt, theTr ),
+ aLast2d = To2D( aLastPnt, theTr );
+
+ gp_Vec2d dir( aFirst2d, aLast2d );
+ Handle_Geom2d_Line aLine2d = new Geom2d_Line( aFirst2d, gp_Dir2d( dir.X(), dir.Y() ) );
+ return new Geom2d_TrimmedCurve( aLine2d, 0, aLast2d.Distance( aFirst2d ) );
+ }
+
+ if( theCurve->IsKind( STANDARD_TYPE( Geom_BSplineCurve ) ) )
+ {
+ Handle(Geom_BSplineCurve) aSpline = Handle(Geom_BSplineCurve)::DownCast( theCurve );
+
+ Handle(TColgp_HArray1OfPnt2d) poles = To2D( aSpline->Poles(), theTr );
+ const TColStd_Array1OfReal& knots = aSpline->Knots();
+ const TColStd_Array1OfInteger& multiplicities = aSpline->Multiplicities();
+ int aDegree = aSpline->Degree();
+
+ return new Geom2d_BSplineCurve( poles->Array1(), knots, multiplicities, aDegree );
+ }
+
+ return Handle(Geom2d_Curve)();
+}
+
+Handle_Geom2d_BSplineCurve HYDROData_DTM::CreateHydraulicAxis(
+ const std::vector<Handle_HYDROData_Profile>& theProfiles )
+{
+ size_t n = theProfiles.size();
+ Handle_Geom2d_BSplineCurve aResult;
+
+ Handle(TColgp_HArray1OfPnt2d) points = new TColgp_HArray1OfPnt2d( 1, (int)n );
+ TColgp_Array1OfVec2d tangents( 1, (int)n );
+ Handle(TColStd_HArray1OfBoolean) flags = new TColStd_HArray1OfBoolean( 1, (int)n );
+
+ for( size_t i = 1; i <= n; i++ )
+ {
+ Handle_HYDROData_Profile aProfile = theProfiles[i-1];
+ gp_Pnt aLowest;
+ gp_Vec2d aTangent;
+ GetProperties( aProfile, aLowest, aTangent, true );
+ aTangent.Normalize();
+
+ points->SetValue( (int)i, gp_Pnt2d( aLowest.X(), aLowest.Y() ) );
+ tangents.SetValue( (int)i, aTangent );
+ flags->SetValue( (int)i, Standard_True );
+ }
+
+ Geom2dAPI_Interpolate anInterpolator( points, Standard_False, Standard_False );
+ anInterpolator.Load( tangents, flags );
+ anInterpolator.Perform();
+ if( anInterpolator.IsDone() )
+ aResult = anInterpolator.Curve();
+ return aResult;
+}
+
+std::vector<Handle_Geom2d_Curve> HYDROData_DTM::ProfileToParametric( const Handle_HYDROData_Profile& theProfile )
+{
+ std::vector<Handle_Geom2d_Curve> curves;
+ theProfile->Update();
+
+ // Transformation of the coordinate systems
+ gp_Pnt aLowest;
+ gp_Vec2d aDir;
+ GetProperties( theProfile, aLowest, aDir, false );
+
+ gp_Ax3 aStd3d( gp_Pnt( 0, 0, 0 ), gp_Dir( 0, 0, 1 ), gp_Dir( 1, 0, 0 ) );
+ gp_Ax3 aLocal( aLowest, gp_Dir( 0, 0, 1 ), gp_Dir( aDir.X(), aDir.Y(), 0 ) );
+
+ gp_Trsf aTransf;
+ aTransf.SetTransformation( aStd3d, aLocal );
+
+ // Iteration via edges
+ TopoDS_Wire aWire = TopoDS::Wire( theProfile->GetShape3D() );
+ TopExp_Explorer anExp( aWire, TopAbs_EDGE );
+ for( ; anExp.More(); anExp.Next() )
+ {
+ // Extract an edge from wire
+ TopoDS_Edge anEdge = TopoDS::Edge( anExp.Current() );
+
+ // Extract a curve corresponding to the edge
+ TopLoc_Location aLoc;
+ Standard_Real aFirst, aLast;
+ Handle(Geom_Curve) aCurve = BRep_Tool::Curve( anEdge, aLoc, aFirst, aLast );
+
+ // Convert the curve to 2d CS
+ Handle(Geom2d_Curve) aCurve2d = CurveTo2D( aCurve, aFirst, aLast, aTransf );
+ if( !aCurve2d.IsNull() )
+ curves.push_back( aCurve2d );
+ }
+ return curves;
+}
+
+void HYDROData_DTM::ProfileDiscretization( const Handle_HYDROData_Profile& theProfile,
+ double theMinZ, double theMaxZ, double theDDZ,
+ CurveUZ& theMidPointCurve,
+ CurveUZ& theWidthCurve )
+{
+ /*for( double z = theMinZ; z<=theMaxZ; z += theDDZ )
+ {
+
+ }*/
+}
+
+void HYDROData_DTM::Interpolate( const CurveUZ& theCurveA, const CurveUZ& theCurveB,
+ int theNbSteps, std::vector<CurveUZ>& theInterpolation )
+{
+}
+
+void HYDROData_DTM::CurveTo3d( const CurveUZ& theCurve, const CurveUZ& theCurveB,
+ int theNbSteps, std::vector<CurveUZ>& theInterpolation )
+{
+}
--- /dev/null
+// Copyright (C) 2014-2015 EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef HYDROData_DTM_HeaderFile
+#define HYDROData_DTM_HeaderFile
+
+#include "HYDROData_Bathymetry.h"
+#include <vector>
+
+class Handle_HYDROData_Profile;
+class Handle_Geom2d_BSplineCurve;
+class Handle_Geom2d_Curve;
+
+DEFINE_STANDARD_HANDLE( HYDROData_DTM, HYDROData_Bathymetry )
+
+/**\class HYDROData_DTM
+ * \brief Class that represents the Digital Terrain Model
+ */
+class HYDROData_DTM : public HYDROData_Bathymetry
+{
+protected:
+ /**
+ * Enumeration of tags corresponding to the persistent object parameters.
+ */
+ enum DataTag
+ {
+ DataTag_First = HYDROData_Bathymetry::DataTag_First + 100, ///< first tag, to reserve
+ };
+
+public:
+ DEFINE_STANDARD_RTTI( HYDROData_DTM );
+
+protected:
+ friend class HYDROData_Iterator;
+ friend class test_HYDROData_DTM;
+
+ HYDRODATA_EXPORT HYDROData_DTM();
+ virtual HYDRODATA_EXPORT ~HYDROData_DTM();
+
+ struct PointUZ
+ {
+ double U;
+ double Z;
+ };
+ class CurveUZ : public std::vector<PointUZ>
+ {
+ public:
+ CurveUZ( double theXCurv );
+ ~CurveUZ();
+
+ private:
+ double Xcurv;
+ };
+
+ static Handle_Geom2d_BSplineCurve CreateHydraulicAxis( const std::vector<Handle_HYDROData_Profile>& theProfiles );
+
+ static std::vector<Handle_Geom2d_Curve> ProfileToParametric( const Handle_HYDROData_Profile& theProfile );
+
+ static void ProfileDiscretization( const Handle_HYDROData_Profile& theProfile,
+ double theMinZ, double theMaxZ, double theDDZ,
+ CurveUZ& theMidPointCurve,
+ CurveUZ& theWidthCurve );
+
+ static void Interpolate( const CurveUZ& theCurveA, const CurveUZ& theCurveB,
+ int theNbSteps, std::vector<CurveUZ>& theInterpolation );
+
+ static void CurveTo3d( const CurveUZ& theCurve, const CurveUZ& theCurveB,
+ int theNbSteps, std::vector<CurveUZ>& theInterpolation );
+};
+
+#endif
const ObjectKind KIND_LAND_COVER_OBSOLETE = 27;
const ObjectKind KIND_CHANNEL_ALTITUDE = 28;
const ObjectKind KIND_LAND_COVER_MAP = 29;
+const ObjectKind KIND_DTM = 30;
const ObjectKind KIND_LAST = KIND_LAND_COVER_MAP;
DEFINE_STANDARD_HANDLE(HYDROData_Entity, MMgt_TShared)
#include "HYDROData_VisualState.h"
#include "HYDROData_Zone.h"
#include "HYDROData_StricklerTable.h"
+#include "HYDROData_DTM.h"
#include <TDataStd_Name.hxx>
#include <TDataStd_NamedData.hxx>
case KIND_LAND_COVER_OBSOLETE: break;
case KIND_CHANNEL_ALTITUDE: aResult = new HYDROData_ChannelAltitude(); break;
case KIND_LAND_COVER_MAP: aResult = new HYDROData_LandCoverMap(); break;
+ case KIND_DTM: aResult = new HYDROData_DTM(); break;
default: break;
}
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
ObjectKind anAltitudeObjectType = getAltitudeObjectType();
- DEBTRACE("HYDROData_Object::checkAndSetAltitudeObject anAltitudeObjectType="<< anAltitudeObjectType);
+ //DEBTRACE("HYDROData_Object::checkAndSetAltitudeObject anAltitudeObjectType="<< anAltitudeObjectType);
if ( anAltitudeObjectType == KIND_UNKNOWN )
return; // No need to create altitude object
aSplitCurves.end();
for (int iw=0; aCIt != aLastCIt; ++aCIt, iw++)
{
- std::stringstream brepName;
+ /*std::stringstream brepName;
brepName << "theSplitWire_";
brepName << iw;
brepName << ".brep";
- BRepTools::Write(aCIt->Wire() , brepName.str().c_str() );
+ BRepTools::Write(aCIt->Wire() , brepName.str().c_str() );*/
aResult.push_back(aCIt->Wire());
}
}
if ( theShape.IsNull() )
return false;
- std::string brepName = this->GetName().toStdString();
- brepName += ".brep";
- BRepTools::Write( theShape, brepName.c_str() );
+ //std::string brepName = this->GetName().toStdString();
+ //brepName += ".brep";
+ //BRepTools::Write( theShape, brepName.c_str() );
RemoveSections();
#define HYDROData_Profile_HeaderFile
#include "HYDROData_Object.h"
-
#include "HYDROData_ProfileUZ.h"
DEFINE_STANDARD_HANDLE(HYDROData_Profile, HYDROData_Object)
const TopoDS_Wire& theWire,
std::deque<std::list<double> >& theParameters) const
{
- std::string brepName = "theWireToIntersect";
- brepName += ".brep";
- BRepTools::Write( theWire, brepName.c_str() );
+ //std::string brepName = "theWireToIntersect";
+ //brepName += ".brep";
+ //BRepTools::Write( theWire, brepName.c_str() );
int aIntCount = 0;
theParameters.resize(myEdges.size());
test_HYDROGUI_Shape.h
test_HYDROGUI_LandCoverMapDlg.h
test_Dependencies.h
+ test_HYDROData_DTM.h
TestShape.h
TestViewer.h
test_HYDROData_Profile.cxx
test_HYDROData_ShapeFile.cxx
test_HYDROData_StricklerTable.cxx
+ test_HYDROData_DTM.cxx
test_HYDROGUI_ListModel.cxx
test_HYDROGUI_Shape.cxx
test_HYDROGUI_LandCoverMapDlg.cxx
../HYDROData/HYDROData_QuadTree.cxx
../HYDROData/HYDROData_QuadTreeNode.cxx
../HYDROData/HYDROData_LCM_FaceClassifier.cxx
+ ../HYDROData/HYDROData_DTM.cxx
../HYDROGUI/HYDROGUI_ListModel.cxx
../HYDROGUI/HYDROGUI_DataObject.cxx
--- /dev/null
+// Copyright (C) 2014-2015 EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <test_HYDROData_DTM.h>
+#include <HYDROData_Document.h>
+#include <HYDROData_DTM.h>
+#include <HYDROData_Profile.h>
+#include <Geom2d_Curve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
+#include <gp_XY.hxx>
+#include <gp_Pnt2d.hxx>
+#include <TColgp_Array1OfPnt2d.hxx>
+
+const double EPS = 1E-3;
+
+void test_HYDROData_DTM::test_creation()
+{
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ Handle(HYDROData_DTM) DTM =
+ Handle(HYDROData_DTM)::DownCast( aDoc->CreateObject( KIND_DTM ) );
+
+ CPPUNIT_ASSERT_EQUAL( false, (bool)DTM.IsNull() );
+
+ aDoc->Close();
+}
+
+void test_HYDROData_DTM::test_profile_conversion_to_2d()
+{
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ Handle(HYDROData_Profile) aProfile1 =
+ Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
+
+ Handle(HYDROData_Profile) aProfile2 =
+ Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
+
+ NCollection_Sequence<HYDROData_IPolyline::Point> points;
+ points.Append( gp_XY( 0.0, 5.0 ) );
+ points.Append( gp_XY( 1.0, 1.0 ) );
+ points.Append( gp_XY( 1.5, 0.0 ) );
+ points.Append( gp_XY( 4.0, 4.0 ) );
+
+ aProfile1->SetParametricPoints( points );
+ aProfile1->GetProfileUZ()->SetSectionType( 0, HYDROData_IPolyline::SECTION_POLYLINE );
+ aProfile1->SetLeftPoint( gp_XY( 10, 10 ) );
+ aProfile1->SetRightPoint( gp_XY( 20, 20 ) );
+
+ aProfile2->SetParametricPoints( points );
+ aProfile2->GetProfileUZ()->SetSectionType( 0, HYDROData_IPolyline::SECTION_SPLINE );
+ aProfile2->SetLeftPoint( gp_XY( 10, 10 ) );
+ aProfile2->SetRightPoint( gp_XY( 20, 20 ) );
+
+ std::vector<Handle_Geom2d_Curve> curves1 = HYDROData_DTM::ProfileToParametric( aProfile1 );
+ std::vector<Handle_Geom2d_Curve> curves2 = HYDROData_DTM::ProfileToParametric( aProfile2 );
+
+ gp_Pnt2d aFirst, aLast;
+ CPPUNIT_ASSERT_EQUAL( 3, (int)curves1.size() );
+ curves1[0]->D0( curves1[0]->FirstParameter(), aFirst );
+ curves1[0]->D0( curves1[0]->LastParameter(), aLast );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -5.303, aFirst.X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0, aFirst.Y(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -1.768, aLast.X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, aLast.Y(), EPS );
+ curves1[1]->D0( curves1[1]->FirstParameter(), aFirst );
+ curves1[1]->D0( curves1[1]->LastParameter(), aLast );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -1.768, aFirst.X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, aFirst.Y(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, aLast.X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, aLast.Y(), EPS );
+ curves1[2]->D0( curves1[2]->FirstParameter(), aFirst );
+ curves1[2]->D0( curves1[2]->LastParameter(), aLast );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, aFirst.X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, aFirst.Y(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 8.839, aLast.X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 4.0, aLast.Y(), EPS );
+
+ CPPUNIT_ASSERT_EQUAL( 1, (int)curves2.size() );
+ Handle(Geom2d_BSplineCurve) aBSpline = Handle(Geom2d_BSplineCurve)::DownCast( curves2[0] );
+ CPPUNIT_ASSERT_EQUAL( false, (bool)aBSpline.IsNull() );
+ const TColgp_Array1OfPnt2d& poles = aBSpline->Poles();
+ CPPUNIT_ASSERT_EQUAL( 1, (int)poles.Lower() );
+ CPPUNIT_ASSERT_EQUAL( 8, (int)poles.Upper() );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -5.303, poles.Value( 1 ).X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0, poles.Value( 1 ).Y(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -4.125, poles.Value( 2 ).X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.667, poles.Value( 2 ).Y(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -3.150, poles.Value( 3 ).X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.120, poles.Value( 3 ).Y(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -1.242, poles.Value( 4 ).X(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.574, poles.Value( 4 ).Y(), EPS );
+
+ aDoc->Close();
+}
--- /dev/null
+// Copyright (C) 2014-2015 EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <cppunit/extensions/HelperMacros.h>
+
+class test_HYDROData_DTM : public CppUnit::TestFixture
+{
+ CPPUNIT_TEST_SUITE( test_HYDROData_DTM );
+ CPPUNIT_TEST( test_creation );
+ CPPUNIT_TEST( test_profile_conversion_to_2d );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void setUp() {}
+ void tearDown() {}
+
+ void test_creation();
+ void test_profile_conversion_to_2d();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( test_HYDROData_DTM );
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( test_HYDROData_DTM, "HYDROData_DTM" );
CppUnit::TestFactoryRegistry::getRegistry();
// Add the top suite to the test runner
TestLib_Runner runner;
- //QString aPath = qgetenv( "HYDRO_SRC_DIR" ) + "/src/tests.cfg";
- //runner.Load( aPath.toStdString() );
+ QString aPath = qgetenv( "HYDRO_SRC_DIR" ) + "/src/tests.cfg";
+ runner.Load( aPath.toStdString() );
runner.addTest( registry.makeTest() );
try
{