Hello,
This is my first time using OpenCASCADE, so please be patient with me Archived image: smiley.
I'm trying for 4 days to make it works but have nothing yet, And each time I find a good example to follow I find some changes in the OCCT versions.
For example: I have no Handle_Graphic3d_WNTGraphicDevice (I'm on ubuntu, but there is no such thing with xw), no Graphic3d.hxx (used in some examples), no Handle_Aspect_GraphicDevice (also used in another example), for Graphic3d_GraphicDriver I have to use OpenGl_GraphicDriver ... and too many others!.
So I have some questions:
- 1) Is there a very simple (minimal) example on showing an object (a box for example) ?
- 2) Is Qt needed to show an object, or I can have an OpenGL window only ?
- 3) As I'm on Ubuntu, I have no samples on my installation, Where can I download the official Linux samples (for qt) ?
Here is the code I have:
TopoDS_Shape myBottle = MakeBottle(70., 120., 30.); // from the official tutorial
Handle(Aspect_DisplayConnection) aDisplayConnection;
Handle(OpenGl_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection);//Handle(Xw_Window) aWindow = new Xw_Window(aDisplayConnection, (short* const)"myViewer", 0, 0, 640, 480);
// this is commented because it returns error, It's bad implementedHandle(V3d_Viewer) aViewer = new V3d_Viewer(aGraphicDriver, (short* const)"Viewer");
aViewer->SetDefaultLights();
aViewer->SetLightOn();Handle(AIS_InteractiveContext) aContext = new AIS_InteractiveContext(aViewer);
Handle(AIS_Shape) anAISShape = new AIS_Shape(myBottle);
aContext->SetDisplayMode(AIS_Shaded);
aContext->Display(anAISShape);
INFO:
OCCT 6.8.0
OS : Ubuntu 14.04 32bit