Revision: 20863 http://sourceforge.net/p/jmol/code/20863 Author: hansonr Date: 2015-11-12 13:18:22 +0000 (Thu, 12 Nov 2015) Log Message: ----------- Jmol.___JmolVersion="14.5.0_2015.11.12"
bug fix: 3x3 and 4x4 matrix multiplication of points changes the point itself. Modified Paths: -------------- branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/script/ScriptMathProcessor.java trunk/Jmol/src/org/jmol/shape/Mesh.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties 2015-11-10 14:48:02 UTC (rev 20862) +++ branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties 2015-11-12 13:18:22 UTC (rev 20863) @@ -8,10 +8,14 @@ # see also http://chemapps.stolaf.edu/jmol/zip for daily updates +Jmol.___JmolVersion="14.4.0_2015.11.12" + +bug fix: 3x3 and 4x4 matrix multiplication of points changes the point itself. + Jmol.___JmolVersion="14.4.0_2015.11.06" bug fix: restoring bonds to a model having fewer bonds than the model for which they were saved throws an exception -bug fix: mCIF does not read incommensurately modulated mCIF files +bug fix: CIF reader does not read incommensurately modulated magCIF files bug fix: WRITE xxx.ZIP crashes Jmol bug fix: POLYHEDRA ... {xxx} TO {yyy} not working Modified: trunk/Jmol/src/org/jmol/script/ScriptMathProcessor.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptMathProcessor.java 2015-11-10 14:48:02 UTC (rev 20862) +++ trunk/Jmol/src/org/jmol/script/ScriptMathProcessor.java 2015-11-12 13:18:22 UTC (rev 20863) @@ -1255,7 +1255,7 @@ return (isDecimal(x2) || isDecimal(x1) ? addXFloat(x1.asFloat() * x2.asFloat()) : addXInt(x1.asInt() * x2.asInt())); } - pt = (x1.tok == T.matrix3f ? ptValue(x2) + pt = (x1.tok == T.matrix3f || x1.tok == T.matrix4f ? ptValue(x2) : x2.tok == T.matrix3f ? ptValue(x1) : null); pt4 = (x1.tok == T.matrix4f ? planeValue(x2) : x2.tok == T.matrix4f ? planeValue(x1) : null); @@ -1268,9 +1268,10 @@ // pt * m M3 m3b = M3.newM3((M3) x2.value); m3b.transpose(); - m3b.rotate(pt); + P3 pt1 = P3.newP(pt); + m3b.rotate(pt1); return (x1.tok == T.varray ? addX(SV.getVariableAF(new float[] { - pt.x, pt.y, pt.z })) : addXPt(pt)); + pt1.x, pt1.y, pt1.z })) : addXPt(pt1)); } if (pt4 != null) // q * m --> q @@ -1283,9 +1284,10 @@ if (pt4 != null) { M4 m4b = M4.newM4((M4) x2.value); m4b.transpose(); - m4b.transform(pt4); + P4 pt41 = P4.newPt(pt4); + m4b.transform(pt41); return (x1.tok == T.varray ? addX(SV.getVariableAF(new float[] { - pt4.x, pt4.y, pt4.z, pt4.w })) : addXPt4(pt4)); + pt41.x, pt41.y, pt41.z, pt41.w })) : addXPt4(pt41)); } break; } @@ -1293,9 +1295,10 @@ case T.matrix3f: M3 m3 = (M3) x1.value; if (pt != null) { - m3.rotate(pt); + P3 pt1 = P3.newP(pt); + m3.rotate(pt1); return (x2.tok == T.varray ? addX(SV.getVariableAF(new float[] { - pt.x, pt.y, pt.z })) : addXPt(pt)); + pt1.x, pt1.y, pt1.z })) : addXPt(pt1)); } switch (x2.tok) { case T.matrix3f: @@ -1315,9 +1318,10 @@ case T.matrix4f: M4 m4 = (M4) x1.value; if (pt != null) { - m4.rotTrans(pt); + P3 pt1 = P3.newP(pt); + m4.rotTrans(pt1); return (x2.tok == T.varray ? addX(SV.getVariableAF(new float[] { - pt.x, pt.y, pt.z })) : addXPt(pt)); + pt1.x, pt1.y, pt1.z })) : addXPt(pt1)); } if (pt4 != null) { m4.transform(pt4); Modified: trunk/Jmol/src/org/jmol/shape/Mesh.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/Mesh.java 2015-11-10 14:48:02 UTC (rev 20862) +++ trunk/Jmol/src/org/jmol/shape/Mesh.java 2015-11-12 13:18:22 UTC (rev 20863) @@ -378,9 +378,9 @@ for (int i = 0; i < vc; i++) { if (vvs != null && Float.isNaN(val = vvs[i])) continue; + P3 pt = (P3) altVertices[i]; if (mat4 != null) - mat4.rotTrans(altVertices[i]); - P3 pt = (P3) altVertices[i]; + mat4.rotTrans(pt); if (normal != null && val != 0) pt.scaleAdd2(val, normal, pt); } Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-11-10 14:48:02 UTC (rev 20862) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-11-12 13:18:22 UTC (rev 20863) @@ -62,6 +62,11 @@ TODO: consider if models with no atoms will cause issues in relation to model.firstAtomIndex +Jmol.___JmolVersion="14.5.0_2015.11.12" + +bug fix: 3x3 and 4x4 matrix multiplication of points changes the point itself. + + Jmol.___JmolVersion="14.5.0_2015.11.06" bug fix: restoring bonds to a model having fewer bonds than the model for which they were saved throws an exception This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits