Salome HOME
Issue #608: Usage of OCCT in interface -- Remove OCCT from *Export interfaces --...
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_STEPImport.cpp
index 2510db41360e71bc99d01f9da86c6d8f57fa4e0b..7ff22b0f015a3500fb3fe675816a4670b61278ef 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
-#include <GEOMALGOAPI_STEPImport.h>
+#include <GeomAlgoAPI_STEPImport.h>
 
 #include <TDF_ChildIDIterator.hxx>
 #include <TDF_Label.hxx>
@@ -43,7 +43,6 @@
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
 
-namespace STEPImport {
 //=============================================================================
 /*!
  *  GetShape()
@@ -364,10 +363,9 @@ Handle(TCollection_HAsciiString) GetValue (const TCollection_AsciiString& theFil
   return aValue;
 }
 
-TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
-                     const TCollection_AsciiString& theFormatName,
-                     TCollection_AsciiString&       theError,
-                     const TDF_Label&               theShapeLabel)
+TopoDS_Shape STEPImport(const std::string& theFileName,
+                        const std::string& theFormatName,
+                        std::string& theError)
 {
   TopoDS_Shape aResShape;
 
@@ -388,7 +386,7 @@ TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
   try {
     OCC_CATCH_SIGNALS;
 
-    IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
+    IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.c_str());
 
     if (status == IFSelect_RetDone) {
 
@@ -495,5 +493,3 @@ TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
   // Return previous locale
   return aResShape;
 }
-
-} // namespace STEPImport