Revision: 20965
          http://sourceforge.net/p/jmol/code/20965
Author:   hansonr
Date:     2016-02-27 18:59:52 +0000 (Sat, 27 Feb 2016)
Log Message:
-----------
Jmol.___JmolVersion="14.4.3_2016.02.27"

bug fix: [function:"yyy",Function:"zzz"] fails to retain key capitalization 
after first entry for special names
bug fix: (JavaScript only) polyhedra not saved in state
bug fix: (Applet) broken image in coverImage
bug fix: polyhedra DELETE can crash Jmol if polyhedra are not colored 

Modified Paths:
--------------
    branches/v14_4/Jmol/src/org/jmol/script/SV.java
    branches/v14_4/Jmol/src/org/jmol/script/ScriptCompiler.java
    branches/v14_4/Jmol/src/org/jmol/script/T.java
    branches/v14_4/Jmol/src/org/jmol/shapespecial/Polyhedra.java
    branches/v14_4/Jmol/src/org/jmol/shapespecial/Polyhedron.java
    branches/v14_4/Jmol/src/org/jmol/util/MeshSlicer.java
    branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties
    trunk/Jmol/src/org/jmol/script/SV.java
    trunk/Jmol/src/org/jmol/script/ScriptCompiler.java
    trunk/Jmol/src/org/jmol/script/T.java
    trunk/Jmol/src/org/jmol/shapespecial/Polyhedra.java
    trunk/Jmol/src/org/jmol/shapespecial/Polyhedron.java
    trunk/Jmol/src/org/jmol/util/MeshSlicer.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: branches/v14_4/Jmol/src/org/jmol/script/SV.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/script/SV.java     2016-02-18 04:47:00 UTC 
(rev 20964)
+++ branches/v14_4/Jmol/src/org/jmol/script/SV.java     2016-02-27 18:59:52 UTC 
(rev 20965)
@@ -287,6 +287,8 @@
       return getVariableAD((double[]) x);
     if (AU.isAS(x))
       return getVariableAS((String[]) x);
+    //NOTE: isAP(x) does not return TRUE for Atom[] in JavaScript
+    // only occurrence of this was for Polyhedron.getInfo()
     if (AU.isAP(x))
       return getVariableAP((T3[]) x);
     if (AU.isAII(x))

Modified: branches/v14_4/Jmol/src/org/jmol/script/ScriptCompiler.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/script/ScriptCompiler.java 2016-02-18 
04:47:00 UTC (rev 20964)
+++ branches/v14_4/Jmol/src/org/jmol/script/ScriptCompiler.java 2016-02-27 
18:59:52 UTC (rev 20965)
@@ -1010,7 +1010,8 @@
   private int getPrefixToken() {
     ident = script.substring(ichToken, ichToken + cchToken);
     identLC = ident.toLowerCase();
-    boolean isUserVar = lastToken.tok != T.per && !isDotDot && 
isContextVariable(identLC);
+    boolean isUserVar = lastToken.tok != T.per && !isDotDot
+        && isContextVariable(identLC);
     String myName = ident;//(isUserVar ? ident : null);
     String preserveCase = null;
     if (nTokens == 0)
@@ -1048,14 +1049,21 @@
         theToken = T.tv(theToken.tok, theToken.intValue, ident);
     } else {
       theToken = T.getTokenFromName(identLC);
-      if (theToken != null
-          && (lastToken.tok == T.per || lastToken.tok == T.leftsquare))
-        theToken = T.o(theToken.tok, ident);
+      if (theToken != null)
+        switch (lastToken.tok) {
+        case T.per:
+        case T.leftsquare:
+        case T.comma:
+          // looking out for hash names
+          theToken = T.o(theToken.tok, ident);
+        }
     }
 
     if (theToken == null) {
       // myName is just in case this is being used as a key to a hash
-      theToken = SV.newSV((identLC.indexOf("property_") == 0 ? T.property : 
T.identifier), Integer.MAX_VALUE, ident).setName(myName);
+      theToken = SV.newSV(
+          (identLC.indexOf("property_") == 0 ? T.property : T.identifier),
+          Integer.MAX_VALUE, ident).setName(myName);
     }
     return theTok = theToken.tok;
   }

Modified: branches/v14_4/Jmol/src/org/jmol/script/T.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/script/T.java      2016-02-18 04:47:00 UTC 
(rev 20964)
+++ branches/v14_4/Jmol/src/org/jmol/script/T.java      2016-02-27 18:59:52 UTC 
(rev 20965)
@@ -1414,8 +1414,6 @@
   
   public static T getTokenFromName(String name) {
     // this one needs to NOT be lower case for ScriptCompiler
-    if (name == null)
-      System.out.println("???");
     return tokenMap.get(name);
   }
   

