1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #include <GeomAlgoAPI_BREPExport.h>
5 #include "GeomAlgoAPI_Tools.h"
7 #include <BRepTools.hxx>
8 #include <BRep_Builder.hxx>
10 //=============================================================================
14 //=============================================================================
16 namespace BREPExport {
17 bool Export(const TCollection_AsciiString& theFileName,
18 const TCollection_AsciiString&,
19 const TopoDS_Shape& theShape,
20 TCollection_AsciiString& theError)
23 std::cout << "Export BREP into file " << theFileName << std::endl;
26 // Set "C" numeric locale to save numbers correctly
27 GeomAlgoAPI_Tools::Localizer loc;
29 if ( !BRepTools::Write( theShape, theFileName.ToCString() ) ) {
30 theError = "BREP Export failed";