MbPolymesh Polygonal Object with Topology

The MbPolymesh class is declared in the polymesh.h file.

The MbPolymesh polygonal object is derived from the MbItem class and is described by the _pTopo topology, which represents a description of the polygonal object in the form of a Halfedge structure.

The Halfedge representation is a representation of a polygonal model as a graph, where the key element of the representation is a directed edge associated with the facet to which it belongs and the vertex from which the edge originates. Thus, each non-boundary edge of the surface is represented as a pair of oppositely directed edges (an edge pair). The edges are organized into closed cycles, that is, facets.

As an additional set of information, the object, in addition to the topology, stores segmentation data of the object. The object can be divided into regions. Each region contains a set of connected components called subregions. By analogy with the Halfedge organization, each subregion may have one or more segmentation edge cycles.

To provide flexibility of representation, each topology element can be assigned an attribute that stores additional information about this element. For example, a vertex may have an attribute that stores information about its 3D coordinates. Through attributes, the user can assign derived data of the types bool, float, double, unsigned int, int, and size_t.

An image of a polygonal object with edge visualization is shown in Fig. 1. Segmentation regions are shown in different colors.

../../../../_images/O.8.11.1.png

Fig. 1

A shaded image of the polygonal object is shown in Fig. 2. Subregion cycles are shown in white.

../../../../_images/O.8.11.2.png

Fig. 2

Facets may have an arbitrary number of edges. For example, Fig. 3 shows pentagonal facets forming the faces of a dodecahedron.

../../../../_images/O.8.11.3.png

Fig. 3

A polygonal object with topology can be created from an MbMesh object, or it can be constructed by the user directly. An example of creating such an object can be found in the test application in the test_sample_polymesh.cpp file. Topology is required for analysis, repair, and editing of polygonal objects.