]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0020532: [CEA] V5.1.3rc1 - Geom test fails
authordmv <dmv@opencascade.com>
Fri, 16 Oct 2009 08:11:12 +0000 (08:11 +0000)
committerdmv <dmv@opencascade.com>
Fri, 16 Oct 2009 08:11:12 +0000 (08:11 +0000)
src/IGESExport/IGESExport.cxx

index 23ecf22bc0dc1fd114c8ac34a43b77ab92acae78..d1ccdbf1ed99dc6889fe71ef68e2a410db3a6591 100644 (file)
@@ -73,6 +73,10 @@ IGESEXPORT_EXPORT
       if (theFormatName.IsEqual("IGES_5_3"))
         aBrepMode = 1;
 
+      // Set "C" numeric locale to save numbers correctly
+      std::string aCurLocale = setlocale(LC_NUMERIC, 0);
+      setlocale(LC_NUMERIC, "C");
+
       // initialize writer
       IGESControl_Controller::Init();
       //IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"),
@@ -83,7 +87,11 @@ IGESEXPORT_EXPORT
       // perform shape writing
       ICW.AddShape( theShape );
       ICW.ComputeModel();
-      if ( ICW.Write( theFileName.ToCString() ) )
+      bool ok = ICW.Write( theFileName.ToCString() );
+      
+      // Return previous locale
+      setlocale(LC_NUMERIC, aCurLocale.data());
+      if ( ok )
         return 1;
     }
     catch(Standard_Failure)