Open CASCADE Technology  7.7.0

Qt: OCCT Overview (C++|Qt Widgets)

The Overview Qt application provides code snippets for basic usage of C++ API of various OCCT functionality. The samples are organized in several categories according to relevant module of OCCT:

  • Geometry
  • Topology
  • Triangulation
  • DataExchange
  • OCAF
  • Viewer 2d
  • Viewer 3d

Each sample presents geometry view, C++ code fragment and sample output window. This sample is described in the Novice guide for new users.

1. Contents

The directory samples/qt/OCCTOverview contains the folders and files of the Qt OCCT Overview application:

  • Files and are Qt project files.
  • File genproj.bat to denerate MS Visual Studio project.
  • File msvc.bat to run MS Visual Studio project.
  • File to build of the application on Linux.
  • Files run.bat and to run the application.
  • Files env.bat and custom.bat are called from genproj.bat, msvc.bat, run.bat. File custom.bat should be defined by user to provide paths to QT directory and OCCT installation directory (see custom.bat.template).
  • src and res directories provide source and resources files.

The directory samples/OCCTOverview/code contains the source code of samples.

2. How to build Qt OCCT Overview application

  • Edit custom.bat file. It is necessary to define following variables:
    • QTDIR path to where Qt is installed
    • CASROOT path to where Open CASCADE binaries are installed.
  • Build the application:
    • On Windows:
      • Generate project files: > genproj.bat vc141 win64 Debug
      • Launch MS Visual Studio: > msvc.bat vc141 win64 Debug
      • Build the application using MS Visual Studio.
    • On Linux: Launch building of the application by script

3. Running the application

  • On Windows:
    > run.bat vc141 win64 Debug
  • On Linux:

4. How to use the OCCT Overview application:

  • To select a samples category use the Category menu.
  • To run concrete sample using the menu to the right of the category menu.
  • See the source code in the Sample code window. –°opy the code if needed.
  • See the sample output in the Output window if it exist.
  • Zoom, pan and rotate a geometry in the mail window using the mouse.

See hints how to use the mouse in down hints panel.