diff pkg/octree/vertex.go @ 815:01019d4c8359

Cross section: Made triangle intersection less spammy.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 27 Sep 2018 17:37:47 +0200
parents 1a808929c2c5
children 221e64cb0c82
line wrap: on
line diff
--- a/pkg/octree/vertex.go	Thu Sep 27 17:32:48 2018 +0200
+++ b/pkg/octree/vertex.go	Thu Sep 27 17:37:47 2018 +0200
@@ -460,9 +460,7 @@
 
 	var out LineStringZ
 
-	defer func() {
-		log.Printf("length out: %d\n", len(out))
-	}()
+	//defer func() { log.Printf("length out: %d\n", len(out)) }()
 
 edges:
 	for i := 0; i < 3 && len(out) < 2; i++ {
@@ -475,7 +473,7 @@
 		o1 := onPlane(s1)
 		o2 := onPlane(s2)
 
-		log.Printf("s1, s2: %t %t (%f %f)\n", o1, o2, s1, s2)
+		// log.Printf("s1, s2: %t %t (%f %f)\n", o1, o2, s1, s2)
 
 		switch {
 		case o1 && o2:
@@ -539,20 +537,20 @@
 				continue edges
 			}
 
-			log.Println("Intersection -----------------------------")
+			// log.Println("Intersection -----------------------------")
 			t1 := relative(t[i], t[j])(x, y)
-			log.Printf("relative pos: %f\n", t1)
+			// log.Printf("relative pos: %f\n", t1)
 			if !inRange(t1) {
 				continue edges
 			}
 
-			log.Println("valid ***************")
+			// log.Println("valid ***************")
 
 			z := interpolate(t[j].Z, t[i].Z)(t1)
 			n := Vertex{x, y, z}
 
 			if math.Signbit(s1) != math.Signbit(s2) {
-				log.Println("\ton different sides")
+				// log.Println("\ton different sides")
 				// different sides -> vertex on edge.
 				out = append(out, n)
 			} else { // same side -> inside. Find peer