]> 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 08:45:00 +0000 (08:45 +0000)
committervsr <vsr@opencascade.com>
Wed, 16 Sep 2009 08:45:00 +0000 (08:45 +0000)
Force SALOME to work in "M" (meters) units

src/IGESExport/IGESExport.cxx
src/IGESImport/IGESImport.cxx

index 4f9232118f9b9063efa54604e87ea81ea006d27e..23ecf22bc0dc1fd114c8ac34a43b77ab92acae78 100644 (file)
@@ -78,6 +78,7 @@ IGESEXPORT_EXPORT
       //IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"),
       //                       Interface_Static::IVal("write.iges.brep.mode"));
       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 );
index fbbe1c9b438b2fdedeffd5a065e3c3c145925925..3b28d20092e512a80d52d790d9f8bc962b01e0e3 100644 (file)
@@ -37,6 +37,7 @@
 #include <TopoDS_Vertex.hxx>
 #include <BRep_Builder.hxx>
 #include <gp_Pnt.hxx>
+#include <Interface_Static.hxx>
 
 #ifdef WNT
  #if defined IGESIMPORT_EXPORTS || defined IGESImport_EXPORTS
@@ -72,6 +73,7 @@ IGESIMPORT_EXPORT
   {
     IGESControl_Reader aReader;
     TopoDS_Shape aResShape;
+    Interface_Static::SetCVal("xstep.cascade.unit","M");
     try {
       IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());