diff --git a/main/Face.pde b/main/Face.pde index 63aefce..17708db 100644 --- a/main/Face.pde +++ b/main/Face.pde @@ -22,4 +22,4 @@ public class Face { System.out.println(); } -} \ No newline at end of file +} diff --git a/main/HalfEdge.pde b/main/HalfEdge.pde index 073cd34..113791a 100644 --- a/main/HalfEdge.pde +++ b/main/HalfEdge.pde @@ -234,7 +234,11 @@ public class HalfEdge { return result; } public HalfEdge getAnotherLeaving() { - return getprevious().gettwin(); + if (this != getprevious().gettwin()) { + return getprevious().gettwin(); + } else { + return null; + } } public ArrayList getAllLeaving() { diff --git a/main/main.pde b/main/main.pde index 2b5670c..df6bff5 100644 --- a/main/main.pde +++ b/main/main.pde @@ -86,10 +86,10 @@ public void setup() { //h1.facePrint(); //drawgraph.drawGraph(list.getPoints()); //(new Face(h4, list)).printFace(); - (new Face(h12, list)).printFace(); + //(new Face(h12, list)).printFace(); } void draw() { - background(255,255,255,0); + background(255); drawgraph.drawGraph(list.getPoints()); } void keyPressed() {