Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when processing a post-processed shapenet file #5

Closed
noamgat opened this issue Nov 21, 2019 · 3 comments
Closed

Crash when processing a post-processed shapenet file #5

noamgat opened this issue Nov 21, 2019 · 3 comments

Comments

@noamgat
Copy link

noamgat commented Nov 21, 2019

Hi,
I've postprocessed shapenet models, using the mesh fusion ( https://github.com/davidstutz/mesh-fusion ) library, in order to add "thickness" to the shapenet model to avoid very thin regions.

Here is an example:
u1e22cc04-7c4d-4ed5-bda3-8ff8067f22ee.zip

When I later try to simplify them (and keep them watertight), I get a crash with the simplify tool:

simplify -i u1e22cc04-7c4d-4ed5-bda3-8ff8067f22ee.obj -o u1e22cc04-7c4d-4ed5-bda3-8ff8067f22ee_65536.obj -m -f 65536

simplify: /home/noamgat/hdd/Manifold/3rd/igl/per_vertex_point_to_plane_quadrics.cpp:83: igl::per_vertex_point_to_plane_quadrics(const MatrixXd&, const MatrixXi&, const MatrixXi&, const MatrixXi&, const MatrixXi&, std::vector<std::tuple<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 1, -1, 1, 1, -1>, double> >&)::<lambda(const RowVectorXd&, const MatrixXd&, double)>: Assertion `std::abs(S.row(j).dot(ei)) < 1e-10' failed.
Aborted (core dumped)

This is consistent across all models. They are watertight (MeshlabServer is able to compute their volume, which is only possible for watertight meshes).

Any idea why this is happening?

@hjwdzh
Copy link
Owner

hjwdzh commented Nov 21, 2019

I believe this is the problem of the libigl library. I also had this problem before when the triangle is degenerated, e.g., the length of some certain edges is smaller than 1e-10. I think you could check whether you have such edges, and if so, this should probably be the problem.

@noamgat
Copy link
Author

noamgat commented Nov 22, 2019 via email

@hjwdzh
Copy link
Owner

hjwdzh commented Jan 20, 2020

Maybe consider implementing the simplify yourself, or change the libigl code a little bit, or remove degenerated triangles in the mesh (which I think is the most difficult option).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants