#include "HYDROData_PolylineXY.h"
#include "HYDROData_ProfileUZ.h"
#include "HYDROData_Profile.h"
+#include <TDataStd_Integer.hxx>
-#define _DEVDEBUG_
+//#define _DEVDEBUG_
#include "HYDRO_trace.hxx"
#include <QString>
distance *= aSign;
DEBTRACE("distance to guideline " << distance);
-
+
+ if (GetInvertDirection())
+ distance*=-1;
+
// get delta altitude on section (supposed symmetric) from guideline distance (aParam)
double delta = 0;
int i1 = 0;
}
if ((i1 == 0) && (i2 == 0))
{
- DEBTRACE("Projection aborted: non centered profile");
+ DEBTRACE("Projection aborted : non centered profile");
return aResAltitude;
}
else if (i1 == 0) // distance < - profile width
}
+void HYDROData_ChannelAltitude::SetInvertDirection(bool IsInverted)
+{
+ if ( GetInvertDirection() == IsInverted )
+ return;
+
+ TDataStd_Integer::Set( myLab.FindChild( DataTag_InvertDirection ), (Standard_Integer)IsInverted );
+}
+
+bool HYDROData_ChannelAltitude::GetInvertDirection() const
+{
+ bool aRes = false;
+
+ TDF_Label aLabel = myLab.FindChild( DataTag_InvertDirection, false );
+ if ( !aLabel.IsNull() )
+ {
+ Handle(TDataStd_Integer) anIntVal;
+ if ( aLabel.FindAttribute( TDataStd_Integer::GetID(), anIntVal ) )
+ aRes = (bool)anIntVal->Get();
+ }
+
+ return aRes;
+}