]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAlgoAPI/GeomAlgoAPI_BREPImport.cpp
Salome HOME
Fix some header comments in files
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_BREPImport.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    GeomAlgoAPI_BREPImport.cpp
4 // Created: May 14, 2015
5 // Author:  Sergey POKHODENKO
6
7 #include <GeomAlgoAPI_BREPImport.h>
8
9 #include <BRepTools.hxx>
10 #include <BRep_Builder.hxx>
11
12 //=============================================================================
13 /*!
14  *
15  */
16 //=============================================================================
17 TopoDS_Shape BREPImport(const std::string& theFileName,
18                         const std::string&,
19                         std::string& theError)
20 {
21   #ifdef _DEBUG
22   std::cout << "Import BREP from file " << theFileName << std::endl;
23   #endif
24   TopoDS_Shape aShape;
25   BRep_Builder aBuilder;
26   BRepTools::Read(aShape, theFileName.c_str(), aBuilder);
27   if (aShape.IsNull()) {
28     theError = "BREP Import failed";
29   }
30   return aShape;
31 }