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"),
// 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)