From 5d7dc831c2568fae48a26c475cc0981da4e968d1 Mon Sep 17 00:00:00 2001 From: jleliaer Date: Thu, 3 Oct 2024 21:43:18 +0200 Subject: [PATCH] allow graincutshape to cut away from the shape. now the test succeeds --- engine/ext_make3dgrains.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/ext_make3dgrains.go b/engine/ext_make3dgrains.go index a3c8e547f..77a8bc5be 100644 --- a/engine/ext_make3dgrains.go +++ b/engine/ext_make3dgrains.go @@ -142,7 +142,7 @@ func (t *tesselation3d) RegionOf(x, y, z float64) int { } // Check if the nearest point's region should be returned - if t.shape(x, y, z) || (t.shape(nearest.x, nearest.y, nearest.z) && GrainCutShape) { + if ((t.shape(x, y, z) && GrainCutShape==false)|| (t.shape(nearest.x, nearest.y, nearest.z) && GrainCutShape)) { return int(nearest.region) }