]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0020324: EDF 717 GEOM : Import IGES File
authorvsr <vsr@opencascade.com>
Wed, 16 Sep 2009 11:01:05 +0000 (11:01 +0000)
committervsr <vsr@opencascade.com>
Wed, 16 Sep 2009 11:01:05 +0000 (11:01 +0000)
Force SALOME to work in "M" (meters) units : same for STEP files

src/STEPExport/STEPExport.cxx
src/STEPImport/STEPImport.cxx

index ec50dc3616a5910e2ebb0c9503bd95e37b3cfcf0..75fd79cfe8fb0d33cf937205934d99b7affeedf1 100644 (file)
@@ -29,6 +29,7 @@
 #include <IFSelect_ReturnStatus.hxx>
 
 #include <STEPControl_Writer.hxx>
+#include <Interface_Static.hxx>
 
 #include <TCollection_AsciiString.hxx>
 #include <TopoDS_Shape.hxx>
@@ -69,6 +70,8 @@ STEPEXPORT_EXPORT
       IFSelect_ReturnStatus status ;
       //VRV: OCC 4.0 migration
       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 );
       status = aWriter.Transfer( theShape, STEPControl_AsIs );
       //VRV: OCC 4.0 migration
index 33e15f5241e711233e462152d272fac4dec90624..f021d3a79ac31b5d64de6ae54e919b85108672ab 100644 (file)
@@ -36,6 +36,7 @@
 #include <TopoDS_Compound.hxx>
 #include <TopoDS_Shape.hxx>
 #include <TDF_Label.hxx>
+#include <Interface_Static.hxx>
 
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
@@ -76,6 +77,8 @@ STEPIMPORT_EXPORT
     TopoDS_Shape aResShape;
     //VRV: OCC 4.0 migration
     STEPControl_Reader aReader;
+    //VSR: 16/09/09: Convert to METERS
+    Interface_Static::SetCVal("xstep.cascade.unit","M");
     //VRV: OCC 4.0 migration
     TopoDS_Compound compound;
     BRep_Builder B;