}
QStringList HYDROData_Channel::DumpToPython( const QString& thePyScriptPath,
- MapOfTreatedObjects& theTreatedObjects ) const
+ MapOfTreatedObjects& theTreatedObjects ) const
{
QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aName = GetObjPyName();
Handle(HYDROData_Polyline3D) aRefGideLine = GetGuideLine();
setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aRefGideLine, "SetGuideLine" );
- Handle(HYDROData_Profile) aRefProfile = GetProfile();
- setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aRefProfile, "SetProfile" );
+ bool mode = GetProfileMode();
+ QString aMode = mode ? "True" : "False" ;
+ aResList << QString( "%1.SetProfileMode( %2 )" ).arg( aName ).arg( aMode );
+
+ if (mode)
+ {
+ Handle(HYDROData_Profile) aRefProfile = GetProfile();
+ setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aRefProfile, "SetProfile" );
+ }
+ else
+ {
+ QString aLC = QString::number( GetLCValue(), 'f', 3 );
+ QString aDeltaZ = QString::number( GetDeltaZValue(), 'f', 3 );
+ QString aCoteZ = QString::number( GetCoteZValue(), 'f', 3 );
+
+ aResList << QString( "%1.SetLCValue( %2 )" ).arg( aName ).arg( aLC );
+ aResList << QString( "%1.SetDeltaZValue( %2 )" ).arg( aName ).arg( aDeltaZ );
+ aResList << QString( "%1.SetCoteZValue( %2 )" ).arg( aName ).arg( aCoteZ );
+ }
aResList << QString( "%1.SetEquiDistance( %2 )" ).arg( aName ).arg( GetEquiDistance() );
aResList << QString( "" );
return aResList;
+
}
HYDROData_SequenceOfObjects HYDROData_Channel::GetAllReferenceObjects() const
void SetEquiDistance( double );
double GetEquiDistance() const;
+
+ void SetLCValue( double );
+ double GetLCValue() const;
+
+ void SetDeltaZValue( double );
+ double GetDeltaZValue() const;
+
+ void SetCoteZValue( double );
+ double GetCoteZValue() const;
+
+ void SetProfileMode( bool );
+ bool GetProfileMode() const;
protected: