Name Date Size

..27-Apr.-20224 KiB

.travis.ymlH A D06-Sep.-2019272

Chapter0_Test/H06-Sep.-20194 KiB

Chapter1_Basics/H06-Sep.-20194 KiB

Chapter2_Geom/H06-Sep.-20194 KiB

cmake/H06-Sep.-20194 KiB

CMakeLists.txtH A D06-Sep.-2019492

OtherExamples/H06-Sep.-20194 KiB

README.mdH A D06-Sep.-20193.9 KiB

Utilities/inc/H06-Sep.-20194 KiB

1# OccTutorial
2[![Build Status](](
4This repository contains a set of tutorials for OpenCASCADE, the open source geometry kernel.
5You can read more about OpenCASCADE at This series consists of chapters,
6each chapter demonstrating a small set of features offered by OpenCASCADE. Make sure you also follow
7the [blog]( where the discussions of each example is published.
9## Where to start.
10If you are familiar with using CMAKE, GIT, and generally with building and compiling, proceed to the "Quick start" section. If you need a detailed explanation
11on how to check out the code, set up an IDE and build the first example, please go to [the setup section]( in the Wiki.
13## Quick start
14The tutorials are being written and tested in Ubuntu 15.10. For the quickest start, it is therefore recommended to follow the tutorials using Ubuntu. 
16### What if I am a Windows user?
17The quick and easy way would be to install an Ubuntu OS inside a Virtualbox on your Windows, e.g. following [this guide.]( This would give you access to a fully functioning Ubuntu operating system. Make sure you also [install the guest additions](, so that you will have access to 3D acceleration.
19## Install OpenCASCADE
20Install OpenCASCADE using your the package manager of your Linux distribution. For example, on Ubuntu:
22sudo apt-get install liboce-*
24To be able to visualize the geometric models in the earlier chapters, it is also recommended to install FreeCAD:
26sudo apt-get install freecad
29## Download the tutorial sources
30Make a folder for the tutorial sources, e.g. in your home folder
32cd ~
33mkdir occtutorial
34mkdir occtutorial/sources
36Then, clone the repository from GIT:
38cd ~/occtutorial/sources
39git clone
41This will create ~/occtutorial/sources/OccTutorial.
43##Build the tutorial
44The build system is based on CMAKE, and we are aiming for an out-of-source build. Therefore, we make a build folder:
46mkdir ~/occtutorial/build
48Next, we run CMAKE to generate us the Makefiles:
50cd ~/occtutorial/build/
51cmake ~/occtutorial/sources/OccTutorial
53If everything went without error, we can build the tutorials:
55cd ~/occtutorial/build
58This will build the tutorials into build/bin directory. Each executable represents a small example of OpenCASCADE functionality.
59##Run the first demonstrative example
60Now that the tutorials are built, you can run the first demonstrative example.
62cd ~/occtutorial/build/bin
65This will create a simple box with a cylindrical hole, and print out some of its physical properties. The source of this can be found in
66source/OccTutorial/Chapter0_Test/chapter0.cpp. It also creates an output file of the geometry in STEP format. You can open and examine it
67using FreeCad for example. The file is located in build/bin/boxWitHole.stp
69##How are the tutorials organized
70The series is organized into Chapters, with each chapter focusing on one or two packages of OpenCASCADE. With the exception of Chapter0, every chapter
71consists of an "inc", "src", and "runners" folder. Obviously, inc contains the headers for the given chapter, src the source files. Runners is a special
72folder, which contains a set of driver files, each having its own main function. When building OccTutorials, the executable output will be compiled into 
75## Where to go now?
76The tutorials are strongly under construction right now, but a detailed explanation of each source will be available at the [blog](
77soon. Until then, the comments in the files explain more or less what each example is doing.