+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
+
+ QString anObstacleName = GetObjPyName();
+
+ TCollection_AsciiString aGeomObjectEntry = GetGeomObjectEntry();
+ QString aFilePath = GetFilePath();
+
+ if ( !aGeomObjectEntry.IsEmpty() )
+ {
+ QString aSalomeObjName = HYDROData_Tool::GenerateNameForPython( theTreatedObjects, "obstacle_sobj" );
+ // aResList << QString( "%1 = theStudy.FindObjectID( \"%2\" );" )
+ // .arg( aSalomeObjName ).arg( aGeomObjectEntry.ToCString() );
+ QString aGeomObjectName( GetGeomObjectName().ToCString() );
+ if ( !aGeomObjectName.isEmpty() ) {
+ aResList << QString( "%1 = theStudy.FindObjectByName( \"%2\", \"GEOM\" )[0];" )
+ .arg( aSalomeObjName ).arg( aGeomObjectName );
+
+ aResList << QString( "%1.ImportFromGeomIOR( %2.GetIOR() );" )
+ .arg( anObstacleName ).arg( aSalomeObjName );
+
+ aResList << QString( "%1.SetGeomObjectEntry( %2.GetID() );" )
+ .arg( anObstacleName ).arg( aSalomeObjName );
+ }
+ aResList << QString( "" );
+ }
+ else if ( !aFilePath.isEmpty() )
+ {
+ aResList << QString( "%1.ImportFromFile( \"%2\" );" )
+ .arg( anObstacleName ).arg( aFilePath );
+ aResList << QString( "" );
+ }
+
+ // Write the translation points
+ double aDx, aDy, aDz;
+ if ( getTranslation( aDx, aDy, aDz ) )
+ {
+ aResList << QString( "%1.Translate( %2, %3, %4 );" )
+ .arg( anObstacleName ).arg( aDx ).arg( aDy ).arg( aDz );
+ aResList << QString( "" );
+ }