anchor.diff:      attributes[aNormal] = normals;
     }
   
  +  // TODO: this needs more work and may never work well
     void GenerateAveragedNormalsAssumingTriangleMode() {
  -   Map<VM.Vector3, VM.Vector3> avg = {};
  -   Map<VM.Vector3, int> cnt = {};
  +    Map<VM.Vector3, VM.Vector3> avg = <VM.Vector3, VM.Vector3>{};
  +    //Map<VM.Vector3, double> cnt = {};
       VM.Vector3 temp = new VM.Vector3.zero();
       VM.Vector3 norm = new VM.Vector3.zero();
   
  -    add(int index, VM.Vector3 n) {
  +    void add(int index, VM.Vector3 n) {
         VM.Vector3 v = vertices[index];
         if (avg.containsKey(v)) {
           avg[v] += n;
  -        cnt[v]++;
  +        //cnt[v]++;
         } else {
           avg[v] = n;
  -        cnt[v] = 1;
  +        //cnt[v] = 1;
         }
       }
   
  
positive.code:     for (Face4 f4 in _faces4) {
        NormalFromPoints(
            vertices[f4.a], vertices[f4.b], vertices[f4.c], temp, norm);
          VM.Vector3 n = norm.clone();
        add(f4.a, n);
        add(f4.b, n);
        add(f4.c, n);
  
negative.code:     }
    }
  
    void AddVerticesFace3TakeOwnershipt(List<VM.Vector3> vs) {
      assert(vs.length == 3);
      int i = vertices.length;
      _faces3.add(new Face3(i + 0, i + 1, i + 2));
      for (VM.Vector3 v in vs) {
        vertices.add(v);
      }
    }
  
    void AddAttributeDouble(String canonical, double v) {
      List<double> ts = attributes[canonical];
      ts.add(v);
    }
  
    void AddAttributesDouble(String canonical, List<double> lst) {
      List<double> ts = attributes[canonical];
      for (double v in lst) {
        ts.add(v);
      }
    }
  
    void AddAttributeVector2(String canonical, VM.Vector2 v) {
      List<VM.Vector2> ts = attributes[canonical];
      ts.add(v.clone());
    }
  
    void AddAttributesVector2(String canonical, List<VM.Vector2> lst) {
      List<VM.Vector2> ts = attributes[canonical];
      for (VM.Vector2 v in lst) {
        ts.add(v.clone());
      }
    }
  
    void AddAttributesVector2TakeOwnership(
        String canonical, List<VM.Vector2> lst) {
      List<VM.Vector2> ts = attributes[canonical];
      for (VM.Vector2 v in lst) {
        ts.add(v);
      }
    }
  
    void AddAttributeVector3(String canonical, VM.Vector3 v) {
      List<VM.Vector3> ts = attributes[canonical];
      ts.add(v.clone());
    }
  
    void AddAttributesVector3(String canonical, List<VM.Vector3> lst) {
      List<VM.Vector3> ts = attributes[canonical];
      for (VM.Vector3 v in lst) {
        ts.add(v.clone());
      }
    }
  
    void AddAttributesVector3TakeOwnership(
        String canonical, List<VM.Vector3> lst) {
      List<VM.Vector3> ts = attributes[canonical];
      for (VM.Vector3 v in lst) {
        ts.add(v);
      }
    }
  
    void AddAttributeVector4(String canonical, VM.Vector4 v) {
      List<VM.Vector4> ts = attributes[canonical];
      ts.add(v.clone());
    }
  
    void AddAttributesVector4(String canonical, List<VM.Vector4> lst) {
      List<VM.Vector4> ts = attributes[canonical];
      for (VM.Vector4 v in lst) {
        ts.add(v.clone());
      }
    }
  
    void AddAttributesVector4TakeOwnership(
        String canonical, List<VM.Vector4> lst) {
      List ts = attributes[canonical];
      for (VM.Vector4 v in lst) {
        ts.add(v);
      }
    }
  
  