zishun / geodesic_matlab

Exact geodesic for triangular meshes implemented by Danil Kirsanov
https://mathworks.com/matlabcentral/fileexchange/18168-exact-geodesic-for-triangular-meshes
BSD 2-Clause "Simplified" License
22 stars 8 forks source link

when running example 1,3,5, error occured. Error using calllib. The pointer type must match the data type #3

Closed laolihaile closed 4 years ago

laolihaile commented 4 years ago

Error using calllib. The pointer type must match the data type

Error geodesic_distance_and_source (line 19) [num_vertices, d, s] = calllib(geodesic_library, 'distance_and_source_for_all_vertices', algorithm.id, tmp, tmp1);

Error example3 (line 30) [source_ids, distances] = geodesic_distance_and_source(algorithm); %for every vertex, figure out which source it belongs to

Could you please help me solve this problem? Thank you~

zishun commented 4 years ago

Which version of Matlab is used? When I was using R2019a, line 17 should be replaced with line 18 in matlab/geodesic_distance_and_source.m. Maybe you can try line 17 instead of line 18.

If it does not work, maybe you can update your Matlab or revert the changes here.

laolihaile commented 4 years ago

I use R2019b. I replce line 17 with line 18, but it doesn't work, the error still exists

laolihaile commented 4 years ago

OH ! IT WORKS NOW! I just replaced it BUT I didn't save it. THANK YOU VERY MUCH!

zishun commented 4 years ago

No problem! I will double check when I have access to R2019b or newer versions.