1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GEOMALGOAPI_BREPExport.cpp
4 // Created: May 14, 2015
5 // Author: Sergey POKHODENKO
7 #include <GeomAlgoAPI_BREPExport.h>
9 #include "GeomAlgoAPI_Tools.h"
11 #include <BRepTools.hxx>
12 #include <BRep_Builder.hxx>
14 //=============================================================================
18 //=============================================================================
19 bool BREPExport(const std::string& theFileName,
21 const TopoDS_Shape& theShape,
22 std::string& theError)
25 std::cout << "Export BREP into file " << theFileName << std::endl;
28 // Set "C" numeric locale to save numbers correctly
29 GeomAlgoAPI_Tools::Localizer loc;
31 if (!BRepTools::Write(theShape, theFileName.c_str())) {
32 theError = "BREP Export failed";