1 // File: IGESExport.cxx
2 // Created: Wed May 19 14:49:45 2004
3 // Author: Pavel TELKOV
4 // <ptv@mutex.nnov.opencascade.com>
8 #include <IGESControl_Controller.hxx>
9 #include <IGESControl_Writer.hxx>
10 #include <Interface_Static.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 IGES into file " << theFileName.ToCString());
31 //VRV: OCC 4.0 migration
32 IGESControl_Controller::Init();
33 IGESControl_Writer ICW (Interface_Static::CVal("XSTEP.iges.unit"),
34 Interface_Static::IVal("XSTEP.iges.writebrep.mode"));
35 //VRV: OCC 4.0 migration
37 ICW.AddShape( theShape );
39 if ( ICW.Write( theFileName.ToCString() ) )
42 catch(Standard_Failure)
44 //THROW_SALOME_CORBA_EXCEPTION("Exception catched in IGESExport", SALOME::BAD_PARAM);