From 0a76d170d8e8258986ce183090e43efcf2e02b58 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Sat, 18 May 2024 17:20:42 -0400 Subject: [PATCH] [bug] fix mcxsvmc flipped normal direction in octave, fix #221 --- utils/mcxsvmc.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/mcxsvmc.m b/utils/mcxsvmc.m index 26cab2bf..ae36a531 100644 --- a/utils/mcxsvmc.m +++ b/utils/mcxsvmc.m @@ -153,6 +153,9 @@ %% computing total area and normal vector for each boundary voxel areas = elemvolume(iso.vertices, iso.faces); normals = surfacenorm(iso.vertices, iso.faces); +if(isoctavemesh) + normals = -normals; +end centroids = meshcentroid(iso.vertices, iso.faces); totalarea = zeros(size(vol));