X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_BREPImport.cpp;h=e067acc9e94b3d09067a197063934ac7bebac752;hb=2e672b9dcc8e975fa44f6bd687a47a298b152826;hp=6d676af7c31bc9131eb1c8b158d0f10efe81df38;hpb=a643e7f41e3e9f5fe1afc32a40d5856a107f038f;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_BREPImport.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_BREPImport.cpp index 6d676af7c..e067acc9e 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_BREPImport.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_BREPImport.cpp @@ -1,6 +1,12 @@ // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -#include +// File: GeomAlgoAPI_BREPImport.cpp +// Created: May 14, 2015 +// Author: Sergey POKHODENKO + +#include + +#include #include #include @@ -10,23 +16,21 @@ * */ //============================================================================= -//extern "C" { -namespace BREPImport { -TopoDS_Shape Import(const TCollection_AsciiString& theFileName, - const TCollection_AsciiString&, - TCollection_AsciiString& theError, const TDF_Label&) +std::shared_ptr BREPImport(const std::string& theFileName, + const std::string&, + std::string& theError) { #ifdef _DEBUG std::cout << "Import BREP from file " << theFileName << std::endl; #endif TopoDS_Shape aShape; BRep_Builder aBuilder; - BRepTools::Read(aShape, theFileName.ToCString(), aBuilder); + BRepTools::Read(aShape, theFileName.c_str(), aBuilder); if (aShape.IsNull()) { theError = "BREP Import failed"; } - return aShape; -} + std::shared_ptr aGeomShape(new GeomAPI_Shape); + aGeomShape->setImpl(new TopoDS_Shape(aShape)); + return aGeomShape; } -//}