QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aName = GetObjPyName();
+ int interpMethod = GetInterpolationMethod();
+ QString anInterpMethod = QString::number( interpMethod );
+ aResList << QString( "%1.SetInterpolationMethod( %2 )" ).arg( aName ).arg( anInterpMethod );
+
Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aHydAxis, "SetHydraulicAxis" );
setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aBottomPolyline, "SetBottomPolyline" );
}
- QString aDDZs = QString::number( GetDDZ(), 'f', 3 );
- QString aSSteps = QString::number( GetSpatialStep(), 'f', 3 );
- aResList << QString( "%1.SetDDZ( %2 )" ).arg( aName ).arg( aDDZs );
- aResList << QString( "%1.SetSpatialStep( %2 )" ).arg( aName ).arg( aSSteps );
+ if (interpMethod==0)
+ {
+ QString aDDZs = QString::number( GetDDZ(), 'f', 3 );
+ QString aSSteps = QString::number( GetSpatialStep(), 'f', 3 );
+ aResList << QString( "%1.SetDDZ( %2 )" ).arg( aName ).arg( aDDZs );
+ aResList << QString( "%1.SetSpatialStep( %2 )" ).arg( aName ).arg( aSSteps );
+ }
+ else if (interpMethod==1)
+ {
+ Handle(HYDROData_PolylineXY) aLeftBank = GetLeftBank();
+ setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aLeftBank, "SetLeftBank" );
+ Handle(HYDROData_PolylineXY) aRightBank = GetRightBank();
+ setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aRightBank, "SetRightBank" );
+
+ QString aHaxStep = QString::number( GetHaxStep(), 'f', 3 );
+ QString aNbProfilePoints = QString::number( GetNbProfilePoints() );
+ aResList << QString( "%1.SetHaxStep( %2 )" ).arg( aName ).arg( aHaxStep );
+ aResList << QString( "%1.SetNbProfilePoints( %2 )" ).arg( aName ).arg( aNbProfilePoints );
+ }
aResList << QString( "" );
aResList << QString( "%1.Update()" ).arg( aName );
*/
HYDRODATA_EXPORT virtual void RemoveHydraulicAxis();
- HYDRODATA_EXPORT Handle(HYDROData_PolylineXY) GetLeftBank() const;
+ HYDRODATA_EXPORT virtual Handle(HYDROData_PolylineXY) GetLeftBank() const;
- HYDRODATA_EXPORT void SetLeftBank( const Handle(HYDROData_PolylineXY)& theBank );
+ HYDRODATA_EXPORT virtual void SetLeftBank( const Handle(HYDROData_PolylineXY)& theBank );
- HYDRODATA_EXPORT Handle(HYDROData_PolylineXY) GetRightBank() const;
+ HYDRODATA_EXPORT virtual Handle(HYDROData_PolylineXY) GetRightBank() const;
- HYDRODATA_EXPORT void SetRightBank( const Handle(HYDROData_PolylineXY)& theBank );
+ HYDRODATA_EXPORT virtual void SetRightBank( const Handle(HYDROData_PolylineXY)& theBank );
/**
* Returns true if profile has the intersection with the given hydraulic axis.
* Returns the parameter of inresection point on axis if axis is presented by one curve,
HYDRODATA_EXPORT void SetDDZ( double theDDZ );
HYDRODATA_EXPORT int GetInterpolationMethod() const;
- HYDRODATA_EXPORT void SetInterpolationMethod( int theDDZ );
+ HYDRODATA_EXPORT void SetInterpolationMethod( int theMode );
HYDRODATA_EXPORT double GetSpatialStep() const;
HYDRODATA_EXPORT void SetSpatialStep( double theSpatialStep );
}
%End
+ /**
+ * Sets the left bank object for stream. (LISM method only)
+ */
+ void SetLeftBank( HYDROData_PolylineXY theBank )
+ [void ( const opencascade::handle<HYDROData_PolylineXY>& )];
+ %MethodCode
+ Handle(HYDROData_PolylineXY) aRef =
+ Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
+ if ( !aRef.IsNull() )
+ {
+ Py_BEGIN_ALLOW_THREADS
+ sipSelfWasArg ? sipCpp->HYDROData_Stream::SetLeftBank( aRef ):
+ sipCpp->SetLeftBank( aRef );
+ Py_END_ALLOW_THREADS
+ }
+ %End
+
+ /**
+ * Returns the left bank object of stream. (LISM method only)
+ */
+ HYDROData_PolylineXY GetLeftBank() const
+ [opencascade::handle<HYDROData_PolylineXY> ()];
+ %MethodCode
+ Handle(HYDROData_PolylineXY) aRef;
+
+ Py_BEGIN_ALLOW_THREADS
+ aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetLeftBank() :
+ sipCpp->GetLeftBank();
+ Py_END_ALLOW_THREADS
+
+ sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
+ %End
+
+ /**
+ * Sets the right bank object for stream. (LISM method only)
+ */
+ void SetRightBank( HYDROData_PolylineXY theBank )
+ [void ( const opencascade::handle<HYDROData_PolylineXY>& )];
+ %MethodCode
+ Handle(HYDROData_PolylineXY) aRef =
+ Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
+ if ( !aRef.IsNull() )
+ {
+ Py_BEGIN_ALLOW_THREADS
+ sipSelfWasArg ? sipCpp->HYDROData_Stream::SetRightBank( aRef ):
+ sipCpp->SetRightBank( aRef );
+ Py_END_ALLOW_THREADS
+ }
+ %End
+
+ /**
+ * Returns the right bank object of stream. (LISM method only)
+ */
+ HYDROData_PolylineXY GetRightBank() const
+ [opencascade::handle<HYDROData_PolylineXY> ()];
+ %MethodCode
+ Handle(HYDROData_PolylineXY) aRef;
+
+ Py_BEGIN_ALLOW_THREADS
+ aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetRightBank() :
+ sipCpp->GetRightBank();
+ Py_END_ALLOW_THREADS
+
+ sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
+ %End
+
/**
* Add interpolated profiles into the stream.
* \param theInterpolator the interpolator
virtual bool Interpolate( HYDROData_IProfilesInterpolator* theInterpolator );
/**
- * Set vertical slicing step for profiles interpolation.
+ * Set vertical slicing step for profiles interpolation. (DTM method only)
*/
void SetDDZ( double theDDZ );
/**
- * Set horizontal step for profiles interpolation.
+ * Set horizontal step for profiles interpolation. (DTM method only)
*/
void SetSpatialStep( double theSpatialStep );
+ /**
+ * Set interpolation method (DTM or LISM).
+ */
+ void SetInterpolationMethod( int theMode );
+
+ /**
+ * Set horizontal step on hydr. axis for profiles interpolation. (LISM method)
+ */
+ void SetHaxStep( double theHaxStep );
+
+ /**
+ * Set number of points on profiles to insert (LISM method)
+ */
+ void SetNbProfilePoints( int theNbPoints );
+
protected:
/**
* Creates new object in the internal data structure. Use higher level objects