From ed7948e44df10ebefad7840ddac818f2346868fe Mon Sep 17 00:00:00 2001 From: esontak Date: Mon, 20 Apr 2015 23:28:59 +0200 Subject: [PATCH] +Added debug mode flag (#5) to get output when selecting nodes and remove the output, when its not needed anymore +Added a method to the geometry2D class to get a string representation of all 3D points for debug mode -Deleted old .ugx files --- .../2.0/taskArtifacts/cache.properties.lock | Bin 17 -> 17 bytes .gradle/2.0/taskArtifacts/fileHashes.bin | Bin 23921 -> 24033 bytes .gradle/2.0/taskArtifacts/fileSnapshots.bin | Bin 182525 -> 182525 bytes .gradle/2.0/taskArtifacts/taskArtifacts.bin | Bin 32981 -> 32981 bytes src/main/java/edu/gcsc/jfx3d/Geometry2D.java | 3 ++ src/main/java/edu/gcsc/jfx3d/Main.java | 1 + .../java/edu/gcsc/jfx3d/Quadrilateral.java | 9 ++++ src/main/java/edu/gcsc/jfx3d/Triangle.java | 10 ++++ src/main/java/edu/gcsc/jfx3d/UGXReader.java | 49 +++++++++++------- .../java/edu/gcsc/jfx3d/ugx/hexahedron.ugx | 23 -------- .../edu/gcsc/jfx3d/ugx/lowResSubsetTest.ugx | 38 ++++++++++++++ src/main/java/edu/gcsc/jfx3d/ugx/prism.ugx | 24 --------- src/main/java/edu/gcsc/jfx3d/ugx/pyramid.ugx | 24 --------- .../edu/gcsc/jfx3d/ugx/testobject - Kopie.ugx | 24 --------- src/main/java/edu/gcsc/jfx3d/ugx/tetrah.ugx | 28 ---------- 15 files changed, 92 insertions(+), 141 deletions(-) delete mode 100644 src/main/java/edu/gcsc/jfx3d/ugx/hexahedron.ugx create mode 100644 src/main/java/edu/gcsc/jfx3d/ugx/lowResSubsetTest.ugx delete mode 100644 src/main/java/edu/gcsc/jfx3d/ugx/prism.ugx delete mode 100644 src/main/java/edu/gcsc/jfx3d/ugx/pyramid.ugx delete mode 100644 src/main/java/edu/gcsc/jfx3d/ugx/testobject - Kopie.ugx delete mode 100644 src/main/java/edu/gcsc/jfx3d/ugx/tetrah.ugx diff --git a/.gradle/2.0/taskArtifacts/cache.properties.lock b/.gradle/2.0/taskArtifacts/cache.properties.lock index b5e2e969e7df5595f34fa4d804c7322c147868a0..3d4d344ca96e967358f74eafeb25387cf717ab43 100644 GIT binary patch literal 17 VcmZSfou)sZp)yUB0R$NHTmd7K16=?B literal 17 WcmZSfou)sZp)yUB0R$McrUL*Y-2=VW0d36{V7|ekf2!fYR)Y1`f=WxqNPHtxE@+#K3bGL}xOb5;|iH zWPl7*0%1XhZOxxJG`LX<%U^@Bth7$oO_$P?e0PEYm@QALtqdJmGA%WS!6 z@;px^u%p1v1loNVB=a}id(GyL{;`Ze%f0vH*=UAzo&L?dVlgmJ*RkDqxj5}#tMCsQu-fQXZD2(VOkle<>?t@oSv>M2 z$d}NdXL$!waQ1qc`{XZ?-~g_M=wPV@(Xx>%Jtyl#0Rt>p`6@($aSe#BpJSypIXMbB zN?3$J645P^YbVc+iUQdY3=#l3q#i`73(8ha=8T?{H0u|TiR=hu|e8Q`8bbafX9X_V4^q%r<+DUQ$TPsqb{(uEF&>RMa+aJ_q0P&O^V*mgE delta 905 zcmZ9KZAg<*6vxk|a~P7d`BEC`e975XR!XLXp)Hzkxtghara}0@vKPdX5*3Y!h=xvY zCAKXKH*^}J49YT>CI}N*>`SJVWuc7JmS91)UhZ-EK_9rk=kh=2f6l$-Sww4(yxIfb;8Cv}j^@^D|ZZl2mJ{&mu$F^P!C>CvRz zzZc6|2Xi_xA7I9e^!jkBttHnXWXdXY-u@_c`piEr)|3jGX>MA}u|E9R^kD}hqf*uG zBtT)Iw=^!I0O0-=so1GXBrA%w0drBHfl6eiy+lLA3=XW*iUKYB2w5=rDV`KCYmRIb zsDqC@C~Qh58iqlK4F&3`Le3PO;So59w;8ut<$K3nH-Qc6Y$J~%GBi9~U|I?}3 z7PVM=(&JmlTv3<(8|XO8W8Zs~qO5J9gLnBwQ>9%cP1 z+xZ?MZhvF)3<-tF7bGM!?CWkuCQ7KZLL{ZzX zU`AP%{c13y&M3}f^F_9{)M{|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eaOc$xYidH-3#+|&U>eC`na*S|L>o81ph6gor zWIkX0{DOBFL(s3ysj)_HpHC(?xd@x;XZ_NHTY(mY57cY+Rl01?aC*VEFE~AG2^E7d zL{GzV`o+mi$t;x@uDsYjv4m+2%;%2&JJ{B z(Vs&weuO(LrfyCIhh9Bq0wgQ+rY$}AEBM9~%QGKty-wFNDZrip*ID#ufkThA#O0D9 Q6C(KX7`F#aXIgCt06y&+UH||9 diff --git a/.gradle/2.0/taskArtifacts/taskArtifacts.bin b/.gradle/2.0/taskArtifacts/taskArtifacts.bin index 2067f84e9edd3ffa318fb852b02b4eaad33ac5fa..01c0205214052c7c7ff96452d13c9536ad0a03f2 100644 GIT binary patch delta 100 zcmccG$aJ-lX+vG9z=mp{H_s2=>+;whA-Sf`k85&bxcTO~$|7cgYcd&1nI{V7EAnu|Wj@=glhA delta 100 zcmccG$aJ-lX+vG9K+(zNUiPmmy?>`K*q*rG$Zv9DxcTO~$|7a~p98V-@dbG; nodeList, ArrayList materialList, Node pickResult, Shape3D geometryType) { @@ -1075,21 +1082,23 @@ private void handleSelection(ArrayList nodeList, ArrayList mater } } - System.out.println("Elements in selection :"); + if (debugMode) { + System.out.println("Elements in selection :"); for (int i = 0; i < nodeList.size(); i++) { - System.out.print(nodeList.get(i) + " "); + System.out.println(nodeList.get(i) + " "); - if (vertexMap.containsKey(pickResult)) { + if (vertexMap.containsKey(pickResult)) { float[] resultV = vertexMap.get(vertexNodeSelection.get(i)); System.out.println(resultV[0] + " " + resultV[1] + " " + resultV[2]); } else if (edgesMap.containsKey(pickResult)) { System.out.println(edgesMap.get(edgeNodeSelection.get(i)).toString()); - }else if (faceMapMesh.containsKey(pickResult)){ - System.out.println(faceMapMesh.get(faceNodeSelection.get(i)).toString()); + } else if (newFaceMap.containsKey(pickResult)) { + System.out.println(newFaceMap.get(faceNodeSelection.get(i)).getCoordinatesOfPoints(globalVertexList)); } } - System.out.println("All selected nodes: " + vertexNodeSelection.size() + " vertices. " - + edgeNodeSelection.size() + " edges. " + faceNodeSelection.size() + " faces." ); + System.out.println("\nAll selected nodes: " + vertexNodeSelection.size() + " vertices. " + + edgeNodeSelection.size() + " edges. " + faceNodeSelection.size() + " faces."); + } } @@ -1172,4 +1181,8 @@ public void setFlagRenderFaces(boolean rfaces){ renderFaces = rfaces; } + public void setFlagDebugMode(boolean debug){ + debugMode = debug; + } + } diff --git a/src/main/java/edu/gcsc/jfx3d/ugx/hexahedron.ugx b/src/main/java/edu/gcsc/jfx3d/ugx/hexahedron.ugx deleted file mode 100644 index 12a1c3d..0000000 --- a/src/main/java/edu/gcsc/jfx3d/ugx/hexahedron.ugx +++ /dev/null @@ -1,23 +0,0 @@ - - - -1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 1 1 1 -1 1 1 - 0 3 3 2 2 1 1 0 1 5 5 4 4 0 2 6 6 5 3 7 7 6 4 7 - 0 3 2 1 0 1 5 4 1 2 6 5 2 3 7 6 3 0 4 7 4 5 6 7 - - - 0 1 2 3 4 5 6 7 - 0 1 2 3 4 5 6 7 8 9 10 11 - 0 1 2 3 4 5 - - - - - - - - 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 - 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 - 0 1 1 1 2 1 3 1 4 1 5 1 - - - diff --git a/src/main/java/edu/gcsc/jfx3d/ugx/lowResSubsetTest.ugx b/src/main/java/edu/gcsc/jfx3d/ugx/lowResSubsetTest.ugx new file mode 100644 index 0000000..d44c30f --- /dev/null +++ b/src/main/java/edu/gcsc/jfx3d/ugx/lowResSubsetTest.ugx @@ -0,0 +1,38 @@ + + + 2 2 -1 4 2 -1 4 4 -1 2 4 -1 2 2 1 4 2 1 4 4 1 2 4 1 -4 -4 -1 -2 -4 -1 -2 -2 -1 -4 -2 -1 -4 -4 1 -2 -4 1 -2 -2 1 -4 -2 1 2 -4 -1 4 -4 -1 4 -2 -1 2 -2 -1 2 -4 1 4 -4 1 4 -2 1 2 -2 1 -4 2 -1 -2 2 -1 -2 4 -1 -4 4 -1 -4 2 1 -2 2 1 -2 4 1 -4 4 1 + 0 3 3 2 2 1 1 0 1 5 5 4 4 0 2 6 6 5 3 7 7 6 4 7 8 11 11 10 10 9 9 8 9 13 13 12 12 8 10 14 14 13 11 15 15 14 12 15 16 19 19 18 18 17 17 16 17 21 21 20 20 16 18 22 22 21 19 23 23 22 20 23 24 27 27 26 26 25 25 24 25 29 29 28 28 24 26 30 30 29 27 31 31 30 28 31 + 0 3 2 1 0 1 5 4 1 2 6 5 2 3 7 6 3 0 4 7 4 5 6 7 8 11 10 9 8 9 13 12 9 10 14 13 10 11 15 14 11 8 12 15 12 13 14 15 16 19 18 17 16 17 21 20 17 18 22 21 18 19 23 22 19 16 20 23 20 21 22 23 24 27 26 25 24 25 29 28 25 26 30 29 26 27 31 30 27 24 28 31 28 29 30 31 + + + 24 25 26 27 28 29 30 31 + 36 37 38 39 40 41 42 43 44 45 46 47 + 18 19 20 21 22 23 + + + 0 1 2 3 4 5 6 7 + 0 1 2 3 4 5 6 7 8 9 10 11 + 0 1 2 3 4 5 + + + 8 9 10 11 12 13 14 15 + 12 13 14 15 16 17 18 19 20 21 22 23 + 6 7 8 9 10 11 + + + 16 17 18 19 20 21 22 23 + 24 25 26 27 28 29 30 31 32 33 34 35 + 12 13 14 15 16 17 + + + + + + + + 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 + 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 + 18 1 19 1 20 1 21 1 22 1 23 1 + + + diff --git a/src/main/java/edu/gcsc/jfx3d/ugx/prism.ugx b/src/main/java/edu/gcsc/jfx3d/ugx/prism.ugx deleted file mode 100644 index 21c3758..0000000 --- a/src/main/java/edu/gcsc/jfx3d/ugx/prism.ugx +++ /dev/null @@ -1,24 +0,0 @@ - - - -1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 1 1 1 1 - 0 2 2 1 1 0 1 4 4 3 3 0 2 5 5 4 3 5 - 0 2 1 3 4 5 - 0 1 4 3 1 2 5 4 2 0 3 5 - 0 1 2 3 4 5 - - - 0 1 2 3 4 5 - 0 1 2 3 4 5 6 7 8 - 0 1 2 3 4 - 0 - - - - - - - - 1 1 - - - diff --git a/src/main/java/edu/gcsc/jfx3d/ugx/pyramid.ugx b/src/main/java/edu/gcsc/jfx3d/ugx/pyramid.ugx deleted file mode 100644 index 7a795dd..0000000 --- a/src/main/java/edu/gcsc/jfx3d/ugx/pyramid.ugx +++ /dev/null @@ -1,24 +0,0 @@ - - - -1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 0 0 1 - 0 3 3 2 2 1 1 0 1 4 4 0 2 4 3 4 - 0 1 4 1 2 4 2 3 4 0 4 3 - 0 3 2 1 - 0 1 2 3 4 - - - 0 1 2 3 4 - 0 1 2 3 4 5 6 7 - 0 1 2 3 4 - 0 - - - - - - - - 1 1 - - - diff --git a/src/main/java/edu/gcsc/jfx3d/ugx/testobject - Kopie.ugx b/src/main/java/edu/gcsc/jfx3d/ugx/testobject - Kopie.ugx deleted file mode 100644 index e0aa111..0000000 --- a/src/main/java/edu/gcsc/jfx3d/ugx/testobject - Kopie.ugx +++ /dev/null @@ -1,24 +0,0 @@ - - - -1 -1 -1 10 -1 -1 10 30 -1 -1 30 -1 -1 -1 10 10 -1 10 10 30 10 -1 30 10 -1 30 10 - 2 3 3 0 0 2 0 1 1 2 5 1 0 5 0 4 4 5 1 6 6 2 5 6 8 3 2 8 6 8 8 0 8 4 4 6 0 6 - 2 3 0 0 1 2 5 1 0 0 4 5 2 1 6 6 1 5 8 3 2 6 8 2 0 3 8 8 4 0 5 4 6 6 4 8 5 0 6 6 0 4 0 2 8 2 0 6 6 0 1 0 6 8 - 5 6 0 4 0 8 2 3 2 6 0 1 0 6 5 1 0 6 2 8 6 8 0 4 - - - 0 1 2 3 4 5 6 7 - 0 1 2 3 4 5 6 7 8 9 10 11 - - - 0 5 4 1 2 3 - - - - - - - - 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 - - - diff --git a/src/main/java/edu/gcsc/jfx3d/ugx/tetrah.ugx b/src/main/java/edu/gcsc/jfx3d/ugx/tetrah.ugx deleted file mode 100644 index 140a604..0000000 --- a/src/main/java/edu/gcsc/jfx3d/ugx/tetrah.ugx +++ /dev/null @@ -1,28 +0,0 @@ - - - 1 1 1 -1 -1 1 -1 1 -1 1 -1 -1 - 0 2 2 1 1 0 2 3 3 1 0 3 - 0 2 1 1 2 3 0 3 2 0 1 3 - 0 1 2 3 - - - - - 0 1 2 3 - 0 1 2 3 4 5 - 0 1 2 3 - 0 - - - - - - - - 0 1 1 1 2 1 3 1 - 0 1 1 1 2 1 3 1 4 1 5 1 - 0 1 1 1 2 1 3 1 - 0 1 - - -