X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FIGESExport%2FIGESExport.cxx;h=72e6cb2fa51e9bf8ca8f1c871ec0cbcb1f804df1;hb=debaa376dae156b3d72087d03f334fcca64dfa7b;hp=475b41db284d32f3394a6a0eacb73ddd4b798b51;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/IGESExport/IGESExport.cxx b/src/IGESExport/IGESExport.cxx index 475b41db2..72e6cb2fa 100644 --- a/src/IGESExport/IGESExport.cxx +++ b/src/IGESExport/IGESExport.cxx @@ -26,6 +26,8 @@ // #include "utilities.h" +#include + #include #include #include @@ -34,7 +36,7 @@ #include #ifdef WNT - #if defined IGESEXPORT_EXPORTS + #if defined IGESEXPORT_EXPORTS || defined IGESExport_EXPORTS #if defined WIN32 #define IGESEXPORT_EXPORT __declspec( dllexport ) #else @@ -73,16 +75,23 @@ IGESEXPORT_EXPORT if (theFormatName.IsEqual("IGES_5_3")) aBrepMode = 1; + // Set "C" numeric locale to save numbers correctly + Kernel_Utils::Localizer loc; + // initialize writer IGESControl_Controller::Init(); //IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"), // Interface_Static::IVal("write.iges.brep.mode")); - IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"), aBrepMode); + IGESControl_Writer ICW ("M", aBrepMode); // "write.iges.unit" ->> VSR 15.09.09: export explicitly in meters + Interface_Static::SetCVal("xstep.cascade.unit","M"); // perform shape writing ICW.AddShape( theShape ); ICW.ComputeModel(); - if ( ICW.Write( theFileName.ToCString() ) ) + bool ok = ICW.Write( theFileName.ToCString() ); + + // Return previous locale + if ( ok ) return 1; } catch(Standard_Failure)