checkpoint
[anneal.git] / src / edu / berkeley / qfat / Mesh.java
index 3da4835..1484b66 100644 (file)
@@ -143,10 +143,11 @@ public class Mesh implements Iterable<Mesh.T> {
             reinsert();
             applyQuadricToNeighbor();
 
-            if (ignoreProblems) return true;
-
-            illegal = false;
-            checkLegality();
+            if (!ignoreProblems) {
+                illegal = false;
+                checkLegality();
+            }
+            for(E e = this.e; e!=null; e=e.pair.next==this.e?null:e.pair.next) e.p2.quadricStale = true;
             return !illegal;
         } 
 
@@ -154,7 +155,6 @@ public class Mesh implements Iterable<Mesh.T> {
             for(E e = this.e; e!=null; e=e.pair.next==this.e?null:e.pair.next) {
                 if (Math.abs(e.crossAngle()) > (Math.PI * 0.9) || Math.abs(e.next.crossAngle()) > (Math.PI * 0.9)) illegal = true;
                 if (e.t.aspect() < 0.1) illegal = true;
-                e.p2.quadricStale = true;
             }
             if (illegal) triangles.range(oldp, this.p, (Visitor<T>)this);
         }