From 486795fcfbcdafef415ae9f7439188c202841f16 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 17 Oct 2011 23:33:48 +0000 Subject: [PATCH] Better Comments on the Genus. --- vcg/complex/algorithms/clean.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/vcg/complex/algorithms/clean.h b/vcg/complex/algorithms/clean.h index cb9bfb9a..c514599e 100644 --- a/vcg/complex/algorithms/clean.h +++ b/vcg/complex/algorithms/clean.h @@ -1009,7 +1009,7 @@ private: For general polyhedra the Euler Formula is: - V + F - E = 2 - 2G - B + V - E + F = 2 - 2G - B where V is the number of vertices, F is the number of faces, E is the number of edges, G is the genus and B is the number of boundary polygons. @@ -1017,10 +1017,15 @@ private: The above formula is valid for a mesh with one single connected component. By considering multiple connected components the formula becomes: - V + F - E = 2C - 2Gs - B + V - E + F = 2C - 2Gs - B -> 2Gs = - ( V-E+F +B -2C) where C is the number of connected components and Gs is the sum of - the genus of all connected components.*/ + the genus of all connected components. + + Note that in the case of a mesh with boundaries the intuitive meaning of Genus is less intuitive that it could seem. + A closed sphere, a sphere with one hole (e.g. a disk) and a sphere with two holes (e.g. a tube) all of them have Genus == 0 + + */ static int MeshGenus(int nvert,int nedges,int nfaces, int numholes, int numcomponents) {