//
#include "utilities.h"
+#include <Basics_Utils.hxx>
+
#include <IGESControl_Controller.hxx>
#include <IGESControl_Writer.hxx>
#include <Interface_Static.hxx>
#include <TopoDS_Shape.hxx>
#ifdef WNT
- #if defined IGESEXPORT_EXPORTS
+ #if defined IGESEXPORT_EXPORTS || defined IGESExport_EXPORTS
#if defined WIN32
#define IGESEXPORT_EXPORT __declspec( dllexport )
#else
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)