1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_BREPImport.cpp
4 // Created: May 14, 2015
5 // Author: Sergey POKHODENKO
7 #include <GeomAlgoAPI_BREPImport.h>
9 #include <BRepTools.hxx>
10 #include <BRep_Builder.hxx>
12 //=============================================================================
16 //=============================================================================
17 TopoDS_Shape BREPImport(const std::string& theFileName,
19 std::string& theError)
22 std::cout << "Import BREP from file " << theFileName << std::endl;
25 BRep_Builder aBuilder;
26 BRepTools::Read(aShape, theFileName.c_str(), aBuilder);
27 if (aShape.IsNull()) {
28 theError = "BREP Import failed";