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>
15 //=============================================================================
19 //=============================================================================
24 __declspec(__dllexport)
26 int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName)
28 MESSAGE("Export STEP into file " << theFileName.ToCString());
32 IFSelect_ReturnStatus status ;
33 //VRV: OCC 4.0 migration
34 STEPControl_Writer aWriter;
35 //JFA: PAL6162 status = aWriter.Transfer( theShape, STEPControl_ManifoldSolidBrep );
36 status = aWriter.Transfer( theShape, STEPControl_AsIs );
37 //VRV: OCC 4.0 migration
38 if ( status == IFSelect_RetDone )
39 status = aWriter.Write( theFileName.ToCString() ) ;
40 if ( status == IFSelect_RetDone )
43 catch(Standard_Failure)
45 //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STEPExport", SALOME::BAD_PARAM);