Sign in to follow this  
lucky6969b

Why would 40 faces / 32 vertices have 120 edges

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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this