Name Date Size

..29-Nov-20194 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

README.md

1# OccTutorial
2[![Build Status](https://travis-ci.org/lvk88/OccTutorial.svg?branch=master)](https://travis-ci.org/lvk88/OccTutorial)
3
4This repository contains a set of tutorials for OpenCASCADE, the open source geometry kernel.
5You can read more about OpenCASCADE at http://www.opencascade.org. This series consists of chapters,
6each chapter demonstrating a small set of features offered by OpenCASCADE. Make sure you also follow
7the [blog](https://occtutorials.wordpress.com) where the discussions of each example is published.
8
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](https://github.com/lvk88/OccTutorial/wiki/Setup) in the Wiki.
12
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. 
15
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.](http://www.psychocats.net/ubuntu/virtualbox) This would give you access to a fully functioning Ubuntu operating system. Make sure you also [install the guest additions](http://askubuntu.com/questions/22743/how-do-i-install-guest-additions-in-a-virtualbox-vm), so that you will have access to 3D acceleration.
18
19## Install OpenCASCADE
20Install OpenCASCADE using your the package manager of your Linux distribution. For example, on Ubuntu:
21<pre>
22sudo apt-get install liboce-*
23</pre>
24To be able to visualize the geometric models in the earlier chapters, it is also recommended to install FreeCAD:
25<pre>
26sudo apt-get install freecad
27</pre>
28
29## Download the tutorial sources
30Make a folder for the tutorial sources, e.g. in your home folder
31<pre>
32cd ~
33mkdir occtutorial
34mkdir occtutorial/sources
35</pre>
36Then, clone the repository from GIT:
37<pre>
38cd ~/occtutorial/sources
39git clone https://github.com/lvk88/OccTutorial.git
40</pre>
41This will create ~/occtutorial/sources/OccTutorial.
42
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:
45<pre>
46mkdir ~/occtutorial/build
47</pre>
48Next, we run CMAKE to generate us the Makefiles:
49<pre>
50cd ~/occtutorial/build/
51cmake ~/occtutorial/sources/OccTutorial
52</pre>
53If everything went without error, we can build the tutorials:
54<pre>
55cd ~/occtutorial/build
56make
57</pre>
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.
61<pre>
62cd ~/occtutorial/build/bin
63./chapter0
64</pre>
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
68
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 
73@build/bin@
74
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](https://occtutorials.wordpress.com)
77soon. Until then, the comments in the files explain more or less what each example is doing.
78