Why would 40 faces / 32 vertices have 120 edges

Started by
1 comment, last by BBeck 7 years ago

I put the found edges from a face into a set, and each of those will differ

if their vertex ids or vertex ids reverses (2 of them) are not the same But finally, still 120 edges are reported....

I speculate there would be only 64 edges in 32 vertices and 40 faces....

Let's say I had 40 faces at first. I iterate thru them, say for face1,

it has edge0, 1 and 2 and put them into a std::set....

Advertisement

Slow down. What is the mesh you find puzzling? What topological and structural constraints do you expect it to have? Are they hoped for or actually enforced? it's an important question because an arbitrary nonmanifold mesh can have from zero to n*(n-1)/2 distinct edges and from 0 to at least O(n*n) faces for the same set of n vertices. Only very constrained mesh types have a predictable number of edges and faces.

Omae Wa Mou Shindeiru

If your faces are triangles, then it's self evident that there will be 120 edges for 40 faces. I'm not sure what exactly you are working with, but I would start from this premise. A better question is, "Why wouldn't your 40 faces have 120 edges?" The number of vertices may tell you nothing of the number of triangles. If you have an index buffer, vertices can be reused without sharing an edge.

I would recommend reducing the problem. For example, make it two faces and try and solve the problem with just two faces and however many vertices that takes. If you can solve the simple problem, then add more to it and solve that until you get back to the original problem.

This topic is closed to new replies.

Advertisement