# Failure Case with QuadEdgeMesh and Cuberille

**URL:** <https://discourse.itk.org/t/failure-case-with-quadedgemesh-and-cuberille/3565>\
**Category:** Algorithms\
**Created:** [October 23, 2020, 12:02am UTC](https://discourse.itk.org/t/failure-case-with-quadedgemesh-and-cuberille/3565 "2020-10-23T00:02:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DVigneault](https://discourse.itk.org/user_avatar/discourse.itk.org/dvigneault/32/189_2.png) [@DVigneault](https://discourse.itk.org/u/DVigneault)\
**Post date:** [October 23, 2020, 12:02am UTC](https://discourse.itk.org/t/failure-case-with-quadedgemesh-and-cuberille/3565/1 "2020-10-23T00:02:39Z")

</div>

Hello all!

I’ve run into a bug in the `Cuberille` remote module, and have finally gotten it down to an MCE which reproduces the issue. I’ve posted a more detailed description of the problem [as a github issue](https://github.com/InsightSoftwareConsortium/ITKCuberille/issues/66), but wanted to post here as well for greater visibility. In brief, there are certain cases (surprisingly common in my datasets) where, in order to extract a proper manifold surface from a segmentation image, it is necessary to create two distinct edges which connect _the same two vertices_. `itk::QuadEdgeMesh::AddFace` refuses to create an edge between two vertices which are already connected by an edge. This is the correct behavior in most circumstances, but results in a bug here. I’m not entirely sure how to approach fixing this issue, and was hoping someone in the group could provide some guidance.

Best, and thanks in advance!

–Davis
