Hide menu
Loading...
Searching...
No Matches
B-Rep Topology Exploration Example

Table of Contents

Explores topological entities inside B-Rep Representation.

Description

Each part of a model may contain B-Rep bodies. In this example, a visitor is used to obtain ModelData::Part from a ModelData::Model . A vector of ModelData::Body objects is then obtained from every individual part.

Each ModelData::Body is the owner of topological entities represented by ModelData::Shape . We can iterate over ModelData::Body to access the shapes it contains.

ModelData::Shape may store information about its ModelData::Shape::Orientation . MTK provides two types of shape hashers and equality operations: ModelData::OrientedShapeHash and ModelData::UnorientedShapeHash . Which one should be used depends on whether orientation should be considered:

#define ShapesOrientationIsUsed 0
#if ShapesOrientationIsUsed
typedef ModelData::OrientedShapeHash HasherType;
typedef ModelData::OrientedShapeEqual EqualerType;
#else
typedef ModelData::UnorientedShapeHash HasherType;
typedef ModelData::UnorientedShapeEqual EqualerType;
#endif

Shapes comparison is based on entity, location and orientation. There are two ways to compare shapes:

Files