# The Dual Half-Edge—A Topological Primal/Dual Data Structure and Construction Operators for Modelling and Manipulating Cell Complexes

^{1}

^{2}

^{3}

^{*}

^{†}

## Abstract

**:**

## 1. GIS History

## 2. The Dual Half-Edge

_{b}in Figure 4a) is used to connect internal rings (holes) to the outside ring (the face) (f

_{INT}and f

_{OUT}respectively in Figure 4a); and a “bridge face” (f

_{b}in Figure 4b) to connect an internal cell (a cavity) with the outside cell (c

_{INT}and c

_{OUT}

_{,}respectively, in Figure 4b). Bridge edges and bridge faces are added to a model in the same way as any others but have a special attribute that is taken into consideration by the navigation operators. This edge can be omitted during the navigation process if required. Bridge faces have the attributes assigned to their dual edges: a bridge edge in the primal graph represents a bridge face in the dual, and vice versa.

#### 2.1. Semantic Information

#### 2.2. Navigation Operators

_{V}, N

_{F}, and D. A reference to a vertex is assigned to V. Two half-edges are joined by S. N

_{V}and N

_{F}are used to store information about a next half-edge in a star (around a shared vertex) and in a loop (around a face) respectively. “Next” is considered as “next” in an anticlockwise direction looking from the outside of a cell. Half-edges from the primal and dual spaces are connected by the D pointer and are set during the construction process.

_{V}, Next

_{F}, and Dual. Sym (Figure 8a) uses S to navigate from one half of the edge to the other. Next

_{V}(Figure 8b) uses N

_{V}to navigate around a shared vertex and Next

_{F}(Figure 8c) uses N

_{F}to navigate around a shared face (in both cases in the anticlockwise direction looking from the outside of a cell). Dual uses D to navigate from a half-edge in one space to the associated half-edge in the dual space.

_{V}, Prev

_{F}, Next

_{E}, Prev

_{E}, and Adjacent. Prev

_{V}and Prev

_{F}allow for navigation in the same way as their counterparts Next

_{V}and Next

_{F}but in the opposite direction. Next

_{E}(see Figure 8d) and Prev

_{E}allow for navigation around a bundle of edges. Adjacent is used to navigate to the adjacent cell—the result of the operator is an edge in the adjacent cell that has the same coordinates and is associated with the opposite side of the shared face. Figure 9a shows two adjacent cells (c

_{1}and c

_{2}) that share a face. This face is double-sided—one side for each cell. The half-edge e in c

_{1}shown in Figure 9b is one out of four edges forming the face loop. e.Adjacent is an adjacent half-edge in c

_{2}.

_{F}.D.S, where e is the source half-edge. This should be expanded as follows: go to the dual half-edge of e, then go the next counter-clockwise half-edge around a face, then go back to the original space, and go to the opposite side of the edge.

#### 2.3. Construction—Euler Operators

_{V}, N

_{F}, D and V) in other columns.

#### 2.4. Extended Euler Operators

**Join**is a collection of three operators to connect two cells—it is possible to join cells by a common face, edge or vertex (Figure 13). The relationships between cells are changed in this way so that direct navigation between the cells is possible and the cells are part of the same complex even if they were in two different complexes before the operation. “Join” changes primal edges of the external cell; dual connections are changed automatically so that direct navigation between the cells is possible (in Figure 13 dotted lines and grey faces represent the dual). “Join” has an inverse—“Separate”.

**Merge**, like “Join”, is a collection of three operators—it is possible to merge cells by a common face, edge or vertex (Figure 16). In this case, two cells are merged into one cell. “Merge” changes the primal edges of the internal cell. Cells to be connected have to be joined first—merging two cells that are in separate complexes has two stages: first, cells are joined, then they can be merged. “Merge” has an inverse—“Split”.

## 3. Comparisons with the DHE

#### 3.1. The Coupling-Entity—The Feather

#### 3.2. The Radial-Edge and Partial-Entity Structure

_{F}pointer is removed; b) no dual structure—the D pointer is used to join adjacent cells.

#### 3.3. Simplified DHE

_{F}might be more suitable (simplified version a). The number of pointers in the DHE is decreased from ten to eight. Thus the storage space required for the model is recalculated as follows: 1000 cubes × 12 edges × 2 DHE × 8 pointers × 4 bytes = 768,000 bytes; and for the external cell: 1200 edges × 2 DHE × 8 pointers × 4 bytes = 76,800; in total 844,800 bytes. This gives a 20% space saving.

