Salome HOME
0499c7587bd094fb3e32f9085234f412f5f0a2c3
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_BREPExport.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 #include <GeomAlgoAPI_BREPExport.h>
4
5 #include <BRepTools.hxx>
6 #include <BRep_Builder.hxx>
7
8 //=============================================================================
9 /*!
10  *
11  */
12 //=============================================================================
13 //extern "C" {
14 namespace BREPExport {
15 bool Export(const TCollection_AsciiString& theFileName,
16             const TCollection_AsciiString&,
17             const TopoDS_Shape& theShape,
18             TCollection_AsciiString& theError, const TDF_Label&)
19 {
20   #ifdef _DEBUG
21   std::cout << "Export BREP into file " << theFileName << std::endl;
22   #endif
23   if ( !BRepTools::Write( theShape, theFileName.ToCString() ) ) {
24     theError = "BREP Export failed";
25     return false;
26   }
27   return true;
28 }
29
30 }
31 //}