0020324: EDF 717 GEOM : Import IGES File

Force SALOME to work in "M" (meters) units : same for STEP files
This commit is contained in:
vsr 2009-09-16 11:01:05 +00:00
parent b35469265e
commit 656071da94
2 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,7 @@
#include <IFSelect_ReturnStatus.hxx> #include <IFSelect_ReturnStatus.hxx>
#include <STEPControl_Writer.hxx> #include <STEPControl_Writer.hxx>
#include <Interface_Static.hxx>
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
@ -69,6 +70,8 @@ STEPEXPORT_EXPORT
IFSelect_ReturnStatus status ; IFSelect_ReturnStatus status ;
//VRV: OCC 4.0 migration //VRV: OCC 4.0 migration
STEPControl_Writer aWriter; STEPControl_Writer aWriter;
//VSR: 16/09/09: Convert to METERS
Interface_Static::SetCVal("xstep.cascade.unit","M");
//JFA: PAL6162 status = aWriter.Transfer( theShape, STEPControl_ManifoldSolidBrep ); //JFA: PAL6162 status = aWriter.Transfer( theShape, STEPControl_ManifoldSolidBrep );
status = aWriter.Transfer( theShape, STEPControl_AsIs ); status = aWriter.Transfer( theShape, STEPControl_AsIs );
//VRV: OCC 4.0 migration //VRV: OCC 4.0 migration

View File

@ -36,6 +36,7 @@
#include <TopoDS_Compound.hxx> #include <TopoDS_Compound.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <TDF_Label.hxx> #include <TDF_Label.hxx>
#include <Interface_Static.hxx>
#include <Standard_Failure.hxx> #include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
@ -76,6 +77,8 @@ STEPIMPORT_EXPORT
TopoDS_Shape aResShape; TopoDS_Shape aResShape;
//VRV: OCC 4.0 migration //VRV: OCC 4.0 migration
STEPControl_Reader aReader; STEPControl_Reader aReader;
//VSR: 16/09/09: Convert to METERS
Interface_Static::SetCVal("xstep.cascade.unit","M");
//VRV: OCC 4.0 migration //VRV: OCC 4.0 migration
TopoDS_Compound compound; TopoDS_Compound compound;
BRep_Builder B; BRep_Builder B;