Salome HOME
Merge commit '0d956a814' into pre/IMPS_2016
[modules/hydro.git] / src / HYDROData / HYDROData_Document.cxx
index 653ddb8e2dd0686962afd0c40b8858d3f85cd8e1..5e38d577b6bb8093a71184ec00a93f38c3b3db9a 100644 (file)
@@ -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();