# Why would 40 faces / 32 vertices have 120 edges

This topic is 622 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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....

Edited by lucky6969b

##### Share on other sites

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.

Edited by LorenzoGatti

##### Share on other sites

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.

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
13
5. 5
frob
12

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633663
• Total Posts
3013236
×