## 4. Building Model Construction

## 5. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Boguslawski, P.; Gold, C. Euler operators and navigation of multi-shell building models. In Developments in 3D Geo-Information Sciences; Neutens, T., Maeyer, P., Eds.; Springer: Berlin, Germany, 2010; pp. 1–16. [Google Scholar]
- Boguslawski, P.; Gold, C. Rapid modelling of complex building interiors. In Advances in 3D Geo-Information Sciences; Kolbe, T.H., König, G., Nagel, C., Eds.; Springer: Berlin, Germany, 2011; pp. 43–56. [Google Scholar]
- Boguslawski, P.; Gold, C.M.; Ledoux, H. Modelling and analysing 3D buildings with a primal/dual data structure. ISPRS J. Photogram. Remote Sens.
**2011**, 66, 188–197. [Google Scholar] [CrossRef] - Baumgart, B.G. A polyhedron representation for computer vision. In Proceedings of the National Computer Conference (AFIPS '75), Anaheim, CA, USA, 19–22 May 1975.
- Mäntylä, M. Introduction to Solid Modeling; Computer Science Press: New York, NY, USA, 1987; p. 401. [Google Scholar]
- Guibas, L.; Stolfi, J. Primitives for the manipulation of general subdivisions and the computation of voronoi diagrams. ACM Trans. Graph.
**1985**, 4, 74–123. [Google Scholar] [CrossRef] - Kolbe, T.H.; Gröger, G.; Plümer, L. CityGML—3D city models and their potential for emergency response. In Geo-Information Technology for Emergency Response; Zlatanova, S., Li, J., Eds.; CRC Press: Boca Raton, FL, USA, 2008; pp. 257–274. [Google Scholar]
- Berg, M.; Cheong, O.; Kreveld, M.; Overmars, M. Computational Geometry: Algorithms and applications, 3rd ed.; Springer: Berlin, Germany, 2008. [Google Scholar]
- Dobkin, D.P.; Laszlo, M.J. Primitives for the manipulation of three-dimensional subdivisions. In Proceedings of the Third Annual Symposium on Computational Geometry, Waterloo, ON, Canada, 8–10 June 1987.
- Lee, S.H.; Lee, K. Partial entity structure: A compact non-manifold boundary representation based on partial topological entities. In Proceedings of the Sixth ACM Symposium on Solid Modeling and Applications, Ann Arbor, MI, USA, 4–8 June 2001; pp. 159–170.
- Masuda, H. Topological operators and boolean operations for complex-based nonmanifold geometric models. Comput. Aided Des.
**1993**, 25, 119–129. [Google Scholar] [CrossRef] - Ledoux, H.; Gold, C.M. Simultaneous storage of primal and dual three-dimensional subdivisions. Comput. Environ. Urban Syst.
**2007**, 31, 393–408. [Google Scholar] [CrossRef] - Ledoux, H. Modelling Three-Dimensional Fields in Geoscience with the Voronoi Diagram and Its Dual. Ph.D. Thesis, University of Glamorgan, Pontypridd, UK, 2006. [Google Scholar]
- Weiler, K. The radial edge data structure: A topological representation for non-manifold geometric boundary modeling. In Geometric Modeling for Cad Applications; Encarnacao, J.L., Wozny, M.J., McLaughlin, H.W., Eds.; Elsevier: Amsterdam, The Netherlands, 1988; pp. 3–36. [Google Scholar]
- Boguslawski, P. Modelling and Analysing 3D Building Interiors with the Dual Half-Edge Data Structure. Ph.D. Thesis, University of Glamorgan, Wales, UK, 2011. [Google Scholar]
- Grünbaum, B.; Shephard, G.C. Tilings and patterns; W.H. Freeman & Company: New York, NY, USA, 1986; p. 700. [Google Scholar]
- Masuda, H.; Shimada, K.; Numao, M.; Kawabe, S. A mathematical theory and applications of non-manifold geometric modeling. In Proceedings of the International Symposium on Advanced Geometric Modeling for Engineering Applications, Berlin, Germany, 8–10 November 1989; pp. 89–103.
- Stroud, I. Boundary Representation Modelling Techniques; Springer: New York, NY, USA, 2006. [Google Scholar]
- Akleman, E.; Chen, J.; Gross, J.L. Block meshes: Topologically robust shape modeling with graphs embedded on 3-manifolds. Comput. Graph.
**2015**, 46, 306–326. [Google Scholar] [CrossRef] - Lee, K. Principles of CAD/CAM/CAE Systems; Prentice Hall: Upper Saddle River, NJ, USA, 1999; p. 582. [Google Scholar]
- Yamaguchi, Y.; Kimura, F. Nonmanifold topology based on coupling entities. IEEE Comput. Graph. Appl.
**1995**, 15, 42–50. [Google Scholar] [CrossRef] - Yamaguchi, Y.; Kobayashi, K.; Kimura, F. Geometric Modeling with Generalized Topology and Geometry for Product Engineering. In Product Modeling for Computer-Aided Design and Manufacturing; Turner, J., Pegna, J., Wozny, M., Eds.; Elsevier: Amsterdam, the Netherlands, 1991; pp. 97–115. [Google Scholar]
- Zeng, L.; Liu, Y.-J.; Lee, S.H.; Yuen, M.M.-F. Q-complex: Efficient non-manifold boundary representation with inclusion topology. Comput. Aided Des.
**2012**, 44, 1115–1126. [Google Scholar] [CrossRef] - Cazier, D.; Kraemer, P. X-maps: An efficient model for non-manifold modeling. In Proceedings of the International Conference on Shape Modeling (SMI), Washington, DC, USA, 21–23 June 2010; pp. 226–230.
- De Floriani, L.; Magillo, P.; Puppo, E.; Sobrero, D. A multi-resolution topological representation for non-manifold meshes. Comput. Aided Des.
**2004**, 36, 141–159. [Google Scholar] [CrossRef] - DiCarlo, A.; Paoluzzi, A.; Shapiro, V. Linear algebraic representation for topological structures. Comput. Aided Des.
**2014**, 46, 269–274. [Google Scholar] [CrossRef] - Gursoz, E.L.; Choi, Y.; Prinz, F.B. Vertex-based boundary representation of non-manifold boundaries. In Geometric Modeling for Product Engineering; Wozny, M.J., Turner, J.U., Priess, K., Eds.; North Holland: Amsterdam, The Netherlands, 1990; pp. 107–130. [Google Scholar]
- Lienhardt, P. Topological models for boundary representation: A comparison with n-dimensional generalized maps. Comput. Aided Des.
**1991**, 23, 59–82. [Google Scholar] [CrossRef] - Yu, Z.; Luo, W.; Yuan, L.; Hu, Y.; Zhu, A.X.; Lü, G. Geometric algebra model for geometry-oriented topological relation computation. Trans. GIS
**2015**. [Google Scholar] [CrossRef] - Yuan, L.; Yu, Z.; Luo, W.; Zhou, L.; Lü, G. A 3D GIS spatial data model based on conformal geometric algebra. Sci. China Earth Sci.
**2011**, 54, 101–112. [Google Scholar] [CrossRef] - Dijkstra, E.W. A note on two problems in connexion with graphs. Numer. Math.
**1959**, 1, 269–271. [Google Scholar] [CrossRef] - Boguslawski, P.; Gold, C. Buildings and terrain unified—Multidimensional dual data structure for GIS. Geo-Spat. Inf. Sci.
**2015**, 18, 151–158. [Google Scholar] [CrossRef] - Anton, F.; Boguslawski, P.; Mioc, D. The dual half-arc data structure: Towards the universal b-rep data structure. In Geoinformation for Informed Decisions; Abdul Rahman, A., Boguslawski, P., Anton, F., Said, M.N., Omar, K.M., Eds.; Springer: Berlin, Germany, 2014; pp. 103–117. [Google Scholar]
- Boguslawski, P.; Mahdjoubi, L.; Zverovich, V.; Barki, H.; Fadli, F. Automated construction of variable density navigable networks in a 3D indoor environment for emergency response. Autom. Constr.
**2016**. under review. [Google Scholar] - Kraft, B.; Huhnt, W. Geometrically complete building models. In Proceedings of the 21th International Workshop: Intelligent Computing in Engineering, Cardiff, UK, 16–18 July 2014.

**Figure 1.**Two-manifolds and non-manifolds: the surface of (

**a**) a sphere; (

**b**) a cube; (

**c**) a torus is a two-manifold; two cubes joined by (

**d**) a vertex; (

**e**) an edge; (

**f**) a face form a non-manifold object.

**Figure 2.**3D Poincaré duality: (

**a**) primal vertex corresponds to a dual cell (volume); (

**b**) primal edge corresponds to a dual face; (

**c**) primal face corresponds to a dual edge; (

**d**) primal cell corresponds to a dual vertex.

**Figure 3.**Connections between cells: (

**a**) adjacent cells, that share a face (grey), are connected by a dual edge (dashed line); (

**b**) a dual edge is represented as a bundle of edges penetrating a face; (

**c**) each one of the edges from the bundle belongs to a cell surrounding one of the face vertices.

**Figure 4.**Holes and cavities: (

**a**) hole in a face-bridge edge e

_{b}connects internal face loop f

_{INT}with the outside loop f

_{OUT}; (

**b**) cavity in a cell-bridge face f

_{b}connects internal cell c

_{INT}with the outside cell c

_{OUT}.

**Figure 6.**A half-edge symbol: (

**a**) a flag representation; (

**b**) the direction emphasised with an arrow.

**Figure 7.**Half-edges in a cell are topologically connected and form: (

**a**) an edge; (

**b**) a star; (

**c**) a loop.

**Figure 8.**Navigational operators: (

**a**) Sym; (

**b**) Next

_{V}; (

**c**) Next

_{F}; (

**d**) Next

_{E}(compound operator).

**Figure 9.**The Adjacent operator: (

**a**) the grey face is shared by adjacent cells c

_{1}and c

_{2}; (

**b**) the Adjacent operator allows for navigation between cells: from e in c

_{1}to e.Adjacent in c

_{2}.

**Figure 10.**Construction operators organized in layers: level 3—the Euler and extended Euler operators; level 2—compound operators; level 1—simple operators; level 0—dual half-edge operators.

**Figure 17.**Two buildings from the University of Glamorgan campus connected by an above-ground passage modelled using the DHE data structure: (

**a**) light-grey cells represent terrain, grey cells represent rooms, dark-grey cells represent the above-ground passage between buildings; (

**b**) an above-ground passage between two buildings—dark cells.

**Figure 21.**The shortest paths (dark-grey, external terrain represented by light-grey cells) between two rooms (black): (

**a**) the path entirely inside the building; (

**b**) the path calculated considering an external terrain; (

**c**) the shortest path between a room and the closest exit.

Abbreviation | Operator Name |
---|---|

MEVVFS/KEVVFS | Make/Kill Edge, Vertex, Vertex, Face and Shell |

MEV/KEV | Make/Kill Edge and Vertex |

MVE/KVE | Make/Kill Vertex and Edge |

MZEV/KZEV | Make/Kill Zero-length Edge and Vertex |

MEF/KEF | Make/Kill Edge and Face |

Join/Separate by Face | |

Join/Separate by Edge | |

Join/Separate by Vertex | |

Merge/Split by Face | |

Merge/Split by Edge | |

Merge/Split by Vertex |

S | N_{V} | N_{F} | D | V | |
---|---|---|---|---|---|

a | b | a | b | e | P1 |

b | a | b | a | g | P2 |

c | d | c | d | f | P1 |

d | c | d | c | h | P2 |

e | f | e | f | a | I |

f | e | f | e | c | E |

g | h | g | h | b | I |

h | g | h | g | d | E |

Data Structure (x) | Total Size | Ratio (x/RE) | Ratio (x/PE) |
---|---|---|---|

Radial-edge (RE) [10] | 1,457,303B | 100% | 226% |

Partial-entity (PE) [10] | 644,192B | 44% | 100% |

Full DHE | 1,056,000B | 72% | 163% |

Simplified DHE (no N_{F} pointer) (version a) | 844,800B | 57% | 131% |

Simplified DHE (no dual) (version b) | 422,400B | 28% | 65% |

© 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons by Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Boguslawski, P.; Gold, C.
The Dual Half-Edge—A Topological Primal/Dual Data Structure and Construction Operators for Modelling and Manipulating Cell Complexes. *ISPRS Int. J. Geo-Inf.* **2016**, *5*, 19.
https://doi.org/10.3390/ijgi5020019

**AMA Style**

Boguslawski P, Gold C.
The Dual Half-Edge—A Topological Primal/Dual Data Structure and Construction Operators for Modelling and Manipulating Cell Complexes. *ISPRS International Journal of Geo-Information*. 2016; 5(2):19.
https://doi.org/10.3390/ijgi5020019

**Chicago/Turabian Style**

Boguslawski, Pawel, and Christopher Gold.
2016. "The Dual Half-Edge—A Topological Primal/Dual Data Structure and Construction Operators for Modelling and Manipulating Cell Complexes" *ISPRS International Journal of Geo-Information* 5, no. 2: 19.
https://doi.org/10.3390/ijgi5020019