+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
+ QString aProfileName = GetObjPyName();
+
+ //TCollection_AsciiString aFilePath = GetFilePath();
+ //if ( !aFilePath.IsEmpty() )
+ //{
+ // aResList << QString( "%1.ImportFromFile( \"%2\" );" )
+ // .arg( aName ).arg( aFilePath.ToCString() );
+ //}
+
+ bool anIsValidProfile = IsValid();
+
+ QStringList aPntsDefinition;
+ QString aPntsListName = HYDROData_Tool::GenerateNameForPython( theTreatedObjects, "profile_points" );
+
+ QString aGap = QString().fill( ' ', aPntsListName.length() + 5 );
+ if ( anIsValidProfile )
+ {
+ HYDROData_Profile::ProfilePoints aPointsList = GetProfilePoints( true );
+ for ( int k = 1, aNbPoints = aPointsList.Size(); k <= aNbPoints; ++k )
+ {
+ const ProfilePoint& aPoint = aPointsList.Value( k );
+ aPntsDefinition << QString( aGap + "gp_XYZ( %1, %2, %3 )%4" )
+ .arg( aPoint.X() ).arg( aPoint.Y() ).arg( aPoint.Z() )
+ .arg( ( k < aNbPoints ? "," : "" ) );
+ }
+ }
+ else
+ {
+ HYDROData_IPolyline::PointsList aPointsList = GetParametricPoints();
+ for ( int k = 1, aNbPoints = aPointsList.Size(); k <= aNbPoints; ++k )
+ {
+ const HYDROData_IPolyline::Point& aPoint = aPointsList.Value( k );
+ aPntsDefinition << QString( aGap + "gp_XY( %1, %2 )%3" )
+ .arg( aPoint.X() ).arg( aPoint.Y() )
+ .arg( ( k < aNbPoints ? "," : "" ) );
+ }
+ }