Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics

OpenCASCADE 6.2.0 and OSX

OpenCASCADE 6.2.0 and OSX
Stefan Boeykens 2007/11/14 12:34
Again a thread on OSX.
--- I've started from the patches by Torsten Sadowski. I did, however, removed the COMP/XCOMP entry and manually applied it in OCC.XCOMP, since the automatic replacement seemed to change things it shouldn't have...
--- I've made a few additional corrections:
In ModelingAlgorithms.XCOMP, TKShHealing is required by TKOffset, but comes after it. This is also giving problems for the compilation of IGES in DataExchange.XCOMP. Changing the order solves it.

Additionally, I've corrected the <GL/gl.h> and <GL/glu.h> into <OpenGl/gl.h> and <OpenGl/glu.h> in src/OpenGL/OpenGL_polygon.c and src/OpenGL/OpenGL_polygonholes.c. This gave warnings but TKOpenGL did link.

--- I was then able to compile OpenCASCADE and generate the libraries. In order to run DRAWEXE, I had to go to X11, call "source env.ksh" to set up the environment variables (not inherited from regular OSX environment variables) and set the environment variable DISPLAY=":0.0".

This allows me to run DRAWEXE. I get the windows and the menu's seem to work.


Is it true that you must use tk/tcl from X11? Can you avoid X11 and use only Aqua?
Stefan Boeykens 2007/11/14 14:09
And additionally, do you need to use the Qt/X11 library for the samples? Or would it work with the Qt/mac library? I'm currently using Qt4, but if you have any idea on how it works for Qt3, this could also be helpful.
Torsten Sadowski 2007/11/19 16:55
Hallo Stefan,

unluckily you have to use X11. If you look into View.cxx from the Qt samples you will see:

#ifdef WNT
#include <WNT_Window.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <GL/glx.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/Xmu/StdCmap.h>
#include <X11/Xlib.h>
#include <Xw_Window.hxx>
#include <Graphic3d_GraphicDevice.hxx>

For a native view it would be necessary to implement MAC_Window and probably Graphic3d_MACGraphicDevice classes which is probably not overly difficult but I don't have the time for it.

Cheers, Torsten
William Jones 2008/10/17 20:36
Oh if it were that easy...

Looks like V3d_View, V3d_PositionLight, Visual3d_Viewer, and Visual3d_ViewManager (among some of the Test classes) are all hardwired to work with either WNT or X11 windows :(

Some of these should be addressed by the OpenCASCADE developers as they appear to be lingering remnants of days gone by. For example:

1) unused includes in V3d_SpotLight
2) not relying on the pure virtual AspectWindow::Size() method in Visual3d_ViewManager::Pick()
3) unused variables in Visual3d_ViewManager::ViewExists()

Not sure how to handle the Graphic3d_CView::DefWindow.XWindow and Graphic3d_CView::DefWindow.XParentWindow in Visual3d_View::SetWindow() which propagates also up to V3d_PositionLight::Pick().
William Jones 2008/10/31 15:19
Oh yes, and then there's which littered with hardwired connections to WNT or X11.
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map