checkpoint
authoradam <adam@megacz.com>
Sun, 16 Dec 2007 05:40:01 +0000 (21:40 -0800)
committeradam <adam@megacz.com>
Sun, 16 Dec 2007 05:40:01 +0000 (21:40 -0800)
darcs-hash:20071216054001-5007d-43210367e778b46882f9cf687633bfb81d043107.gz

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);
         }