Modified: branches/v14_4/Jmol/src/org/jmol/shapespecial/Polyhedra.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/shapespecial/Polyhedra.java        
2016-02-18 04:47:00 UTC (rev 20964)
+++ branches/v14_4/Jmol/src/org/jmol/shapespecial/Polyhedra.java        
2016-02-27 18:59:52 UTC (rev 20965)
@@ -355,8 +355,9 @@
       for (int i = polyhedronCount; --i >= 0;) {
         Polyhedron p = polyhedrons[i];
         p.info = null;
-        int mi = (p.id == null ? p.centralAtom.mi : p.modelIndex);
-        if (mi == modelIndex) {
+        if (p.modelIndex > modelIndex) {
+          p.modelIndex--;
+        } else if (p.modelIndex == modelIndex) {
           polyhedronCount--;
           polyhedrons = (Polyhedron[]) AU.deleteElements(polyhedrons, i, 1);
         }
@@ -453,7 +454,7 @@
     if (property == "allInfo") {
       Lst<Map<String, Object>> info = new Lst<Map<String, Object>>();
       for (int i = polyhedronCount; --i >= 0;)
-        info.addLast(polyhedrons[i].getInfo(vwr, true));
+        info.addLast(polyhedrons[i].getInfo(vwr, false));
       data[1] = info;
       return true;
     }
@@ -461,7 +462,7 @@
       p = findPoly(id, iatom, true);
       if (p == null)
         return false;
-      data[1] = p.getInfo(vwr, true);
+      data[1] = p.getInfo(vwr, false);
       return true;
     }
     return getPropShape(property, data);
@@ -504,7 +505,7 @@
   public Lst<Map<String, Object>> getShapeDetail() {
     Lst<Map<String, Object>> lst = new Lst<Map<String, Object>>();
     for (int i = 0; i < polyhedronCount; i++)
-      lst.addLast(polyhedrons[i].getInfo(vwr, true));
+      lst.addLast(polyhedrons[i].getInfo(vwr, false));
     return lst;
   }
 
@@ -526,7 +527,7 @@
     for (int i = 0; i < polyhedronCount; ++i) {
       Polyhedron p = polyhedrons[i];
       if (bs.get(i)) {
-        if (p.id == null)
+        if (colixes != null && p.id == null)
           setColixAndPalette(C.INHERIT_ALL, pid, p.centralAtom.i);
         continue;
       }
@@ -1078,7 +1079,7 @@
       if (p.id == null) {
         if (ms.at[p.centralAtom.i].isDeleted())
           p.isValid = false;
-        p.visibilityFlags = (p.visible && bsModels.get(p.centralAtom.mi)
+        p.visibilityFlags = (p.visible && bsModels.get(p.modelIndex)
             && !ms.isAtomHidden(p.centralAtom.i)
             && !ms.at[p.centralAtom.i].isDeleted() ? vf : 0);
         if (p.visibilityFlags != 0)

Modified: branches/v14_4/Jmol/src/org/jmol/shapespecial/Polyhedron.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/shapespecial/Polyhedron.java       
2016-02-18 04:47:00 UTC (rev 20964)
+++ branches/v14_4/Jmol/src/org/jmol/shapespecial/Polyhedron.java       
2016-02-27 18:59:52 UTC (rev 20965)
@@ -77,10 +77,14 @@
       int[][] triangles, int triangleCount, int[][] faces, V3[] normals, BS 
bsFlat, boolean collapsed, float distanceRef) {
     
     this.distanceRef = distanceRef;
-    centralAtom = (id == null  ? (Atom) atomOrPt : null);
-    center = (centralAtom == null ? (P3) atomOrPt : null);
-    this.modelIndex = (centralAtom == null ? modelIndex : centralAtom.mi);
-    this.id = id;
+    if (id == null) {
+      centralAtom = (Atom) atomOrPt;
+      this.modelIndex = centralAtom.mi;
+    } else {
+      this.id = id;
+      center = atomOrPt;
+      this.modelIndex = modelIndex;
+    }
     this.nVertices = vertexCount;
     this.vertices = new P3[nPoints + 1];
     this.normals = new V3[triangleCount];
@@ -177,12 +181,43 @@
     return ai;
   }
 
-  Map<String, Object> getInfo(Viewer vwr, boolean isAll) {
-    if (isAll && this.info != null && !Logger.debugging)
+  Map<String, Object> getInfo(Viewer vwr, boolean isState) {
+    if (!isState && this.info != null && !Logger.debugging)
       return this.info;
     Map<String, Object> info = new Hashtable<String, Object>();
-    int mi = (id == null ? centralAtom.mi : modelIndex);
-    if (isAll) {
+
+    info.put("vertexCount", Integer.valueOf(nVertices));
+    
+    // get COPY of vertices to prevent script variable from referencing Atom
+    int nv = (isState ? vertices.length : nVertices);
+    P3[] pts = new P3[nv];
+    for (int i = 0; i < nv; i++)
+      pts[i] = P3.newP(vertices[i]);
+    info.put("vertices", pts);
+
+    int[] elemNos = new int[nVertices];
+    for (int i = 0; i < nVertices; i++) {
+      P3 pt = vertices[i];
+      elemNos[i] = (pt instanceof Node ? ((Node) pt).getElementNumber()
+          : pt instanceof Point3fi ? ((Point3fi) pt).sD : -2);
+    }
+    info.put("elemNos", elemNos);
+
+    if (id == null) {
+      info.put("atomIndex", Integer.valueOf(centralAtom.i));
+    } else {
+      info.put("id", id);
+      info.put("center", P3.newP(center));
+      info.put("color", C.getHexCode(colix));
+      info.put("colorEdge", C.getHexCode(colixEdge == 0 ? colix : colixEdge));
+      if (offset != null)
+        info.put("offset", offset);
+      if (scale != 1)
+        info.put("scale", Float.valueOf(scale));
+    }
+    if (id != null || !isState)
+      info.put("modelIndex", Integer.valueOf(modelIndex));
+    if (!isState) {
       this.info = info;
       if (id == null) {
         info.put("center", P3.newP(centralAtom));
@@ -196,40 +231,38 @@
       }
       info.put("triangleCount", Integer.valueOf(triangles.length));
       info.put("volume", getVolume());
+
       String[] names = new String[nVertices];
+      int[] indices = new int[nVertices];
       for (int i = nVertices; --i >= 0;) {
         P3 pt = vertices[i];
-        names[i] = (pt instanceof Node ? ((Node) pt).getAtomName()
+        boolean isNode = pt instanceof Node;
+        names[i] = (isNode ? ((Node) pt).getAtomName()
             : pt instanceof Point3fi ? Elements
                 .elementSymbolFromNumber(((Point3fi) pt).sD) : "");
+        indices[i] = (isNode ? ((Node) pt).getIndex() : -1);
       }
+      info.put("atomNames", names);
+      info.put("vertexIndices", indices);
+
       if (faces != null)
         info.put("faceCount", Integer.valueOf(faces.length));
-      info.put("atomNames", names);
+
       if (smarts != null)
         info.put("smarts", smarts);
       if (smiles != null)
         info.put("smiles", smiles);
       if (polySmiles != null)
         info.put("polySmiles", polySmiles);
+
       if (pointGroup != null)
         info.put("pointGroup", pointGroup.getPointGroupName());
       if (pointGroupFamily != null)
         info.put("pointGroupFamily", pointGroupFamily.getPointGroupName());
     }
-    if (id != null) {
-      info.put("id", id);
-      info.put("modelIndex", Integer.valueOf(mi));
-      info.put("color", C.getHexCode(colix));
-      info.put("colorEdge", C.getHexCode(colixEdge == 0 ? colix : colixEdge));
-      if (offset != null)
-        info.put("offset", offset);
-      if (scale != 1)
-        info.put("scale", Float.valueOf(scale));
-    }
     if (faces != null)
       info.put("faces", faces);
-    if (!isAll || Logger.debugging) {
+    if (isState || Logger.debugging) {
       info.put("bsFlat", bsFlat);
       if (collapsed)
         info.put("collapsed", Boolean.valueOf(collapsed));
@@ -241,22 +274,6 @@
       info.put("normals", n);
       info.put("triangles", AU.arrayCopyII(triangles, triangles.length));
     }
-    info.put("vertexCount", Integer.valueOf(nVertices));
-    if (center == null) {
-      info.put("atomIndex", Integer.valueOf(centralAtom.i));
-    } else {
-      info.put("id", id);
-      info.put("center", P3.newP(center));
-    }
-    info.put("vertices",
-        AU.arrayCopyPt(vertices, (isAll ? nVertices : vertices.length)));
-    int[] elemNos = new int[nVertices];
-    for (int i = 0; i < nVertices; i++) {
-      P3 pt = vertices[i];
-      elemNos[i] = (pt instanceof Node ? ((Node) pt).getElementNumber()
-          : pt instanceof Point3fi ? ((Point3fi) pt).sD : -2);
-    }
-    info.put("elemNos", elemNos);
     return info;
   }
 
@@ -330,7 +347,7 @@
 
   String getState(Viewer vwr) {
     String ident = (id == null ? "({"+centralAtom.i+"})" : "ID " + 
Escape.e(id));
-    return "  polyhedron" + " @{" + Escape.e(getInfo(vwr, false)) + "} " 
+    return "  polyhedron" + " @{" + Escape.e(getInfo(vwr, true)) + "} " 
         + (isFullyLit ? " fullyLit" : "") + ";"
         + (visible ? "" : "polyhedra " + ident + " off;") + "\n";
   }

Modified: branches/v14_4/Jmol/src/org/jmol/util/MeshSlicer.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/util/MeshSlicer.java       2016-02-18 
04:47:00 UTC (rev 20964)
+++ branches/v14_4/Jmol/src/org/jmol/util/MeshSlicer.java       2016-02-27 
18:59:52 UTC (rev 20965)
@@ -241,7 +241,7 @@
         wPlane = 0;
       }
     }
-    
+
     if (fData == null) {
       if (tokType == T.decimal && bsSource != null) {
         if (m.vertexSource == null)
@@ -257,8 +257,7 @@
     if (m.pc == 0) {
       for (int i = m.mergeVertexCount0; i < m.vc; i++) {
         if (Float.isNaN(fData[i])
-            || checkSlab(tokType, m.vs[i], fData[i], distance,
-                bsSource) > 0)
+            || checkSlab(tokType, m.vs[i], fData[i], distance, bsSource) > 0)
           m.bsSlabDisplay.clear(i);
       }
       return;
@@ -266,40 +265,58 @@
     if (ptCenters != null || isGhost)
       andCap = false; // can only cap faces, and no capping of ghosts
     if (andCap && capper == null)
-      capper = ((MeshCapper) 
Interface.getInterface("org.jmol.util.MeshCapper", m.vwr, "script")).set(this);
+      capper = ((MeshCapper) Interface.getInterface("org.jmol.util.MeshCapper",
+          m.vwr, "script")).set(this);
     if (capper != null)
       capper.clear();
     double absD = Math.abs(distance);
     Map<String, Integer> mapEdge = new Hashtable<String, Integer>();
+    BS bsD = BS.newN(m.vc);
+    float[] d = new float[m.vc];
+    float d1 = 0, d2 = 0, d3 = 0, valA, valB, valC;
     for (int i = m.mergePolygonCount0, iLast = m.pc; i < iLast; i++) {
-      float d1, d2, d3, valA, valB, valC;      
-      int[] face = m.setABC(i); 
+      int[] face = m.setABC(i);
       if (face == null)
         continue;
       BS bsSlab = (m.bsSlabGhost != null && m.bsSlabGhost.get(i) ? 
m.bsSlabGhost
           : m.bsSlabDisplay);
       int check1 = face[MeshSurface.P_CHECK];
       int iContour = (m.dataOnly ? 0 : face[MeshSurface.P_CONTOUR]);
-      T3 vA = m.vs[m.iA];
-      T3 vB = m.vs[m.iB];
-      T3 vC = m.vs[m.iC];
-      valA = fData[m.iA];
-      valB = fData[m.iB];
-      valC = fData[m.iC];
+      int ia = m.iA;
+      int ib = m.iB;
+      int ic = m.iC;
+      T3 vA = m.vs[ia];
+      T3 vB = m.vs[ib];
+      T3 vC = m.vs[ic];
+      valA = fData[ia];
+      valB = fData[ib];
+      valC = fData[ic];
       if (m.vertexSource != null) {
-        sources[0] = m.vertexSource[m.iA];
-        sources[1] = m.vertexSource[m.iB];
-        sources[2] = m.vertexSource[m.iC];
+        sources[0] = m.vertexSource[ia];
+        sources[1] = m.vertexSource[ib];
+        sources[2] = m.vertexSource[ic];
       }
-      int thisSet = (m.vertexSets == null ? 0 : m.vertexSets[m.iA]);
-      d1 = checkSlab(tokType, vA, valA, (bsSource == null ? distance
-          : sources[0]), bsSource);
-      d2 = checkSlab(tokType, vB, valB, (bsSource == null ? distance
-          : sources[1]), bsSource);
-      d3 = checkSlab(tokType, vC, valC, (bsSource == null ? distance
-          : sources[2]), bsSource);
+      if (!bsD.get(ia)) {
+        bsD.set(ia);
+        d[ia] = checkSlab(tokType, vA, valA, (bsSource == null ? distance
+            : sources[0]), bsSource);
+      }
+      if (!bsD.get(ib)) {
+        bsD.set(ib);
+        d[ib] = checkSlab(tokType, vB, valB, (bsSource == null ? distance
+            : sources[1]), bsSource);
+      }
+      if (!bsD.get(ic)) {
+        bsD.set(ic);
+        d[ic] = checkSlab(tokType, vC, valC, (bsSource == null ? distance
+            : sources[2]), bsSource);
+      }
+      d1 = d[ia];
+      d2 = d[ib];
+      d3 = d[ic];
       int test1 = (d1 != 0 && d1 < 0 ? 1 : 0) + (d2 != 0 && d2 < 0 ? 2 : 0)
           + (d3 != 0 && d3 < 0 ? 4 : 0);
+      int thisSet = (m.vertexSets == null ? 0 : m.vertexSets[ia]);
 
       /*      
             if (iA == 955 || iB == 955 || iC == 955) {
@@ -340,8 +357,7 @@
       case 6:
         // BC on same side
         if (ptCenters == null)
-          p = new P3[] {
-              interpolatePoint(vA, vB, -d1, d2, valA, valB, 0),
+          p = new P3[] { interpolatePoint(vA, vB, -d1, d2, valA, valB, 0),
               interpolatePoint(vA, vC, -d1, d3, valA, valC, 1) };
         else
           p = new P3[] {
@@ -352,8 +368,7 @@
       case 5:
         //AC on same side
         if (ptCenters == null)
-          p = new P3[] {
-              interpolatePoint(vB, vA, -d2, d1, valB, valA, 1),
+          p = new P3[] { interpolatePoint(vB, vA, -d2, d1, valB, valA, 1),
               interpolatePoint(vB, vC, -d2, d3, valB, valC, 0) };
         else
           p = new P3[] {
@@ -364,8 +379,7 @@
       case 4:
         //AB on same side need A-C, B-C
         if (ptCenters == null)
-          p = new P3[] {
-              interpolatePoint(vC, vA, -d3, d1, valC, valA, 0),
+          p = new P3[] { interpolatePoint(vC, vA, -d3, d1, valC, valA, 0),
               interpolatePoint(vC, vB, -d3, d2, valC, valB, 1) };
         else
           p = new P3[] {
@@ -405,32 +419,32 @@
           boolean tossBC = (test1 == 1);
           if (tossBC || isGhost) {
             // 1: BC on side to toss -- +tossBC+isGhost  -tossBC+isGhost
-            if (!getDE(fracs, 0, m.iA, m.iB, m.iC, tossBC))
+            if (!getDE(fracs, 0, ia, ib, ic, tossBC))
               break;
             if (iD < 0)
-              iD = addIntersectionVertex(p[0], values[0], sources[0],
-                  thisSet, mapEdge, m.iA, m.iB);
+              iD = addIntersectionVertex(p[0], values[0], sources[0], thisSet,
+                  mapEdge, ia, ib);
             if (iE < 0)
-              iE = addIntersectionVertex(p[1], values[1], sources[0],
-                  thisSet, mapEdge, m.iA, m.iC);
+              iE = addIntersectionVertex(p[1], values[1], sources[0], thisSet,
+                  mapEdge, ia, ic);
             bs = (tossBC ? bsSlab : m.bsSlabGhost);
-            m.addPolygonV3(m.iA, iD, iE, check1 & 5 | 2, iContour, 0, bs);
+            m.addPolygonV3(ia, iD, iE, check1 & 5 | 2, iContour, 0, bs);
             if (!isGhost)
               break;
           }
           // BC on side to keep -- -tossBC+isGhost,  +tossBC+isGhost
-          if (!getDE(fracs, 1, m.iA, m.iC, m.iB, tossBC))
+          if (!getDE(fracs, 1, ia, ic, ib, tossBC))
             break;
           bs = (tossBC ? m.bsSlabGhost : bsSlab);
           if (iE < 0) {
             iE = addIntersectionVertex(p[0], values[0], sources[1], thisSet,
-                mapEdge, m.iA, m.iB);
-            m.addPolygonV3(iE, m.iB, m.iC, check1 & 3, iContour, 0, bs);
+                mapEdge, ia, ib);
+            m.addPolygonV3(iE, ib, ic, check1 & 3, iContour, 0, bs);
           }
           if (iD < 0) {
             iD = addIntersectionVertex(p[1], values[1], sources[2], thisSet,
-                mapEdge, m.iA, m.iC);
-            m.addPolygonV3(iD, iE, m.iC, check1 & 4 | 1, iContour, 0, bs);
+                mapEdge, ia, ic);
+            m.addPolygonV3(iD, iE, ic, check1 & 4 | 1, iContour, 0, bs);
           }
           break;
         case 5:
@@ -444,32 +458,32 @@
           boolean tossAC = (test1 == 2);
           if (tossAC || isGhost) {
             //AC on side to toss
-            if (!getDE(fracs, 0, m.iB, m.iC, m.iA, tossAC))
+            if (!getDE(fracs, 0, ib, ic, ia, tossAC))
               break;
             bs = (tossAC ? bsSlab : m.bsSlabGhost);
             if (iE < 0)
-              iE = addIntersectionVertex(p[0], values[0], sources[1],
-                  thisSet, mapEdge, m.iB, m.iA);
+              iE = addIntersectionVertex(p[0], values[0], sources[1], thisSet,
+                  mapEdge, ib, ia);
             if (iD < 0)
-              iD = addIntersectionVertex(p[1], values[1], sources[1],
-                  thisSet, mapEdge, m.iB, m.iC);
-            m.addPolygonV3(iE, m.iB, iD, check1 & 3 | 4, iContour, 0, bs);
+              iD = addIntersectionVertex(p[1], values[1], sources[1], thisSet,
+                  mapEdge, ib, ic);
+            m.addPolygonV3(iE, ib, iD, check1 & 3 | 4, iContour, 0, bs);
             if (!isGhost)
               break;
           }
           // AC on side to keep
-          if (!getDE(fracs, 1, m.iB, m.iA, m.iC, tossAC))
+          if (!getDE(fracs, 1, ib, ia, ic, tossAC))
             break;
           bs = (tossAC ? m.bsSlabGhost : bsSlab);
           if (iD < 0) {
             iD = addIntersectionVertex(p[0], values[0], sources[0], thisSet,
-                mapEdge, m.iB, m.iA);
-            m.addPolygonV3(m.iA, iD, m.iC, check1 & 5, iContour, 0, bs);
+                mapEdge, ib, ia);
+            m.addPolygonV3(ia, iD, ic, check1 & 5, iContour, 0, bs);
           }
           if (iE < 0) {
             iE = addIntersectionVertex(p[1], values[1], sources[2], thisSet,
-                mapEdge, m.iB, m.iC);
-            m.addPolygonV3(iD, iE, m.iC, check1 & 2 | 1, iContour, 0, bs);
+                mapEdge, ib, ic);
+            m.addPolygonV3(iD, iE, ic, check1 & 2 | 1, iContour, 0, bs);
           }
           break;
         case 4:
@@ -482,32 +496,32 @@
           //
           boolean tossAB = (test1 == 4);
           if (tossAB || isGhost) {
-            if (!getDE(fracs, 0, m.iC, m.iA, m.iB, tossAB))
+            if (!getDE(fracs, 0, ic, ia, ib, tossAB))
               break;
             if (iD < 0)
-              iD = addIntersectionVertex(p[0], values[0], sources[2],
-                  thisSet, mapEdge, m.iA, m.iC); //CA
+              iD = addIntersectionVertex(p[0], values[0], sources[2], thisSet,
+                  mapEdge, ia, ic); //CA
             if (iE < 0)
-              iE = addIntersectionVertex(p[1], values[1], sources[2],
-                  thisSet, mapEdge, m.iB, m.iC); //CB
+              iE = addIntersectionVertex(p[1], values[1], sources[2], thisSet,
+                  mapEdge, ib, ic); //CB
             bs = (tossAB ? bsSlab : m.bsSlabGhost);
-            m.addPolygonV3(iD, iE, m.iC, check1 & 6 | 1, iContour, 0, bs);
+            m.addPolygonV3(iD, iE, ic, check1 & 6 | 1, iContour, 0, bs);
             if (!isGhost)
               break;
           }
           //AB on side to keep
-          if (!getDE(fracs, 1, m.iC, m.iB, m.iA, tossAB))
+          if (!getDE(fracs, 1, ic, ib, ia, tossAB))
             break;
           bs = (tossAB ? m.bsSlabGhost : bsSlab);
           if (iE < 0) {
             iE = addIntersectionVertex(p[0], values[0], sources[0], thisSet,
-                mapEdge, m.iA, m.iC); //CA
-            m.addPolygonV3(m.iA, m.iB, iE, check1 & 5, iContour, 0, bs);
+                mapEdge, ia, ic); //CA
+            m.addPolygonV3(ia, ib, iE, check1 & 5, iContour, 0, bs);
           }
           if (iD < 0) {
             iD = addIntersectionVertex(p[1], values[1], sources[1], thisSet,
-                mapEdge, m.iB, m.iC); //CB
-            m.addPolygonV3(iE, m.iB, iD, check1 & 2 | 4, iContour, 0, bs);
+                mapEdge, ib, ic); //CB
+            m.addPolygonV3(iE, ib, iD, check1 & 2 | 4, iContour, 0, bs);
           }
           break;
         }

Modified: branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties     2016-02-18 
04:47:00 UTC (rev 20964)
+++ branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties     2016-02-27 
18:59:52 UTC (rev 20965)
@@ -7,8 +7,17 @@
 
 # see also http://chemapps.stolaf.edu/jmol/zip for daily updates
        
-Jmol.___JmolVersion="14.4.3_2016.02.17"
 
+Jmol.___JmolVersion="14.4.3_2016.02.27"
+
+bug fix: [function:"yyy",Function:"zzz"] fails to retain key capitalization 
after first entry for special names
+bug fix: (JavaScript only) polyhedra not saved in state
+bug fix: (Applet) broken image in coverImage
+bug fix: polyhedra DELETE can crash Jmol if polyhedra are not colored 
+
+
+JmolVersion="14.4.3_2016.02.18"
+
 bug fix: slab/depth SET do not behave properly
 bug fix: select VISIBLE is not properly set based on slab/depth SET 
 

Modified: trunk/Jmol/src/org/jmol/script/SV.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/SV.java      2016-02-18 04:47:00 UTC (rev 
20964)
+++ trunk/Jmol/src/org/jmol/script/SV.java      2016-02-27 18:59:52 UTC (rev 
20965)
@@ -287,6 +287,8 @@
       return getVariableAD((double[]) x);
     if (AU.isAS(x))
       return getVariableAS((String[]) x);
+    //NOTE: isAP(x) does not return TRUE for Atom[] in JavaScript
+    // only occurrence of this was for Polyhedron.getInfo()
     if (AU.isAP(x))
       return getVariableAP((T3[]) x);
     if (AU.isAII(x))

Modified: trunk/Jmol/src/org/jmol/script/ScriptCompiler.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/ScriptCompiler.java  2016-02-18 04:47:00 UTC 
(rev 20964)
+++ trunk/Jmol/src/org/jmol/script/ScriptCompiler.java  2016-02-27 18:59:52 UTC 
(rev 20965)
@@ -1010,7 +1010,8 @@
   private int getPrefixToken() {
     ident = script.substring(ichToken, ichToken + cchToken);
     identLC = ident.toLowerCase();
-    boolean isUserVar = lastToken.tok != T.per && !isDotDot && 
isContextVariable(identLC);
+    boolean isUserVar = lastToken.tok != T.per && !isDotDot
+        && isContextVariable(identLC);
     String myName = ident;//(isUserVar ? ident : null);
     String preserveCase = null;
     if (nTokens == 0)
@@ -1048,14 +1049,21 @@
         theToken = T.tv(theToken.tok, theToken.intValue, ident);
     } else {
       theToken = T.getTokenFromName(identLC);
-      if (theToken != null
-          && (lastToken.tok == T.per || lastToken.tok == T.leftsquare))
-        theToken = T.o(theToken.tok, ident);
+      if (theToken != null)
+        switch (lastToken.tok) {
+        case T.per:
+        case T.leftsquare:
+        case T.comma:
+          // looking out for hash names
+          theToken = T.o(theToken.tok, ident);
+        }
     }
 
     if (theToken == null) {
       // myName is just in case this is being used as a key to a hash
-      theToken = SV.newSV((identLC.indexOf("property_") == 0 ? T.property : 
T.identifier), Integer.MAX_VALUE, ident).setName(myName);
+      theToken = SV.newSV(
+          (identLC.indexOf("property_") == 0 ? T.property : T.identifier),
+          Integer.MAX_VALUE, ident).setName(myName);
     }
     return theTok = theToken.tok;
   }

Modified: trunk/Jmol/src/org/jmol/script/T.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/T.java       2016-02-18 04:47:00 UTC (rev 
20964)
+++ trunk/Jmol/src/org/jmol/script/T.java       2016-02-27 18:59:52 UTC (rev 
20965)
@@ -1414,8 +1414,6 @@
   
   public static T getTokenFromName(String name) {
     // this one needs to NOT be lower case for ScriptCompiler
-    if (name == null)
-      System.out.println("???");
     return tokenMap.get(name);
   }
   

Modified: trunk/Jmol/src/org/jmol/shapespecial/Polyhedra.java
===================================================================
--- trunk/Jmol/src/org/jmol/shapespecial/Polyhedra.java 2016-02-18 04:47:00 UTC 
(rev 20964)
+++ trunk/Jmol/src/org/jmol/shapespecial/Polyhedra.java 2016-02-27 18:59:52 UTC 
(rev 20965)
@@ -355,8 +355,9 @@
       for (int i = polyhedronCount; --i >= 0;) {
         Polyhedron p = polyhedrons[i];
         p.info = null;
-        int mi = (p.id == null ? p.centralAtom.mi : p.modelIndex);
-        if (mi == modelIndex) {
+        if (p.modelIndex > modelIndex) {
+          p.modelIndex--;
+        } else if (p.modelIndex == modelIndex) {
           polyhedronCount--;
           polyhedrons = (Polyhedron[]) AU.deleteElements(polyhedrons, i, 1);
         }
@@ -453,7 +454,7 @@
     if (property == "allInfo") {
       Lst<Map<String, Object>> info = new Lst<Map<String, Object>>();
       for (int i = polyhedronCount; --i >= 0;)
-        info.addLast(polyhedrons[i].getInfo(vwr, true));
+        info.addLast(polyhedrons[i].getInfo(vwr, false));
       data[1] = info;
       return true;
     }
@@ -461,7 +462,7 @@
       p = findPoly(id, iatom, true);
       if (p == null)
         return false;
-      data[1] = p.getInfo(vwr, true);
+      data[1] = p.getInfo(vwr, false);
       return true;
     }
     return getPropShape(property, data);
@@ -504,7 +505,7 @@
   public Lst<Map<String, Object>> getShapeDetail() {
     Lst<Map<String, Object>> lst = new Lst<Map<String, Object>>();
     for (int i = 0; i < polyhedronCount; i++)
-      lst.addLast(polyhedrons[i].getInfo(vwr, true));
+      lst.addLast(polyhedrons[i].getInfo(vwr, false));
     return lst;
   }
 
@@ -526,7 +527,7 @@
     for (int i = 0; i < polyhedronCount; ++i) {
       Polyhedron p = polyhedrons[i];
       if (bs.get(i)) {
-        if (p.id == null)
+        if (colixes != null && p.id == null)
           setColixAndPalette(C.INHERIT_ALL, pid, p.centralAtom.i);
         continue;
       }
@@ -1078,7 +1079,7 @@
       if (p.id == null) {
         if (ms.at[p.centralAtom.i].isDeleted())
           p.isValid = false;
-        p.visibilityFlags = (p.visible && bsModels.get(p.centralAtom.mi)
+        p.visibilityFlags = (p.visible && bsModels.get(p.modelIndex)
             && !ms.isAtomHidden(p.centralAtom.i)
             && !ms.at[p.centralAtom.i].isDeleted() ? vf : 0);
         if (p.visibilityFlags != 0)

Modified: trunk/Jmol/src/org/jmol/shapespecial/Polyhedron.java
===================================================================
--- trunk/Jmol/src/org/jmol/shapespecial/Polyhedron.java        2016-02-18 
04:47:00 UTC (rev 20964)
+++ trunk/Jmol/src/org/jmol/shapespecial/Polyhedron.java        2016-02-27 
18:59:52 UTC (rev 20965)
@@ -77,10 +77,14 @@
       int[][] triangles, int triangleCount, int[][] faces, V3[] normals, BS 
bsFlat, boolean collapsed, float distanceRef) {
     
     this.distanceRef = distanceRef;
-    centralAtom = (id == null  ? (Atom) atomOrPt : null);
-    center = (centralAtom == null ? (P3) atomOrPt : null);
-    this.modelIndex = (centralAtom == null ? modelIndex : centralAtom.mi);
-    this.id = id;
+    if (id == null) {
+      centralAtom = (Atom) atomOrPt;
+      this.modelIndex = centralAtom.mi;
+    } else {
+      this.id = id;
+      center = atomOrPt;
+      this.modelIndex = modelIndex;
+    }
     this.nVertices = vertexCount;
     this.vertices = new P3[nPoints + 1];
     this.normals = new V3[triangleCount];
@@ -177,12 +181,43 @@
     return ai;
   }
 
-  Map<String, Object> getInfo(Viewer vwr, boolean isAll) {
-    if (isAll && this.info != null && !Logger.debugging)
+  Map<String, Object> getInfo(Viewer vwr, boolean isState) {
+    if (!isState && this.info != null && !Logger.debugging)
       return this.info;
     Map<String, Object> info = new Hashtable<String, Object>();
-    int mi = (id == null ? centralAtom.mi : modelIndex);
-    if (isAll) {
+
+    info.put("vertexCount", Integer.valueOf(nVertices));
+    
+    // get COPY of vertices to prevent script variable from referencing Atom
+    int nv = (isState ? vertices.length : nVertices);
+    P3[] pts = new P3[nv];
+    for (int i = 0; i < nv; i++)
+      pts[i] = P3.newP(vertices[i]);
+    info.put("vertices", pts);
+
+    int[] elemNos = new int[nVertices];
+    for (int i = 0; i < nVertices; i++) {
+      P3 pt = vertices[i];
+      elemNos[i] = (pt instanceof Node ? ((Node) pt).getElementNumber()
+          : pt instanceof Point3fi ? ((Point3fi) pt).sD : -2);
+    }
+    info.put("elemNos", elemNos);
+
+    if (id == null) {
+      info.put("atomIndex", Integer.valueOf(centralAtom.i));
+    } else {
+      info.put("id", id);
+      info.put("center", P3.newP(center));
+      info.put("color", C.getHexCode(colix));
+      info.put("colorEdge", C.getHexCode(colixEdge == 0 ? colix : colixEdge));
+      if (offset != null)
+        info.put("offset", offset);
+      if (scale != 1)
+        info.put("scale", Float.valueOf(scale));
+    }
+    if (id != null || !isState)
+      info.put("modelIndex", Integer.valueOf(modelIndex));
+    if (!isState) {
       this.info = info;
       if (id == null) {
         info.put("center", P3.newP(centralAtom));
@@ -196,40 +231,38 @@
       }
       info.put("triangleCount", Integer.valueOf(triangles.length));
       info.put("volume", getVolume());
+
       String[] names = new String[nVertices];
+      int[] indices = new int[nVertices];
       for (int i = nVertices; --i >= 0;) {
         P3 pt = vertices[i];
-        names[i] = (pt instanceof Node ? ((Node) pt).getAtomName()
+        boolean isNode = pt instanceof Node;
+        names[i] = (isNode ? ((Node) pt).getAtomName()
             : pt instanceof Point3fi ? Elements
                 .elementSymbolFromNumber(((Point3fi) pt).sD) : "");
+        indices[i] = (isNode ? ((Node) pt).getIndex() : -1);
       }
+      info.put("atomNames", names);
+      info.put("vertexIndices", indices);
+
       if (faces != null)
         info.put("faceCount", Integer.valueOf(faces.length));
-      info.put("atomNames", names);
+
       if (smarts != null)
         info.put("smarts", smarts);
       if (smiles != null)
         info.put("smiles", smiles);
       if (polySmiles != null)
         info.put("polySmiles", polySmiles);
+
       if (pointGroup != null)
         info.put("pointGroup", pointGroup.getPointGroupName());
       if (pointGroupFamily != null)
         info.put("pointGroupFamily", pointGroupFamily.getPointGroupName());
     }
-    if (id != null) {
-      info.put("id", id);
-      info.put("modelIndex", Integer.valueOf(mi));
-      info.put("color", C.getHexCode(colix));
-      info.put("colorEdge", C.getHexCode(colixEdge == 0 ? colix : colixEdge));
-      if (offset != null)
-        info.put("offset", offset);
-      if (scale != 1)
-        info.put("scale", Float.valueOf(scale));
-    }
     if (faces != null)
       info.put("faces", faces);
-    if (!isAll || Logger.debugging) {
+    if (isState || Logger.debugging) {
       info.put("bsFlat", bsFlat);
       if (collapsed)
         info.put("collapsed", Boolean.valueOf(collapsed));
@@ -241,22 +274,6 @@
       info.put("normals", n);
       info.put("triangles", AU.arrayCopyII(triangles, triangles.length));
     }
-    info.put("vertexCount", Integer.valueOf(nVertices));
-    if (center == null) {
-      info.put("atomIndex", Integer.valueOf(centralAtom.i));
-    } else {
-      info.put("id", id);
-      info.put("center", P3.newP(center));
-    }
-    info.put("vertices",
-        AU.arrayCopyPt(vertices, (isAll ? nVertices : vertices.length)));
-    int[] elemNos = new int[nVertices];
-    for (int i = 0; i < nVertices; i++) {
-      P3 pt = vertices[i];
-      elemNos[i] = (pt instanceof Node ? ((Node) pt).getElementNumber()
-          : pt instanceof Point3fi ? ((Point3fi) pt).sD : -2);
-    }
-    info.put("elemNos", elemNos);
     return info;
   }
 
@@ -330,7 +347,7 @@
 
   String getState(Viewer vwr) {
     String ident = (id == null ? "({"+centralAtom.i+"})" : "ID " + 
Escape.e(id));
-    return "  polyhedron" + " @{" + Escape.e(getInfo(vwr, false)) + "} " 
+    return "  polyhedron" + " @{" + Escape.e(getInfo(vwr, true)) + "} " 
         + (isFullyLit ? " fullyLit" : "") + ";"
         + (visible ? "" : "polyhedra " + ident + " off;") + "\n";
   }

Modified: trunk/Jmol/src/org/jmol/util/MeshSlicer.java
===================================================================
--- trunk/Jmol/src/org/jmol/util/MeshSlicer.java        2016-02-18 04:47:00 UTC 
(rev 20964)
+++ trunk/Jmol/src/org/jmol/util/MeshSlicer.java        2016-02-27 18:59:52 UTC 
(rev 20965)
@@ -241,7 +241,7 @@
         wPlane = 0;
       }
     }
-    
+
     if (fData == null) {
       if (tokType == T.decimal && bsSource != null) {
         if (m.vertexSource == null)
@@ -257,8 +257,7 @@
     if (m.pc == 0) {
       for (int i = m.mergeVertexCount0; i < m.vc; i++) {
         if (Float.isNaN(fData[i])
-            || checkSlab(tokType, m.vs[i], fData[i], distance,
-                bsSource) > 0)
+            || checkSlab(tokType, m.vs[i], fData[i], distance, bsSource) > 0)
           m.bsSlabDisplay.clear(i);
       }
       return;
@@ -266,40 +265,58 @@
     if (ptCenters != null || isGhost)
       andCap = false; // can only cap faces, and no capping of ghosts
     if (andCap && capper == null)
-      capper = ((MeshCapper) 
Interface.getInterface("org.jmol.util.MeshCapper", m.vwr, "script")).set(this);
+      capper = ((MeshCapper) Interface.getInterface("org.jmol.util.MeshCapper",
+          m.vwr, "script")).set(this);
     if (capper != null)
       capper.clear();
     double absD = Math.abs(distance);
     Map<String, Integer> mapEdge = new Hashtable<String, Integer>();
+    BS bsD = BS.newN(m.vc);
+    float[] d = new float[m.vc];
+    float d1 = 0, d2 = 0, d3 = 0, valA, valB, valC;
     for (int i = m.mergePolygonCount0, iLast = m.pc; i < iLast; i++) {
-      float d1, d2, d3, valA, valB, valC;      
-      int[] face = m.setABC(i); 
+      int[] face = m.setABC(i);
       if (face == null)
         continue;
       BS bsSlab = (m.bsSlabGhost != null && m.bsSlabGhost.get(i) ? 
m.bsSlabGhost
           : m.bsSlabDisplay);
       int check1 = face[MeshSurface.P_CHECK];
       int iContour = (m.dataOnly ? 0 : face[MeshSurface.P_CONTOUR]);
-      T3 vA = m.vs[m.iA];
-      T3 vB = m.vs[m.iB];
-      T3 vC = m.vs[m.iC];
-      valA = fData[m.iA];
-      valB = fData[m.iB];
-      valC = fData[m.iC];
+      int ia = m.iA;
+      int ib = m.iB;
+      int ic = m.iC;
+      T3 vA = m.vs[ia];
+      T3 vB = m.vs[ib];
+      T3 vC = m.vs[ic];
+      valA = fData[ia];
+      valB = fData[ib];
+      valC = fData[ic];
       if (m.vertexSource != null) {
-        sources[0] = m.vertexSource[m.iA];
-        sources[1] = m.vertexSource[m.iB];
-        sources[2] = m.vertexSource[m.iC];
+        sources[0] = m.vertexSource[ia];
+        sources[1] = m.vertexSource[ib];
+        sources[2] = m.vertexSource[ic];
       }
-      int thisSet = (m.vertexSets == null ? 0 : m.vertexSets[m.iA]);
-      d1 = checkSlab(tokType, vA, valA, (bsSource == null ? distance
-          : sources[0]), bsSource);
-      d2 = checkSlab(tokType, vB, valB, (bsSource == null ? distance
-          : sources[1]), bsSource);
-      d3 = checkSlab(tokType, vC, valC, (bsSource == null ? distance
-          : sources[2]), bsSource);
+      if (!bsD.get(ia)) {
+        bsD.set(ia);
+        d[ia] = checkSlab(tokType, vA, valA, (bsSource == null ? distance
+            : sources[0]), bsSource);
+      }
+      if (!bsD.get(ib)) {
+        bsD.set(ib);
+        d[ib] = checkSlab(tokType, vB, valB, (bsSource == null ? distance
+            : sources[1]), bsSource);
+      }
+      if (!bsD.get(ic)) {
+        bsD.set(ic);
+        d[ic] = checkSlab(tokType, vC, valC, (bsSource == null ? distance
+            : sources[2]), bsSource);
+      }
+      d1 = d[ia];
+      d2 = d[ib];
+      d3 = d[ic];
       int test1 = (d1 != 0 && d1 < 0 ? 1 : 0) + (d2 != 0 && d2 < 0 ? 2 : 0)
           + (d3 != 0 && d3 < 0 ? 4 : 0);
+      int thisSet = (m.vertexSets == null ? 0 : m.vertexSets[ia]);
 
       /*      
             if (iA == 955 || iB == 955 || iC == 955) {
@@ -340,8 +357,7 @@
       case 6:
         // BC on same side
         if (ptCenters == null)
-          p = new P3[] {
-              interpolatePoint(vA, vB, -d1, d2, valA, valB, 0),
+          p = new P3[] { interpolatePoint(vA, vB, -d1, d2, valA, valB, 0),
               interpolatePoint(vA, vC, -d1, d3, valA, valC, 1) };
         else
           p = new P3[] {
@@ -352,8 +368,7 @@
       case 5:
         //AC on same side
         if (ptCenters == null)
-          p = new P3[] {
-              interpolatePoint(vB, vA, -d2, d1, valB, valA, 1),
+          p = new P3[] { interpolatePoint(vB, vA, -d2, d1, valB, valA, 1),
               interpolatePoint(vB, vC, -d2, d3, valB, valC, 0) };
         else
           p = new P3[] {
@@ -364,8 +379,7 @@
       case 4:
         //AB on same side need A-C, B-C
         if (ptCenters == null)
-          p = new P3[] {
-              interpolatePoint(vC, vA, -d3, d1, valC, valA, 0),
+          p = new P3[] { interpolatePoint(vC, vA, -d3, d1, valC, valA, 0),
               interpolatePoint(vC, vB, -d3, d2, valC, valB, 1) };
         else
           p = new P3[] {
@@ -405,32 +419,32 @@
           boolean tossBC = (test1 == 1);
           if (tossBC || isGhost) {
             // 1: BC on side to toss -- +tossBC+isGhost  -tossBC+isGhost
-            if (!getDE(fracs, 0, m.iA, m.iB, m.iC, tossBC))
+            if (!getDE(fracs, 0, ia, ib, ic, tossBC))
               break;
             if (iD < 0)
-              iD = addIntersectionVertex(p[0], values[0], sources[0],
-                  thisSet, mapEdge, m.iA, m.iB);
+              iD = addIntersectionVertex(p[0], values[0], sources[0], thisSet,
+                  mapEdge, ia, ib);
             if (iE < 0)
-              iE = addIntersectionVertex(p[1], values[1], sources[0],
-                  thisSet, mapEdge, m.iA, m.iC);
+              iE = addIntersectionVertex(p[1], values[1], sources[0], thisSet,
+                  mapEdge, ia, ic);
             bs = (tossBC ? bsSlab : m.bsSlabGhost);
-            m.addPolygonV3(m.iA, iD, iE, check1 & 5 | 2, iContour, 0, bs);
+            m.addPolygonV3(ia, iD, iE, check1 & 5 | 2, iContour, 0, bs);
             if (!isGhost)
               break;
           }
           // BC on side to keep -- -tossBC+isGhost,  +tossBC+isGhost
-          if (!getDE(fracs, 1, m.iA, m.iC, m.iB, tossBC))
+          if (!getDE(fracs, 1, ia, ic, ib, tossBC))
             break;
           bs = (tossBC ? m.bsSlabGhost : bsSlab);
           if (iE < 0) {
             iE = addIntersectionVertex(p[0], values[0], sources[1], thisSet,
-                mapEdge, m.iA, m.iB);
-            m.addPolygonV3(iE, m.iB, m.iC, check1 & 3, iContour, 0, bs);
+                mapEdge, ia, ib);
+            m.addPolygonV3(iE, ib, ic, check1 & 3, iContour, 0, bs);
           }
           if (iD < 0) {
             iD = addIntersectionVertex(p[1], values[1], sources[2], thisSet,
-                mapEdge, m.iA, m.iC);
-            m.addPolygonV3(iD, iE, m.iC, check1 & 4 | 1, iContour, 0, bs);
+                mapEdge, ia, ic);
+            m.addPolygonV3(iD, iE, ic, check1 & 4 | 1, iContour, 0, bs);
           }
           break;
         case 5:
@@ -444,32 +458,32 @@
           boolean tossAC = (test1 == 2);
           if (tossAC || isGhost) {
             //AC on side to toss
-            if (!getDE(fracs, 0, m.iB, m.iC, m.iA, tossAC))
+            if (!getDE(fracs, 0, ib, ic, ia, tossAC))
               break;
             bs = (tossAC ? bsSlab : m.bsSlabGhost);
             if (iE < 0)
-              iE = addIntersectionVertex(p[0], values[0], sources[1],
-                  thisSet, mapEdge, m.iB, m.iA);
+              iE = addIntersectionVertex(p[0], values[0], sources[1], thisSet,
+                  mapEdge, ib, ia);
             if (iD < 0)
-              iD = addIntersectionVertex(p[1], values[1], sources[1],
-                  thisSet, mapEdge, m.iB, m.iC);
-            m.addPolygonV3(iE, m.iB, iD, check1 & 3 | 4, iContour, 0, bs);
+              iD = addIntersectionVertex(p[1], values[1], sources[1], thisSet,
+                  mapEdge, ib, ic);
+            m.addPolygonV3(iE, ib, iD, check1 & 3 | 4, iContour, 0, bs);
             if (!isGhost)
               break;
           }
           // AC on side to keep
-          if (!getDE(fracs, 1, m.iB, m.iA, m.iC, tossAC))
+          if (!getDE(fracs, 1, ib, ia, ic, tossAC))
             break;
           bs = (tossAC ? m.bsSlabGhost : bsSlab);
           if (iD < 0) {
             iD = addIntersectionVertex(p[0], values[0], sources[0], thisSet,
-                mapEdge, m.iB, m.iA);
-            m.addPolygonV3(m.iA, iD, m.iC, check1 & 5, iContour, 0, bs);
+                mapEdge, ib, ia);
+            m.addPolygonV3(ia, iD, ic, check1 & 5, iContour, 0, bs);
           }
           if (iE < 0) {
             iE = addIntersectionVertex(p[1], values[1], sources[2], thisSet,
-                mapEdge, m.iB, m.iC);
-            m.addPolygonV3(iD, iE, m.iC, check1 & 2 | 1, iContour, 0, bs);
+                mapEdge, ib, ic);
+            m.addPolygonV3(iD, iE, ic, check1 & 2 | 1, iContour, 0, bs);
           }
           break;
         case 4:
@@ -482,32 +496,32 @@
           //
           boolean tossAB = (test1 == 4);
           if (tossAB || isGhost) {
-            if (!getDE(fracs, 0, m.iC, m.iA, m.iB, tossAB))
+            if (!getDE(fracs, 0, ic, ia, ib, tossAB))
               break;
             if (iD < 0)
-              iD = addIntersectionVertex(p[0], values[0], sources[2],
-                  thisSet, mapEdge, m.iA, m.iC); //CA
+              iD = addIntersectionVertex(p[0], values[0], sources[2], thisSet,
+                  mapEdge, ia, ic); //CA
             if (iE < 0)
-              iE = addIntersectionVertex(p[1], values[1], sources[2],
-                  thisSet, mapEdge, m.iB, m.iC); //CB
+              iE = addIntersectionVertex(p[1], values[1], sources[2], thisSet,
+                  mapEdge, ib, ic); //CB
             bs = (tossAB ? bsSlab : m.bsSlabGhost);
-            m.addPolygonV3(iD, iE, m.iC, check1 & 6 | 1, iContour, 0, bs);
+            m.addPolygonV3(iD, iE, ic, check1 & 6 | 1, iContour, 0, bs);
             if (!isGhost)
               break;
           }
           //AB on side to keep
-          if (!getDE(fracs, 1, m.iC, m.iB, m.iA, tossAB))
+          if (!getDE(fracs, 1, ic, ib, ia, tossAB))
             break;
           bs = (tossAB ? m.bsSlabGhost : bsSlab);
           if (iE < 0) {
             iE = addIntersectionVertex(p[0], values[0], sources[0], thisSet,
-                mapEdge, m.iA, m.iC); //CA
-            m.addPolygonV3(m.iA, m.iB, iE, check1 & 5, iContour, 0, bs);
+                mapEdge, ia, ic); //CA
+            m.addPolygonV3(ia, ib, iE, check1 & 5, iContour, 0, bs);
           }
           if (iD < 0) {
             iD = addIntersectionVertex(p[1], values[1], sources[1], thisSet,
-                mapEdge, m.iB, m.iC); //CB
-            m.addPolygonV3(iE, m.iB, iD, check1 & 2 | 4, iContour, 0, bs);
+                mapEdge, ib, ic); //CB
+            m.addPolygonV3(iE, ib, iD, check1 & 2 | 4, iContour, 0, bs);
           }
           break;
         }

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2016-02-18 04:47:00 UTC 
(rev 20964)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2016-02-27 18:59:52 UTC 
(rev 20965)
@@ -65,8 +65,15 @@
 TODO: isosurface molecular has an issue with 2gb1
 TODO: slab SET will not be rendered correctly when exported because 
tm.transformPoint
 
-Jmol.___JmolVersion="14.5.3_2016.02.17"
+Jmol.___JmolVersion="14.5.3_2016.02.27"
 
+bug fix: [function:"yyy",Function:"zzz"] fails to retain key capitalization 
after first entry for special names
+bug fix: (JavaScript only) polyhedra not saved in state
+bug fix: (Applet) broken image in coverImage
+bug fix: polyhedra DELETE can crash Jmol if polyhedra are not colored 
+
+JmolVersion="14.5.3_2016.02.17"
+
 bug fix: slab/depth SET do not behave properly
 bug fix: select VISIBLE is not properly set based on slab/depth SET 
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to