checkpoint
[anneal.git] / src / edu / berkeley / qfat / Mesh.java
index f5ce535..43927d4 100644 (file)
@@ -364,7 +364,7 @@ public class Mesh implements Iterable<Mesh.T> {
                 float minangle = (float)(Math.PI * 0.8);
                 //nerror += ((ang / Math.PI)*(ang/Math.PI)) * e.length() * 0.05;
 
-                nerror += (1-e.t.quality())*0.0001;
+                //nerror += (1-e.t.quality())*0.0001;
                 if (ang > minangle) nerror += (ang - minangle);
 
                 //System.out.println(((ang / Math.PI)*(ang/Math.PI)) * 0.000001);
@@ -399,11 +399,13 @@ public class Mesh implements Iterable<Mesh.T> {
             //     t1 =     t1.getMatrix(t2) * t2
             // M * t1 = M * t1.getMatrix(t2) * t2
 
+            /*
             if (bindingGroup!=null && this != bindingGroup.getMaster()) {
                 Matrix m2 = getBindingMatrix(bindingGroup.getMaster());
                 Vec v2 = m2.times(vv.plus(getPoint())).minus(m2.times(getPoint()));
                 return ((Vertex)bindingGroup.getMaster()).move(v2, ignoreProblems);
             }
+            */
 
             Point op = this.p;
             Point pp = vv.plus(getPoint());
@@ -621,7 +623,7 @@ public class Mesh implements Iterable<Mesh.T> {
             edu.berkeley.qfat.geom.BindingGroup<E> newBindingGroup =
                 (edu.berkeley.qfat.geom.BindingGroup<E>)newBindingGroup_;
             if (newBindingGroup==null) return;
-            if (this==newBindingGroup.getMaster()) return;
+            //if (this==newBindingGroup.getMaster()) return;
             HashSet<E> nbg = new HashSet<E>();
             for(E eother : (Iterable<E>)newBindingGroup) nbg.add(eother);
             for(E eother : nbg) {
@@ -697,8 +699,10 @@ public class Mesh implements Iterable<Mesh.T> {
                 if (e==this) continue;
                 v1.bindTo(getBindingMatrix(e), e.v1);
                 v2.bindTo(getBindingMatrix(e), e.v2);
+                /*
                 e.v1.setConstraint(getConstraint());
                 e.v2.setConstraint(getConstraint());
+                */
             }
         }