Revision: 20356 http://sourceforge.net/p/jmol/code/20356 Author: hansonr Date: 2015-03-05 03:23:13 +0000 (Thu, 05 Mar 2015) Log Message: ----------- Jmol.___JmolVersion="14.3.12_2015.03.05b" synchronized with 14.2.13_2015.03.05
bug fix: reading legacy mapped plane (2ptn-molecular_slice1.jvxl.txt) crashes Jmol Modified Paths: -------------- trunk/Jmol/src/org/jmol/jvxl/calc/MarchingSquares.java trunk/Jmol/src/org/jmol/jvxl/readers/JvxlReader.java trunk/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java trunk/Jmol/src/org/jmol/shape/Shape.java trunk/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/jvxl/calc/MarchingSquares.java =================================================================== --- trunk/Jmol/src/org/jmol/jvxl/calc/MarchingSquares.java 2015-03-05 03:22:19 UTC (rev 20355) +++ trunk/Jmol/src/org/jmol/jvxl/calc/MarchingSquares.java 2015-03-05 03:23:13 UTC (rev 20356) @@ -113,6 +113,11 @@ void setValue(float value) { this.value = value; } + + @Override + public String toString() { + return value + " " + x + " " + y + " " + z; + } } @@ -167,7 +172,6 @@ * @return 0 */ public int addTriangle(int iA, int iB, int iC, int check, int iContour) { - //System.out.println("addT " + iA + " " + iB + " " + iC); if (triangleCount == triangles.length) triangles = (Triangle[]) AU.doubleLength(triangles); triangles[triangleCount++] = new Triangle(iA, iB, iC, check, iContour); @@ -253,11 +257,12 @@ cutoff = (cutoff < 0 ? -zeroOffset : zeroOffset); contourValuesUsed[i] = cutoff; - Logger.info("#contour " + (i + 1)+ " " + cutoff); + Logger.info("#contour " + (i + 1)+ " " + cutoff + " " + triangleCount); htPts.clear(); - for (int ii = triangleCount; --ii >= 0;) + for (int ii = triangleCount; --ii >= 0;) { if (triangles[ii].isValid) checkContour(triangles[ii], i, cutoff); + } if (thisContour > 0) { if (i + 1 == thisContour) minCutoff = cutoff; @@ -305,7 +310,6 @@ return htPts.get(key).intValue(); float valueA = contourVertexes[iA].value; float valueB = contourVertexes[iB].value; - //System.out.println(iA + " " + iB + " " + valueA + " " + value + " " + valueB); int iPt = -1; if (valueA != valueB) { float f = (value - valueA) / (valueB - valueA); @@ -331,9 +335,6 @@ private void checkContour(Triangle t, int i, float value) { if (thisContour > 0 && i + 1 != thisContour) return; - //System.out.println(" ms i=" + i + " " + contourVertexes[pts[0]].value + " " + contourVertexes[pts[1]].value + " " + contourVertexes[pts[2]].value + " " + value); - //System.out.println(pts[0] + " " + pts[1] + " " + pts[2]); - //System.out.println(contourVertexes[pts[0]] + "\n" + contourVertexes[pts[1]] + "\n" + contourVertexes[pts[2]]); int ipt0 = intercept(t, 0, value); int ipt1 = intercept(t, 1, value); int ipt2 = intercept(t, 2, value); @@ -377,7 +378,6 @@ for (int i = 0; i < triangleCount; i++) if (triangles[i].isValid) { Triangle t = triangles[i]; - //System.out.println(contourVertexes[t.pts[0]].value + " " + contourVertexes[t.pts[1]].value + " " + contourVertexes[t.pts[2]].value + " " ); surfaceReader.addTriangleCheck(t.pts[0], t.pts[1], t.pts[2], t.check, t.contourIndex, false, -1); } Modified: trunk/Jmol/src/org/jmol/jvxl/readers/JvxlReader.java =================================================================== --- trunk/Jmol/src/org/jmol/jvxl/readers/JvxlReader.java 2015-03-05 03:22:19 UTC (rev 20355) +++ trunk/Jmol/src/org/jmol/jvxl/readers/JvxlReader.java 2015-03-05 03:23:13 UTC (rev 20356) @@ -233,8 +233,8 @@ || param3 < 0); params.isBicolorMap = (param1 > 0 && param2 < 0); jvxlDataIsColorMapped = (param3 != 0); - if (jvxlDataIsColorMapped) - jvxlData.colorScheme = "RGB"; // legacy + if (jvxlDataIsColorMapped && !params.isContoured) + jvxlData.colorScheme = "RGB"; // legacy; but can't remap contours jvxlDataIs2dContour = (jvxlDataIsColorMapped && params.isContoured); if (params.isBicolorMap || params.colorBySign) Modified: trunk/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java =================================================================== --- trunk/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java 2015-03-05 03:22:19 UTC (rev 20355) +++ trunk/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java 2015-03-05 03:23:13 UTC (rev 20356) @@ -692,12 +692,13 @@ params.mappedDataMin = contourPlaneMinimumValue; params.mappedDataMax = contourPlaneMaximumValue; } - if (jvxlData.colorScheme != null) + if (jvxlData.colorScheme != null) { + boolean setContourValue = (marchingSquares != null && params.isContoured); for (int i = 0; i < vertexCount; i += vertexIncrement) { float value = vertexValues[i]; //note: these are just default colorings //orbital color had a bug through 11.2.6/11.3.6 - if (marchingSquares != null && params.isContoured) { + if (setContourValue) { marchingSquares.setContourData(i, value); continue; } @@ -707,6 +708,7 @@ colixes[i] = C.getColixTranslucent3(colix, true, jvxlData.translucency); } + } return jvxlColorDataRead + "\n"; } Modified: trunk/Jmol/src/org/jmol/shape/Shape.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/Shape.java 2015-03-05 03:22:19 UTC (rev 20355) +++ trunk/Jmol/src/org/jmol/shape/Shape.java 2015-03-05 03:23:13 UTC (rev 20356) @@ -29,6 +29,7 @@ import javajs.awt.Font; import javajs.util.Lst; +import javajs.util.PT; import javajs.util.SB; import javajs.util.T3; Modified: trunk/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java =================================================================== --- trunk/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java 2015-03-05 03:22:19 UTC (rev 20355) +++ trunk/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java 2015-03-05 03:23:13 UTC (rev 20356) @@ -798,6 +798,7 @@ // still, if the scheme is translucent, we don't want to color the vertices translucent isTranslucent = false; } + vcs = AU.ensureLengthShort(vcs, vc); // when reading contour plane may be remapped for (int i = vc; --i >= mergeVertexCount0;) vcs[i] = ce.getColorIndex(vvs[i]); setTranslucent(isTranslucent, translucentLevel); @@ -813,7 +814,6 @@ color[0] = C.getArgb(colix[0]); } } - //TODO -- still not right. if (contourValues != null) { contourColixes = new short[contourValues.length]; for (int i = 0; i < contourValues.length; i++) Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-03-05 03:22:19 UTC (rev 20355) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-03-05 03:23:13 UTC (rev 20356) @@ -14,8 +14,15 @@ TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT command for problems) -Jmol.___JmolVersion="14.3.12_2015.03.05" +Jmol.___JmolVersion="14.3.12_2015.03.05b" +synchronized with 14.2.13_2015.03.05 +bug fix: reading legacy mapped plane (2ptn-molecular_slice1.jvxl.txt) crashes Jmol + +JmolVersion="14.3.12_2015.03.05" +synchronized with 14.2.13_2015.03.05 +released + bug fix: (14.3 only) write VRML|MAYA|OBJ|POVRAY broken JmolVersion="14.3.12_2015.03.01" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits