From 633130bf7cedae074a63639c6d23b625de99d629 Mon Sep 17 00:00:00 2001 From: soypat Date: Mon, 13 Jun 2022 02:44:37 -0300 Subject: [PATCH] fix meshTetraBCC bug --- helpers/sdfexp/bccmesh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/sdfexp/bccmesh.go b/helpers/sdfexp/bccmesh.go index e862046..3c47b3f 100644 --- a/helpers/sdfexp/bccmesh.go +++ b/helpers/sdfexp/bccmesh.go @@ -141,7 +141,7 @@ func makeBCCMesh(b r3.Box, resolution float64) *bccMesh { func (t *bccMesh) meshTetraBCC() (nodes []r3.Vec, tetras [][4]int) { n := 0 - tetras = make([][4]int, len(t.matrix.nodes)) + tetras = make([][4]int, 0, len(t.matrix.nodes)) t.matrix.foreach(func(_, _, _ int, node *bccNode) { bb := d3.Box(node.box()) vert := bb.Vertices()