Open paul0noah opened 2 years ago
First, you should just call:
[PD1,PD2,PV1,PV2] = principal_curvature(V, F);
However, this will still crash on your example. I think this is an edge case of principal_curvature
and maybe in turn igl::principal_curvature
which works by fitting a small neighborhood of vertices. I'm guessing that having only 4 vertices total is making it confused. @sgsellan do you know?
Hi @alecjacobson , thanks for the fast reply! I tested it with a larger shape and works indeed :)
I also did some digging: Error occurs in these lines (std::vector is accessed out of range)
This is caused since
curvDir[i]
is never initialized due to some if (vv.size() < 6)
in these lines.
Hi, I want to use the mex files (especially principal_curvatures) in Matlab on my M1 Pro Macbook Pro. I am running Matlab 2019b. I installed and build using the following steps:
mex
folderI have the following simple tetrahedron as a shape
When calling principal curvatures as follows:
[PD1,PD2,PV1,PV2] = principal_curvature(V, F-1);
Matlab returns:Is there a fix for this?