1 // File: STEPExport.cxx
2 // Created: Wed May 19 14:53:52 2004
3 // Author: Pavel TELKOV
4 // <ptv@mutex.nnov.opencascade.com>
8 #include <IFSelect_ReturnStatus.hxx>
10 #include <STEPControl_Writer.hxx>
12 #include <TCollection_AsciiString.hxx>
13 #include <TopoDS_Shape.hxx>
16 #include <SALOME_WNT.hxx>
18 #define SALOME_WNT_EXPORT
21 //=============================================================================
25 //=============================================================================
30 int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName)
32 MESSAGE("Export STEP into file " << theFileName.ToCString());
36 IFSelect_ReturnStatus status ;
37 //VRV: OCC 4.0 migration
38 STEPControl_Writer aWriter;
39 //JFA: PAL6162 status = aWriter.Transfer( theShape, STEPControl_ManifoldSolidBrep );
40 status = aWriter.Transfer( theShape, STEPControl_AsIs );
41 //VRV: OCC 4.0 migration
42 if ( status == IFSelect_RetDone )
43 status = aWriter.Write( theFileName.ToCString() ) ;
44 if ( status == IFSelect_RetDone )
47 catch(Standard_Failure)
49 //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STEPExport", SALOME::BAD_PARAM);