What is the point of "maintaining topology" in a 3D mesh?

177 views Asked by At

I am trying to create a very simple 3D modelling application in C++. During the course of this, I have decided to implement a class for halfedge data structure solid boundary representations.

A book I am reading (Introduction to Computational Geometry) goes into detail regarding the Euler's Polyhedron Formula written as V-E+F=2 and how it is true for all topologically valid convex polyhedra (ignoring for a moment stuff like facial holes and genus).

For the purpose of maintaining the truth of this formula, the book describes how solids can be generated using Euler Operators. For example, I might begin generating a new solid using mvfs, meaning "make vertex face solid", which creates a new solid with a vertex and a face such that V-E+F=1-0+1=2. Every other operation if it adds to V or F adds also to E or if it takes from V or F also takes from E etc. so that this formula is always true. As the wikipedia page says: "Euler operators modify the mesh's graph creating or removing faces, edges and vertices according to simple rules while preserving the overall topology thus maintaining a valid boundary (i.e. not introducing holes)."

My question is twofold.

  1. First of all, how can I possibly say that the Euler Formula being true for my particular halfedge data structure implies I have a valid boundary, when I can have stuff like dangling faces without any edges or adjacent vertices (remember mvfs creates a single vertex and a single face). A mesh with a single vertex and a single face does not sound to me like a valid boundary.

  2. Even is true that solids such as those with a single vertex and a single boundary are sensible and valid boundaries, what is the point of going through such effort to maintain the truth of the Euler formula? What if I want it to be possible to create a halfedge data structure mesh with a hole it in? The point of the HEDS representation seems to be that it is easily manipulated (which is perfect for my small modeler) but I seem to be deterred from allowing the user to delete a face for example on the basis that maintaining a valid topology is so important these somewhat awkward Euler Operators exist. Operators which require always creating or deleting two of a vector/edge/face at a time instead of just creating or deleting them one at a time independently.

1

There are 1 answers

0
comingstorm On

As the programmer, it's up to you to make sure you've got well-defined boundaries if you want them. It's also your job to choose exactly what "well-defined boundaries" means for your purposes, and your responsibility to maintain them that way, for as long as you want to keep them.

For question 1: Your Wikipedia quote doesn't say that the Euler formula implies a valid boundary. Instead, it suggests that the Euler operations (not the formula, just a specific set of operations that preserve it) will preserve topology and boundaries.

For question 2: If you want an operation to make a hole in your object, then provide one! But, it is easier to break things than to fix them. Some mesh usages rely on properties like topology and valid boundaries, so you will often want to avoid breaking them by accident!

Because these properties can be useful, and preserving them can be tricky, it's worth paying attention to sets of operations that inherently preserve properties. For mesh algorithms that are not intended to punch holes in your objects, a set of building-block operations that can't do that might be handy.