# HG changeset patch # User Sascha L. Teichmann # Date 1537534064 -7200 # Node ID c0bba602b60e2d332857355331b192f4b1a4e197 # Parent fdd88e95bae785dafbbf00d9ea2134eabde4bf38 octree: define a type for LineStringZ. diff -r fdd88e95bae7 -r c0bba602b60e cmd/octree2contour/store.go --- a/cmd/octree2contour/store.go Fri Sep 21 11:03:20 2018 +0200 +++ b/cmd/octree2contour/store.go Fri Sep 21 14:47:44 2018 +0200 @@ -7,7 +7,10 @@ "math" ) -type multiLineStringZ [][]vertex +type ( + lineStringZ []vertex + multiLineStringZ []lineStringZ +) const ( wkbNDR byte = 1 diff -r fdd88e95bae7 -r c0bba602b60e cmd/octree2contour/vertex.go --- a/cmd/octree2contour/vertex.go Fri Sep 21 11:03:20 2018 +0200 +++ b/cmd/octree2contour/vertex.go Fri Sep 21 14:47:44 2018 +0200 @@ -99,14 +99,14 @@ return 0 } -func (t *triangle) intersectH(h float64) []vertex { +func (t *triangle) intersectH(h float64) lineStringZ { sides := [3]int{ side(t[0].z, h), side(t[1].z, h), side(t[2].z, h), } - var points []vertex + var points lineStringZ for i := 0; i < 3; i++ { j := (i + 1) % 3