Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation


Open CASCADEShowroomGet Open CASCADEDeveloper CornerSupportAbout us
Technical overview
Areas of use
Advantages
Public license
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
System requirements
What's new
Download Center
CD-ROM
Documentation
Getting started
Forum
Open Source community
Training and e-learning
A la Carte Support
Value-added software
Client Area
Company Profile
Contacts and Locations
Customers
News
Home / Developer Corner / Getting started / My first application / Profile - defining the topology

Profile - defining the topology

You have created the support geometry of one part of the profile but these curves are independant with no relations between each other.

To simplify the modelisation, it would be nice to manipulate these three curves as a single entity.

This can be done by using the Open CASCADE topological data structure described in the TopoDS package: it defines relationships between geometric entities which can be linked together to represent complex shapes.

Each object of the TopoDS package, inheriting from the TopoDS_Shape class, describes a topological shape as described below:

ShapeOpen CASCADE ClassDescription
Vertex TopoDS_Vertex Zero dimensional shape corresponding to a point in geometry.
Edge TopoDS_Edge Single dimensional shape corresponding to a curve and bounded by a vertex at each extremity.
Wire TopoDS_Wire Sequence of edges connected by vertices.
Face TopoDS_Face Part of a surface bounded by a closed wire.
Shell TopoDS_Shell Set of faces connected edges.
Solid TopoDS_Solid Part of 3D space bounded by Shells.
CompSolid TopoDS_CompSolid Set of solids connected by their faces.
Compound TopoDS_Compound Set of any other shape described above.


Refering to the previous table, you can see that, to build the profile, you will create:

- Three edges out of the previously computed curves.
- One wire from the edges


 



However, the TopoDS package provides data structure of topological entities only. The algorithm classes available to compute standard topological objects can be found in the BRepBuilder API package.

To create an edge, you use the BRepBuilderAPI_MakeEdge class with the previously computed curves:


TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(aSegment1);
TopoDS_Edge aEdge2 = BRepBuilderAPI_MakeEdge(aArcOfCircle);
TopoDS_Edge aEdge3 = BRepBuilderAPI_MakeEdge(aSegment2);


In Open CASCADE, you can create edges in several ways. One possibility is to create an edge directly from two points, in which case the underlying geometry of this edge is a line, bounded by two vertices being automatically computed from the two input points. For example, aEdge1 and aEdge3 could have been computed more simply:


TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(aPnt1 , aPnt3);
TopoDS_Edge aEdge2 = BRepBuilderAPI_MakeEdge(aPnt4 , aPnt5);


To connect the edges together, you need to create a wire with the BRepBuilderAPI_MakeWire class. There are two ways of building a wire with this class:

- directly from one to four edges
- by adding other wire(s) or edge(s) to an existing wire (this is explained later in this tutorial)

When building a wire from less than four edges, as in the present case, you can use the constructor directly as follows:


TopoDS_Wire aWire = BRepBuilderAPI_MakeWire(aEdge1 , aEdge2 , aEdge3);

next step
previous step

 
 

© Open CASCADE 2000 - 2008  |  Search  |  Contacts