Open ioannaMitropoulou opened 4 years ago
can you provide more information about the input? on my test samples the method works fine...
perhaps you should also update the repo regularly, because that example has been moved out of the scripts folder since almost a week...
there are docs now and you can find them here https://blockresearchgroup.github.io/compas_libigl/index.html
Thanks for the tip, I updated the repository.
However, I still get the error.
I am using the example geodistance.py
.
With the new updates I had to change the geodistance/__init__.py
line 38, from V, F = M
to V, F = M.to_vertices_and_faces()
, otherwise it throws a Python error.
Other than that I didn't change any of the inputs. Then it works well with the method = 'exact'
But when I change the method to
distance = igl.trimesh_geodistance(mesh, source, 'heat')
it throws an exception:
In the console, it says Error: Numerical issue
When I put the breakpoints to see where it is coming from, I find that it is thrown in the igl file heat_geodesics.cpp
, in igl::heat_geodesics_precompute
. There the exception is thrown in line 89 in the igl::min_quad_with_fixed_precompute
I am not sure what is the proper way to report this error, so I paste the stack below.
std::vector<std::vector<int,std::allocator<int> >,std::allocator<std::vector<int,std::allocator<int> > > >::operator[](const unsigned long long) vector:1500
igl::slice<double,double>(const Eigen::SparseMatrix<double,0,int> &,const Eigen::Matrix<int,-1,1,0,-1,1> &,const Eigen::Matrix<int,-1,1,0,-1,1> &,Eigen::SparseMatrix<double,0,int> &) slice.cpp:65
igl::slice<Eigen::SparseMatrix<double,0,int>,Eigen::Matrix<int,-1,1,0,-1,1>,Eigen::SparseMatrix<double,0,int> >(const Eigen::SparseMatrix<double,0,int> &,const Eigen::DenseBase<Eigen::Matrix<int,-1,1,0,-1,1> > &,const int,Eigen::SparseMatrix<double,0,int> &) slice.cpp:164
igl::min_quad_with_fixed_precompute<double,Eigen::Matrix<int,-1,1,0,-1,1> >(const Eigen::SparseMatrix<double,0,int> &,const Eigen::MatrixBase<Eigen::Matrix<int,-1,1,0,-1,1> > &,const Eigen::SparseMatrix<double,0,int> &,const bool,igl::min_quad_with_fixed_data<double> &) min_quad_with_fixed.cpp:137
igl::heat_geodesics_precompute<Eigen::Matrix<double,-1,-1,1,-1,-1>,Eigen::Matrix<int,-1,-1,1,-1,-1>,double>(const Eigen::MatrixBase<Eigen::Matrix<double,-1,-1,1,-1,-1> > &,const Eigen::MatrixBase<Eigen::Matrix<int,-1,-1,1,-1,-1> > &,const double,igl::HeatGeodesicsData<double> &) heat_geodesics.cpp:89
trimesh_geodistance_heat(Matrix<double,-1,-1,1,-1,-1>,Matrix<int,-1,-1,1,-1,-1>,int) geodistance.cpp:45
pybind11::detail::argument_loader<Eigen::Matrix<double,-1,-1,1,-1,-1>,Eigen::Matrix<int,-1,-1,1,-1,-1>,int>::call_impl<Eigen::Matrix<double,-1,1,0,-1,1>,Eigen::Matrix<double,-1,1,0,-1,1> (__cdecl*&)(Eigen::Matrix<double,-1,-1,1,-1,-1>,Eigen::Matrix<int,-1,-1,1,-1,-1>,int),0,1,2,pybind11::detail::void_type>(Eigen::Matrix<double,-1,1,0,-1,1> (*&)(Eigen::Matrix<double,-1,-1,1,-1,-1>, Eigen::Matrix<int,-1,-1,1,-1,-1>, int),integer_sequence<unsigned __int64,0,1,2>,pybind11::detail::void_type &&) cast.h:1960
pybind11::detail::argument_loader<Eigen::Matrix<double,-1,-1,1,-1,-1>,Eigen::Matrix<int,-1,-1,1,-1,-1>,int>::call<Eigen::Matrix<double,-1,1,0,-1,1>,pybind11::detail::void_type,Eigen::Matrix<double,-1,1,0,-1,1> (__cdecl*&)(Eigen::Matrix<double,-1,-1,1,-1,-1>,Eigen::Matrix<int,-1,-1,1,-1,-1>,int)>(Eigen::Matrix<double,-1,1,0,-1,1> (*&)(Eigen::Matrix<double,-1,-1,1,-1,-1>, Eigen::Matrix<int,-1,-1,1,-1,-1>, int)) cast.h:1937
<lambda_e8a7bd83d61d296c0a6b518f8aa5e02c>::operator()(pybind11::detail::function_call &) pybind11.h:159
<lambda_e8a7bd83d61d296c0a6b518f8aa5e02c>::<lambda_invoker_cdecl>(pybind11::detail::function_call &) pybind11.h:166
pybind11::cpp_function::dispatcher(_object *,_object *,_object *) pybind11.h:624
_PyMethodDef_RawFastCallKeywords(PyMethodDef *,_object *,_object *const *,long long,_object *) 0x00007ffc904371ea
call_function(_object ***,long long,_object *) 0x00007ffc90504192
_PyEval_EvalFrameDefault(_frame *,int) 0x00007ffc904ff2f6
_PyEval_EvalCodeWithName(_object *,_object *,_object *,_object *const *,long long,_object *const *,_object *const *,long long,int,_object *const *,long long,_object *,_object *,_object *,_object *) 0x00007ffc90502f75
_PyFunction_FastCallKeywords(_object *,_object *const *,long long,_object *) 0x00007ffc90436bfb
call_function(_object ***,long long,_object *) 0x00007ffc9050432f
_PyEval_EvalFrameDefault(_frame *,int) 0x00007ffc90501128
_PyEval_EvalCodeWithName(_object *,_object *,_object *,_object *const *,long long,_object *const *,_object *const *,long long,int,_object *const *,long long,_object *,_object *,_object *,_object *) 0x00007ffc90502f75
run_mod(_mod *,_object *,_object *,_object *,PyCompilerFlags *,_arena *) 0x00007ffc9055dced
PyRun_FileExFlags(_iobuf *,const char *,int,_object *,_object *,int,PyCompilerFlags *) 0x00007ffc9055d967
PyRun_SimpleFileExFlags(_iobuf *,const char *,int,PyCompilerFlags *) 0x00007ffc9055b8de
PyRun_AnyFileExFlags(_iobuf *,const char *,int,PyCompilerFlags *) 0x00007ffc9055a543
pymain_run_filename(_PyMain *,PyCompilerFlags *) 0x00007ffc903b89c0
pymain_run_python(_PyMain *) 0x00007ffc903bcf4a
pymain_main(_PyMain *) 0x00007ffc903bdb92
Py_Main(int,wchar_t **) 0x00007ffc903bdd97
__scrt_common_main_seh() 0x00007ff7fafd14f8
BaseThreadInitThunk 0x00007ffd36047bd4
RtlUserThreadStart 0x00007ffd3654ce51
With the new updates I had to change the geodistance/init.py line 38, from V, F = M to V, F = M.to_vertices_and_faces(), otherwise it throws a Python error.
i believe that is because you don't have the very latest version of COMPAS...
if you can't update, better would be to convert your mesh to a tuple of vertices and faces before feeding it to the function, rather than change the line you mentioned in the function.
so do i understand correctly that you get this error with the tubemesh example in the repo?
Ok, thanks, I changed that and restored the __init__.py
to its original version. Yes, the error comes with the tubemesh.obj
. I also tried other meshes though and the same error comes up
can you try using source = 0
instead of source = mesh.get_any_vertex()
Thanks, I just tried that. Unfortunately, I still get the error for any source vertex index I pick.
do the other examples work?
Yes, all the other examples seem to work well.
(I only had to change the name of the function in curvature\__init__.py
, line 35 from _trimesh_gaussian_curvature
to _gaussian
so that it matches the import.) Other than that I have no problem with the other examples
not sure what is going on. i cannot reproduce the error. will try on windows...
I run the example
geodistance.py
in the 'scripts' folder, with theigl.trimesh_geodistance
set tomethod = 'heat'
. It throws an exception for all the input geometry that I tried it with during theigl::heat_geodesics_precompute(V, F, t, data);
. Any ideas on how I can use this method?Thanks, Ioanna