Open alecjacobson opened 4 years ago
What platform are you running on? What if you cd ../ConvexHull_Simplification
and then
python SILD_convexhull_simplification.py ../examples/apple
osx 10.13 with conda python2.7
Same error :-(
This is a very mysterious error. The same error arose for someone else on Ubuntu: https://github.com/CraGL/Decompose-Single-Image-Into-Layers/issues/3 .
I was able to reproduce it with conda python (but not brew python). All the instance variables of the TriMesh
object are being replaced with the instance variables of a different class (HalfEdge
). I spent some time trying to debug it, but didn't succeed. It's as if something is trashing memory.
How hard is it to convert this lib to py3 ? Maybe it will serendipitously also fix this error...
Success. It looks like the GLPK solver was trashing memory. In SILD_convexhull_simplification.py
, change line 204 from:
res = cvxopt.solvers.lp( cvxopt.matrix(c), cvxopt.matrix(A), cvxopt.matrix(b) ), solver='glpk' )
to
res = cvxopt.solvers.lp( cvxopt.matrix(c), cvxopt.matrix(A), cvxopt.matrix(b) ) )
I updated it to work on Python 2 or 3
The line number for disabling the GLPK solver has moved to 205.
It works! Thanks so much debugging and fixing it.
I tried to run:
but I got this output