SCIInstitute / ShapeWorks

ShapeWorks
http://sciinstitute.github.io/ShapeWorks/
Other
104 stars 32 forks source link

Mesh warp fails with degenerate reference mesh #2045

Open akenmorris opened 1 year ago

akenmorris commented 1 year ago

This mesh is manifold, but has degenerate zero area triangles:

image image

mesh_warp_degenerate.zip

shapeworks warp-mesh --reference_mesh degenerate.vtk --reference_points degenerate.particles --target_points degenerate.particles

[2023-04-12 14:00:08.688] [error] Reconstruction failed. NaN detected in mesh.
exception during mesh warp: null meshPtr

Can we detect this and force remeshing? Remeshing, at the same number of vertices fixes it.