-
Notifications
You must be signed in to change notification settings - Fork 69
Description
I follow the last part of the tutorial Chapter 1 https://libigl.github.io/libigl-python-bindings/tut-chapter1/
The last example uses d = igl.exact_geodesic(v, f, vs, vt)
and the result is unfortunately array([], dtype=float64)
I have verified it with several meshes, it is always the same result.
EDIT
Not sure if helpful, yet I have figured out one finding. I have pulled and built the C++ repo and the 2xx Chapter with the exact_geodesic was turned off. I have manually edit the CMakeCache.txt and now I see that the function is actually building
[ 46%] Building CXX object CMakeFiles/test_igl_core.dir/tests/include/igl/exact_geodesic.cpp.o
EDIT 2
Out of curiosity I have pip installed 2.5.0 version --> here exact_geodesic actually works (but unfortunately most of the example do not due to mass matrix issues)
EDIT 3
OH BOY - I FOUND IT
from the tutorial:
v, f = igl.read_triangle_mesh(os.path.join(root_folder, "data", "bunny_small.off"))
vs = np.array([0])
vt = np.arange(v.shape[0])
d = igl.exact_geodesic(v, f, vs, vt) #, fs, ft)
well, the implementation of the binding says
m.def(
"exact_geodesic",
&pyigl::exact_geodesic,
"V"_a,
"F"_a,
"VS"_a=Eigen::VectorXI(),
"FS"_a=Eigen::VectorXI(),
"VT"_a=Eigen::VectorXI(),
"FT"_a=Eigen::VectorXI(),
...
So basically, by using "the short-cut" I pass V, F, VS, FS but no VT and no FT
What actually works is
d = igl.exact_geodesic(v, f, vs, np.array([]), vt, np.array([]))