Topology and Geometry in Open CASCADE. Part 1

by - 23:36

Let us consider these fundamental concepts of Open CASCADE. From time to time questions about them pop up on the forum, so I hope this post will be useful for many readers. Understanding these concepts is important if you have to work with most modeling algorithms and especially if you want to develop you own. You might also want to re-read various chapters from the Modeling Data User's Guide to refresh you memory.

Abstract topology
Open CASCADE topology is designed with reference to the STEP standard ISO-10303-42. Perhaps reading some its concepts would be helpful (I myself did this once in 1997).

The structure is an oriented one-way graph, where parents refer to their children, and there are no back references. Abstract structure is implemented as C++ classes from the TopoDS package. Here is an inheritance diagram taken from the Doxygen-generated documentation.

TopoDS_Shape is manipulated by value and contains 3 fields – location, orientation and a myTShape handle (of the TopoDS_TShape type) – see the diagram below (this and other contain only most important fields):

myTShape and Location are used to share data between various shapes and thus save huge amounts of memory. For example, an edge belonging to two faces has equal Locations and myTShape fields but different Orientations (Forward in context of one face and Reversed in one of the other).

Connection with Geometry
Now let's consider how this abstract topology structure is connected with geometry.

This is done by inheriting abstract topology classes from the TopoDS package by those implementing a boundary representation model (from the BRep package). Only 3 types of topological objects have geometric representations – vertex, edge, and face (see the diagram below).

Let's consider them more closely.

To be continued...

You May Also Like


  1. Terrific post Roman, thanks so much for explaining the fundamental concepts underpinning OCC!

  2. Hi Roman, Thank you very much. Could you please point me to the location of Modeling Data User's Guide?
    Thanks again,

  3. Come on! It's right there in the documentation
    - open a browser clicking on the Introduction link in the Start menu;
    - select Technical Overview / Modeling Data / User's Guide

    Direct location of a file on my machine - c:\DevTools\OpenCASCADE6.3.0\doc\Modat.pdf

  4. Thanks Roman....I will read more :) but thanks though...

  5. How to create a volume in OCC?