Salome HOME
Fix problem with GetShapesOnCylinder: CRASH, when result can not be obtained
[modules/geom.git] / src / BREPExport / BREPExport.cxx
1 // File:        BREPExport.cxx
2 // Created:     Wed May 19 13:10:05 2004
3 // Author:      Pavel TELKOV
4 //              <ptv@mutex.nnov.opencascade.com>
5
6 #include "utilities.h"
7
8 #include <BRepTools.hxx>
9
10 #include <TCollection_AsciiString.hxx>
11 #include <TopoDS_Shape.hxx>
12
13 //=============================================================================
14 /*!
15  *
16  */
17 //=============================================================================
18
19 extern "C"
20 {
21 #ifdef WNT
22   __declspec(__dllexport)
23 #endif
24   int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName)
25   {
26     MESSAGE("Export BREP into file " << theFileName.ToCString());
27
28     if ( !BRepTools::Write( theShape, theFileName.ToCString() ) )
29       return 0;
30
31     return 1;
32   }
33 }