I'm developing an application using wxWidgets and OpenCascade (www.opencascade.org, a free geometry kernel). A special OpenCascade-function for importing IGES-files works under Windows, under Linux in a Qt application, but not under Linux in a wxWidgets application. Maybe someone of you has an idea about the reason?
I reduced the interesting code to a minimal sample. The following works as it should do:
Code: Select all
#include <TopoDS_Shape.hxx>
#include <IGESControl_Controller.hxx>
#include <IGESControl_Reader.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <IGESData_IGESModel.hxx>
#include <IGESData_GlobalSection.hxx>
#include <wx/wx.h>
int main(int argc, char* argv[])
{
cout << "load iges file..." << endl;
TopoDS_Shape shape;
IGESControl_Reader reader;
int status = reader.ReadFile("bearing.igs");
if(status == IFSelect_RetDone)
{
reader.TransferRoots();
}
cout << "... finished" << endl;
return true;
}
Code: Select all
#include <TopoDS_Shape.hxx>
#include <IGESControl_Controller.hxx>
#include <IGESControl_Reader.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <IGESData_IGESModel.hxx>
#include <IGESData_GlobalSection.hxx>
#include <wx/wx.h>
class Application : public wxApp
{
public:
virtual bool OnInit();
};
DECLARE_APP(Application)
IMPLEMENT_APP(Application)
bool Application::OnInit()
{
cout << "load iges file..." << endl;
TopoDS_Shape shape;
IGESControl_Reader reader;
int status = reader.ReadFile("bearing.igs");
if(status == IFSelect_RetDone)
{
reader.TransferRoots();
}
cout << "... finished" << endl;
return true;
}
Thanks for any hints,
Gernot