• Nenhum resultado encontrado

4.5 Hypergraphs transformation operators

4.5.1 Generic hypergraph transformation operators

A hypergraph datastructure connects to basic operators to edit its nodes and arcs.

The most basic operators are arc creation, node creation, arc and node removal. An operation applied to an arc can be refined further down to half arc level. Adding an arc can be further decomposed into the addition of a half arc linking the candidate node or a half arc which already exists (see Figure4.7a), or other variants of this operation are depicted also in Figure 4.7a. Figure 4.7a illustrates configurations where RA is incremented through half arc creation. Because of the node-arc connection creation, a new node may be added to some arc neighborhood whose number of its surrounding nodes is less than its rank (see Figure4.7b). The effective connection of a nodeN to a half arc increments its rankRN. As an example, the connection of a nodeN4 to an arc already connected to a nodeN2 incrementsRN4 and RN2 both (see Figure4.7b).

The arc and node removal operators are opposite to the creation operators. The arc removal removes a half arc and decrements its arc rankRA(see Figure4.7c). The node removal deletes the candidate nodeN, but keeps the surrounding half arcs (see Figure4.7d). As a result, the ranksRAi of the half arcs surroundingN are preserved while the ranks of the nodesNi surroundingN are decremented. The split and merge operators are a couple of opposite operations, too. With the split operator, whether it is an arc or a node, the original entityE will be split into two new onesE1,E2. Its surrounding connections are divided into two groups and each group connects to one of the new entities E1,E2. Consequently, if a hyperarc A or a nodeN is split, then the ranks of the new onesE1 andE2 satisfiesRAorRN RE1 RE2.

The merge operator uses a new entity E to replace the two original entities E1

andE2 and preserves all the surrounding connections and the ranks are summed up, i.e. RE1 RE2 RE (see Figure 4.8c,d). Arc contraction is a high level operator. It can be regarded as a node merging plus an arc removal operations. The selected arc Acontracts and all nodesNi connected to this arc are merged together to produce a single node N: RN °

iRNiRA. As a result, the contracted arc disappears (see Figure 4.8e). The parallel arc merging differs from the arc merging operator. It has to happen to two arcs at least, whose ranks equal 2 and connect to the same nodes. It can be considered that one arc only will be kept and the others are deleted, as shown in Figure4.8f.

These basic operators purely focus on the graph domain, independently of any application context. As a topological data structure, the three hypergraphs describe the boundary decomposition of MI. When these hypergraphs can be reduced to a graph, which is the case when the B-Rep datastructure of an object is loaded and really describesMI, this graph can be used to define the genus ofMI using the Euler

Hypergraphs transformation operators 73

(a) (b)

(c) (d)

Figure 4.7: llustration of basic hypergraph operations (first subset).

theorem as follows:

XpMIq #vertices#edges #f aces. (4.1) Here,MI designates a B-Rep model defining a volume as it can be defined in the STEP standard or a geometric modeler. In order to preserve the Euler characteristic XpMIq, any operation in one hypergraph must trigger some operation in the other two hypergraphs. BecauseMI should be a volume and a 2-manifold boundary model to conform to the current framework, there are several properties characterizing this category of models in the hypergraphs. These properties support the non-manifold configuration detection algorithm used as input to certify or transform, if needed,MI into a real volume forming a 2-manifold model. As mentioned at section 4.4, non- manifold vertices can exist in MI and must be removed to conform to the proposed hypotheses. In addition, such vertices are not part of real industrial components.

Property 1 @RAiG21, RAiG212.

This property expresses that each edge must be exactly adjacent to two faces, a necessary condition to define a 2-manifold. G21 is a binary graph. Using the definition of a half arc in G21, ifRAiG212, it means the neighborhood of the edgeAi is not a disk. So, it is either a non-manifold edge or a boundary edge or an isolated edge.

(a) (b)

(c) (d)

(e) (f)

Figure 4.8: Illustration of basic hypergraph operations (second subset).

Property 2 @RAiG20, RAiG20RAiG10.

A vertexViis surrounded by the set of facesrFVisand the set of edgesrEVis. The cardinality ofrFΩVisis RAiG20. The cardinality of rEΩVis isRAiG10. Because each edge of a 2-manifold is the intersection between two faces, the number of faces around Vi can reach up to twice the number of edges around this vertex, hence RAiG20 ¥ RAiG10 (see Figure 4.9a). Any vertex Vi lies at the intersection of edges or, at least, defines the extremities of an edge loop, soRAiG10 ¡1. Complementarily, the cardinality of rFVis has to be bounded and that of rEVis is such that RAiG20 ¤ RAiG10. Indeed, the number of faces gets smaller than edges when faces are bounded by edge loops in arbitrary configurations of faces around a vertex (see Figure 4.9b).

The result is RAiG20 RAiG10. This property expresses that each vertex has a neighborhood topologically equivalent to a disk exactly: another necessary condition to define a 2-manifold.

Hypergraphs transformation operators 75

(a) (b)

Figure 4.9: The illustration of RAiG20¥RAiG10 and RAiG20¤RAiG10. To prepare a maximal 2-manifold model,MM AX, suited to define all the candidate symmetry planes attached to point sets, several topological operators are needed to transform the initial boundary decomposition of the model, i.e. MI, into maximal entities, i.e. MM AX: non-manifold configuration detection, split non-manifold vertex, merge surfaces, merge edges and split manifold vertex are the corresponding operators described in the following section.