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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user