From 42107f9a01652cb2f47228d20c1148a2a22f6a63 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Tue, 22 May 2018 19:33:31 -0400
Subject: [PATCH] new torus code and VR

---
 cMesh.java |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/cMesh.java b/cMesh.java
index 24ad433..942d155 100644
--- a/cMesh.java
+++ b/cMesh.java
@@ -355,7 +355,9 @@
         //        DynamicNode handle = new DynamicNode(center.x, center.y, center.z, 0 /*0 , 1 or Float.MAX_VALUE*/, 0);
         //        Phys.addHandle(handle);
                 
-            for (int k=Phys.allNodes.size(); --k>=0;) // warning: "add handle" adds a node
+            int size = Phys.allNodes.size();
+            
+            for (int k=0; k < size; k++) // warning: "add handle" adds a node
             {
                 DynamicNode dn = Phys.allNodes.get(k);
                 DynamicNode handle = new DynamicNode(dn.position.x, dn.position.y, dn.position.z, 0 /*0 , 1 or Float.MAX_VALUE*/, 0);
@@ -402,8 +404,8 @@
         if (ref == null)
             return;
         
-        GraphreeD.epsequal = IsEpsEqual();
-        GraphreeD.linkUV = IsLinkUV();
+        GrafreeD.epsequal = IsEpsEqual();
+        GrafreeD.linkUV = IsLinkUV();
         
 //        BoundaryRep oldrep = transientrep;
         
@@ -417,7 +419,7 @@
         Object3D obj = ref.GetObject();
         
         // may 2014: side-effect with UVs!!
-        obj = (Object3D) GraphreeD.clone(obj);
+        obj = (Object3D) GrafreeD.clone(obj);
         
         merge(obj);
 
@@ -427,7 +429,7 @@
         bRep.Trim(false, false,false,false,false);
             System.out.println("------> TRIM " + ref + "; #vertices = " + bRep.VertexCount() + "; #faces = " + bRep.FaceCount());
 
-        GraphreeD.epsequal = false;
+        GrafreeD.epsequal = false;
 
         if (transientrep != null && bRep.VertexCount() == transientrep.VertexCount())
         {
@@ -468,7 +470,7 @@
         }
         else
             // geometry is merged...
-            refcopy = (BoundaryRep) GraphreeD.clone(transientrep);
+            refcopy = (BoundaryRep) GrafreeD.clone(transientrep);
     }
     
     transient cVector minima = new cVector();

--
Gitblit v1.6.2