Open CASCADE Technology  7.5.0
Tutorials and Samples

Tutorial: Modelling a Bottle

The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object. The purpose of the tutorial is not to explain all OCCT classes but to help start thinking in terms of the Open CASCADE Technology.

This tutorial assumes that the user has experience in using and setting up C++. From the viewpoint of programming, Open CASCADE Technology is designed to enhance user's C++ tools with high performance modeling classes, methods and functions. The combination of these resources allows creating substantial applications.

Read more about Tutorial

MFC

Visual C++ programming samples containing 10 Visual C++ projects illustrating how to use a particular module or functionality.

The list of MFC samples:

  • Geometry
  • Modeling
  • Viewer2d
  • Viewer3d
  • ImportExport
  • Ocaf
  • Triangulation
  • HLR
  • Animation
  • Convert
samples_mvc.png

Remarks:

  • MFC samples are available only on Windows platform;
  • To start a sample use Open CASCADE Technology\Samples\Mfc\ item of the Start\Programs menu;
  • Read carefully readme.txt to learn about launching and compilation options.

See Readme for details.

Qt

OCCT includes several samples based on Qt application framework. These samples are available on all supported desktop platforms.

To start a sample on Windows use Open CASCADE Technology\Samples\Qt\ item of the Start\Programs menu.

Import Export

Import Export programming sample contains 3D Viewer and Import / Export functionality.

samples_qt.png

Tutorial

The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object. The purpose of the tutorial is not to explain all OCCT classes but to help start thinking in terms of the Open CASCADE Technology.

This tutorial assumes that the user has experience in using and setting up C++. From the viewpoint of programming, Open CASCADE Technology is designed to enhance user's C++ tools with high performance modeling classes, methods and functions. The combination of these resources allows creating substantial applications.

See also: OCCT Tutorial

Overview

The Qt application providing samples 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.

sample_overview_qt.png

See Readme for details.

C#

C# sample demonstrates integration of OCCT 3D Viewer and Import / Export functionality into .NET applications (using Windows Forms and WPF front ends).

samples_c__ie.png

Import:

  • BRep
  • Iges
  • Step

Export:

  • Brep
  • Iges
  • Step
  • Stl
  • Vrml

See C# sample Readme for details.

There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end.

See Direct3D C# sample Readme for details.

Android

There are two samples are representing usage OCCT framework on Android mobile platform. They represent an OCCT-based 3D-viewer with CAD import support in formats BREP, STEP and IGES: jniviewer (java) and AndroidQt (qt+qml)

jniviewer

samples_java_android_occt.jpg

Java – See Android Java sample Readme for details.

AndroidQt

samples_qml_android_occt.jpg

Qt – See Android Qt sample Readme for details.

iOS

There is a sample demonstrating usage of OCCT on iOS with Apple UIKit framework.

sample_ios_uikit.png

See iOS sample Readme for details.

Web

WebGL Viewer sample demonstrating usage of OCCT 3D Viewer in Web browser with Emscripten SDK can be found in samples/webgl.

sample_webgl.png

See WebGL sample Readme for details.

OCAF Usage Sample

The provided set of samples dedicates to get initial knowledge about typical actions with OCAF services. It may be useful for newcomers.

Read more about OCAF Usage

OCAF Function Mechanism Usage

This simple example dedicates to the usage of "Function Mechanism" of OCCT Application Framework. It represents a "nail" composed by a cone and two cylinders of different radius and height.

Read more about Function Mechanism Usage

Draw Demo Scripts

A set of demo scripts demonsrates using OCCT functionality from DRAW. These scripts can be also considered as a tutorials on tcl usage within Draw.

Read more about Draw Demo Scripts