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 );
bool HYDROData_Stream::GenerateBottomPolyline()
{
// Get the document
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() ) {
return false;
}
bool HYDROData_Stream::Interpolate( HYDROData_IProfilesInterpolator* theInterpolator )
{
// Get the document
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() ) {
return false;
}
bool isGenerateNewName ) const
{
// Get the document
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() ) {
return;
}