Closed indigo99 closed 10 years ago
Hi Gilles, thanks for raising this issue and for including so much useful information. There's definitely something funny going on...
I will add your test case to the project and will investigate what's causing the error.
Thanks looking at this issue! I played with it a little more and it seems the bug occurs when you try to collapse a edge that's part of a triangle, and that the edge and its NextHalfedge are both adjacent to the same face.
I was able to work around the issue by detecting when that situation occurs, and instead collapse the pair edge of the NextHalfedge. This accomplishes essentially the same thing and doesn't hit the bug since that edge will be part of a face with at least 4 sides.
Thanks, Gilles.
Will, I merged your fix #19 into the main branch and I'm not seeing any more issues. The other bugs you found are never triggered in my particular script. Thanks so much for your help!
Here is my test case:
And the stack trace:
If I catch the exception and dump the state of the mesh, this is was I get:
I believe the
Halfedges.CollapseEdge
should just merge the two faces and leave me with a single face (0, 1, 2, 3). Is that right? Any idea what the issue is?