X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Document.cxx;h=5e38d577b6bb8093a71184ec00a93f38c3b3db9a;hb=0f4c16e80e5c9160fb6e240e3f09b151701a1e5b;hp=653ddb8e2dd0686962afd0c40b8858d3f85cd8e1;hpb=9dd90968eb8ad86e7e6ae67f48bb6110bd4ffbdc;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Document.cxx b/src/HYDROData/HYDROData_Document.cxx index 653ddb8e..5e38d577 100644 --- a/src/HYDROData/HYDROData_Document.cxx +++ b/src/HYDROData/HYDROData_Document.cxx @@ -237,7 +237,7 @@ bool HYDROData_Document::DumpToPython( const QString& thePyScriptPath, { // Try to open the file QFile aFile( thePyScriptPath ); - if ( !aFile.open( QIODevice::WriteOnly ) ) + if ( !aFile.open( QIODevice::WriteOnly | QFile::Text ) ) return false; MapOfTreatedObjects aTreatedObjects; @@ -253,7 +253,7 @@ bool HYDROData_Document::DumpToPython( const QString& thePyScriptPath, // Dump the local CS data to Python UpdateLCSFields(); - QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX ).arg( myLY ); + QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX, 0, 'f', 3 ).arg( myLY, 0, 'f', 3 ); if( theIsMultiFile ) aLCS.prepend( " " ); HYDROData_Tool::WriteStringsToFile( aFile, QStringList() << aLCS ); @@ -322,12 +322,12 @@ QStringList HYDROData_Document::DumpToPython( const QString& thePyScriptPath, aResScript << QString( "import salome" ); aResScript << QString( "" ); aResScript << QString( "def RebuildData( theStudy ):" ); - aResScript << QString( " %1 = HYDROData_Document.Document( theStudy._get_StudyId() );" ).arg( aDocName ); + aResScript << QString( " %1 = HYDROData_Document.Document( theStudy._get_StudyId() )" ).arg( aDocName ); } else { aResScript << QString( "" ); - aResScript << QString( "%1 = HYDROData_Document.Document( theStudy._get_StudyId() );" ).arg( aDocName ); + aResScript << QString( "%1 = HYDROData_Document.Document( theStudy._get_StudyId() )" ).arg( aDocName ); } return aResScript; @@ -831,6 +831,11 @@ void HYDROData_Document::Transform( gp_XYZ& thePnt, bool IsToLocalCS ) const thePnt = gp_XYZ( X, Y, Z ); } +void HYDROData_Document::Transform( double& X, double& Y, double& Z, bool IsToLocalCS ) const +{ + Transform( X, Y, IsToLocalCS ); +} + void HYDROData_Document::Transform( gp_XY& thePnt, bool IsToLocalCS ) const { double X = thePnt.X();