Which is, I believe, enforcing the constraint that
the Euler characteristic of the 3D (odd-dimensional manifold) is
This is true only if you have a 3D manifold without boundary which
is not the case of your two examples below. (One solution to compute
Euler characteristic of an object with boundary is to count cells
that must be present in the corresponding closed object, which
explain the null set in the reference ).
For a ball (a 3D manifold with one boundary), the Euler
characteristic is 1.
Note that this is also only true if your have only one connected
component in your object.
there is another problem: the formula is
vertex_count-edge_count+face_count-cell_count (you inverse the
Now if I look at the (2,3) Pachner move implemented
by flip(Cell_handle, facet) I count as follows: