+ if (curN == startN) // we might end here
+ { doneEarly = true; break; }
+ }
+
+ // It might be the case that the lookup on start nodes made above failed because pol2 is wrongly oriented.
+ // Be somewhat flexible and keep on supporting this case here (useful for voronisation notably):
+ if(!smthHappened)
+ {
+ for(std::list<Edge *>::iterator it2=edgesInPol2OnBoundaryL.begin();it2!=edgesInPol2OnBoundaryL.end();)
+ {
+ if(curN==(*it2)->getStartNode())
+ {
+ (*it2)->incrRef();
+ (*itConstr)->pushBack(new ElementaryEdge(*it2,true));
+ curN=(*it2)->getEndNode();
+ smthHappened=true;
+ it2=edgesInPol2OnBoundaryL.erase(it2);
+ }
+ else
+ it2++;
+ if (curN == startN) // we might end here
+ { doneEarly = true; break; }
+ }