mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-20 23:59:42 +05:00
0017002: EDF 578 GEOM : Problem when trying to import some ACIS and IGES files
This commit is contained in:
parent
f82f2f5a2a
commit
e59444bf0e
@ -71,6 +71,10 @@ IGESIMPORT_EXPORT
|
||||
TCollection_AsciiString& theError,
|
||||
const TDF_Label&)
|
||||
{
|
||||
// Set "C" numeric locale to save numbers correctly
|
||||
std::string aCurLocale = setlocale(LC_NUMERIC, 0);
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
|
||||
IGESControl_Reader aReader;
|
||||
TopoDS_Shape aResShape;
|
||||
Interface_Static::SetCVal("xstep.cascade.unit","M");
|
||||
@ -99,6 +103,8 @@ IGESIMPORT_EXPORT
|
||||
TopoDS_Vertex V;
|
||||
B.MakeVertex(V,P,1.e-7);
|
||||
aResShape = V;
|
||||
// Return previous locale before return from import
|
||||
setlocale(LC_NUMERIC, aCurLocale.data());
|
||||
return aResShape;
|
||||
}
|
||||
if( theFormatName == "IGES_SCALE" ) {
|
||||
@ -149,6 +155,8 @@ IGESIMPORT_EXPORT
|
||||
theError = aFail->GetMessageString();
|
||||
aResShape.Nullify();
|
||||
}
|
||||
// Return previous locale
|
||||
setlocale(LC_NUMERIC, aCurLocale.data());
|
||||
return aResShape;
|
||||
}
|
||||
}
|
||||
|
@ -74,6 +74,9 @@ STEPIMPORT_EXPORT
|
||||
const TDF_Label&)
|
||||
{
|
||||
MESSAGE("Import STEP model from file " << theFileName.ToCString());
|
||||
// Set "C" numeric locale to save numbers correctly
|
||||
std::string aCurLocale = setlocale(LC_NUMERIC, 0);
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
TopoDS_Shape aResShape;
|
||||
//VRV: OCC 4.0 migration
|
||||
STEPControl_Reader aReader;
|
||||
@ -152,6 +155,8 @@ STEPIMPORT_EXPORT
|
||||
theError = aFail->GetMessageString();
|
||||
aResShape.Nullify();
|
||||
}
|
||||
// Return previous locale
|
||||
setlocale(LC_NUMERIC, aCurLocale.data());
|
||||
return aResShape;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user