#include "HYDROData_Bathymetry.h"
#include <vector>
+#include <gp_Pnt2d.hxx>
class Handle_HYDROData_Profile;
class Handle_Geom2d_BSplineCurve;
class Handle_Geom2d_Curve;
+class gp_Pnt;
+class gp_Vec2d;
+class TopoDS_Edge;
DEFINE_STANDARD_HANDLE( HYDROData_DTM, HYDROData_Bathymetry )
enum DataTag
{
DataTag_First = HYDROData_Bathymetry::DataTag_First + 100, ///< first tag, to reserve
+ DataTag_Profiles,
+ DataTag_DDZ,
+ DataTag_SpatialStep,
};
public:
DEFINE_STANDARD_RTTI( HYDROData_DTM );
-protected:
- friend class HYDROData_Iterator;
- friend class test_HYDROData_DTM;
+ HYDRODATA_EXPORT HYDROData_SequenceOfObjects GetProfiles() const;
+ HYDRODATA_EXPORT void SetProfiles( const HYDROData_SequenceOfObjects& );
- HYDRODATA_EXPORT HYDROData_DTM();
- virtual HYDRODATA_EXPORT ~HYDROData_DTM();
+ HYDRODATA_EXPORT double GetDDZ() const;
+ HYDRODATA_EXPORT void SetDDZ( double );
+ HYDRODATA_EXPORT double GetSpatialStep() const;
+ HYDRODATA_EXPORT void SetSpatialStep( double );
+
+ HYDRODATA_EXPORT virtual void Update();
+
+public:
struct PointUZ
{
+ PointUZ( double u=0, double z=0 ) { U=u; Z=z; }
double U;
double Z;
};
class CurveUZ : public std::vector<PointUZ>
{
public:
- CurveUZ( double theXcurv );
+ CurveUZ( double theXcurv, const gp_Vec2d& theProfileDir = gp_Vec2d() );
~CurveUZ();
double Xcurv() const;
+ gp_Vec2d ProfileDir() const;
CurveUZ operator + ( const CurveUZ& ) const;
CurveUZ operator * ( double ) const;
private:
double myXcurv;
+ gp_Vec2d myProfileDir;
};
+protected:
+ friend class HYDROData_Iterator;
+ friend class test_HYDROData_DTM;
+
+ HYDRODATA_EXPORT HYDROData_DTM();
+ virtual HYDRODATA_EXPORT ~HYDROData_DTM();
+
static Handle_Geom2d_BSplineCurve CreateHydraulicAxis(
const std::vector<Handle_HYDROData_Profile>& theProfiles,
std::vector<double>& theDistances );
static std::vector<Handle_Geom2d_Curve> ProfileToParametric( const Handle_HYDROData_Profile& theProfile,
- double& theUMin, double& theUMax );
+ double& theUMin, double& theUMax,
+ gp_Vec2d& theDir );
+
+ static void GetProperties( const Handle_HYDROData_Profile& theProfile,
+ gp_Pnt& theLowestPoint, gp_Vec2d& theDir,
+ bool isNormalDir,
+ double& theZMin, double& theZMax );
static void ProfileDiscretization( const Handle_HYDROData_Profile& theProfile,
double theXCurv, double theMinZ, double theMaxZ, double theDDZ,
CurveUZ& theWidthCurve,
double theTolerance = 1E-6 );
- static void CurveTo3d( const CurveUZ& theMidCurve, const CurveUZ& theWidthCurve, AltitudePoints& thePoints );
+ static void CurveTo3D( const Handle_Geom2d_BSplineCurve& theHydraulicAxis,
+ const CurveUZ& theMidCurve, const CurveUZ& theWidthCurve,
+ AltitudePoints& thePoints, double dz );
static void Interpolate( const CurveUZ& theCurveA, const CurveUZ& theCurveB,
int theNbSteps, std::vector<CurveUZ>& theInterpolation,
bool isAddSecond );
- static void Interpolate( const Handle_HYDROData_Profile& theProfileA,
- double theXCurvA,
- const Handle_HYDROData_Profile& theProfileB,
- double theXCurvB,
- double theDDZ, int theNbSteps, bool isAddSecond,
- AltitudePoints& thePoints );
-
- static void Interpolate( const std::vector<Handle_HYDROData_Profile>& theProfiles,
- double theDDZ, double theSpatialStep, AltitudePoints& thePoints );
+ static std::vector<AltitudePoints> Interpolate
+ ( const Handle_Geom2d_BSplineCurve& theHydraulicAxis,
+ const Handle_HYDROData_Profile& theProfileA,
+ double theXCurvA,
+ const Handle_HYDROData_Profile& theProfileB,
+ double theXCurvB,
+ double theDDZ, int theNbSteps, bool isAddSecond );
+
+ static AltitudePoints Interpolate( const std::vector<Handle_HYDROData_Profile>& theProfiles,
+ double theDDZ, double theSpatialStep,
+ AltitudePoints& theLeft,
+ AltitudePoints& theRight,
+ std::vector<AltitudePoints>& theMainProfiles );
};
#endif