Hide menu
Polygonal Representation Example

Table of Contents

Explores triangulation, polylines and point sets inside a polygonal representation.


This example is similar to the B-Rep Representation Example. We use a visitor to obtain ModelData_Part objects of ModelData_Model and then we check ModelData_Part for a ModelData_PolyRepresentation existence. Next, we may get a ModelData_PolyShapeList from a ModelData_PolyRepresentation which contains all the ModelData_PolyShape objects of the Polygonal Representation.

As shown in the Part Representations Guide each polygonal representation contains ModelData_PolyShapeList, which is a list of vertex sets. Each vertex set is a subclass of ModelData_PolyVertexSet and defines either a set of triangles, polylines or just a point cloud.

Unlike ModelData_BRepRepresentation which contains a topology data and in most cases comes with a ModelData_Model, a ModelData_PolyRepresentation may not be contained in a ModelData_Model and often it should be precomputed first:

ModelAlgo_BRepMesher aMesher (ModelAlgo_BRepMesherParameters::Fine);
aMesher.Compute (aModel);


To learn more how to create each type of vertex set, please have a look at the Polygonal Modeling Example.

To compute a ModelData_PolyRepresentation we used a Mesher, for more information please refer to the Visualization Mesher Example.

ModelData_Part may contain also a ModelData_BRepRepresentation. You could find more in the B-Rep Representation Example.


You can try this example with the following model: