mirror of https://github.com/CGAL/cgal
Fixed stack order in non recursive conflict walking
Edges must be output in a CCW order, which is achieved by walking ccw-ly first. In the recursive function, we correctly call 'propagate(..., ccw(j))' first. For the non-recursive version which uses a stack, then we must add 'ccw(j)' last since the stack is a LIFO structure.
This commit is contained in:
parent
3b713d4d09
commit
28ce2a5240
|
|
@ -503,8 +503,11 @@ private:
|
|||
} else {
|
||||
*(pit.first)++ = fn;
|
||||
int j = fn->index(fh);
|
||||
stack.push(std::make_pair(fn,ccw(j)));
|
||||
|
||||
// In the non-recursive version, we walk via 'ccw(j)' first. Here, we are filling the stack
|
||||
// and the order is thus the opposite (we want the last element of the stack to be 'ccw(j)')
|
||||
stack.push(std::make_pair(fn,cw(j)));
|
||||
stack.push(std::make_pair(fn,ccw(j)));
|
||||
}
|
||||
}
|
||||
return pit;
|
||||
|
|
|
|||
Loading…
Reference in New Issue