+
+ if( appliedCavity ) {
+ // we did apply the cavity, and we may
+ // have introduced new bad triangles
+ HashMapIterator it2 = cavity.getPost().newBad(mesh).iterator();
+ while (it2.hasNext()) {
+ worklist.push((Node)it2.next());
+ }
+ }
+
+ // the logic of having this out here seems wacky, and overconservative,
+ // but it matches the original algorithm and it works...
+ if( nodeForBadTri != null && mesh.containsNode( nodeForBadTri ) ) {
+ worklist.push( nodeForBadTri );
+ }