Update cut_to_disk.cpp

Fixed a bug in my implementation (did not correctly update all data structures when reversing the direction of traversal of a cut when hitting a dead end).
This commit is contained in:
evouga
2018-10-25 16:56:29 -05:00
committed by GitHub
parent ed363da1f6
commit d7cd36b42e
+6
View File
@@ -261,6 +261,12 @@ namespace igl {
// we've hit a dead end. reverse and try the other direction
std::reverse(cycleverts.begin(), cycleverts.end());
std::reverse(cycleedges.begin(), cycleedges.end());
cycleidx.clear();
for (Index i = 0; i < cycleverts.size(); i++)
{
cycleidx[cycleverts[i]] = i;
}
curvert = cycleverts.back();
cure = cycleedges.back();
while (curvert != -1 && !foundcycle)