Skip to content

Commit

Permalink
[bug] fix mcxsvmc flipped normal direction in octave, fix #221
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed May 18, 2024
1 parent 2f42524 commit 0a76d17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/mcxsvmc.m
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 0a76d17

Please sign in to comment.