Installation of OpenCASCADE

OpenCASCADE is a software development kit (SDK) intended for development of applications dealing with 3D CAD data, freely available in open source. It includes a set of C++ class libraries providing services for 3D surface and solid modeling, visualization, data exchange and rapid application development.

Below is a short summary of instructions on how to compile and install the official OpenCASCADE releases by hand. Alternatively, deal.II can be configured with OpenCASCADE packages available in standard Linux repositories.

How to compile and install OpenCASCADE

You can download the official releases from the Open CASCADE Technology (OCCT) repository. deal.II is compatible with OpenCASCADE starting with version 7.0.0.

Of all seven core modules in OpenCASCADE, only four are required for deal.II. When compiling from scratch, it is recommended to disable the optional ones as indicated below.

It is a good practice to build in a separate directory after unpacking the source code. (Here, OCCT-x.y.z is the version-specific path into which the OCCT .tar.gz will extract):


    cd OCCT-x.y.z
    mkdir build
    cd build
    cmake -D CMAKE_INSTALL_PREFIX=/path/to/where/you/want/opencascade \
          -D CMAKE_BUILD_TYPE=Release              \
          -D BUILD_MODULE_DataExchange=ON          \
          -D BUILD_MODULE_FoundationClasses=ON     \
          -D BUILD_MODULE_ModelingAlgorithms=ON    \
          -D BUILD_MODULE_ModelingData=ON          \
          -D BUILD_MODULE_ApplicationFramework=OFF \
          -D BUILD_MODULE_Draw=OFF                 \
          -D BUILD_MODULE_Visualization=OFF        \
          ..
    make install
      
During configuration, third party dependencies that are available on your system will be autodetected and enabled.

For a full list of CMake configuration options, please consult the OCCT building instructions.

Interfacing deal.II to OpenCASCADE

Support for OpenCASCADE will be enabled automatically if a system wide installation of OpenCASCADE can be found. To use a self compiled version, specify


    -DOPENCASCADE_DIR=/path/to/opencascade
      
when invoking cmake. Alternatively, you can also set an environment variable OPENCASCADE_DIR (valid alternatives are also OCC_DIR and CASROOT) and cmake will pick up this path.

You can override the autodetection by manually setting:


    -DDEAL_II_WITH_OPENCASCADE=OFF|ON
      


Valid HTML 4.01! Valid CSS!