Skip to content
Snippets Groups Projects
Commit 983cdff0 authored by Arch de Noé's avatar Arch de Noé
Browse files

fix: avoid crash when trying to add face with complex edge

parent 618ab1d4
Branches
No related merge requests found
......@@ -117,7 +117,14 @@ pmp::SurfaceMesh MarchingCubes::compute_surface(SDF const &sdf)
pmp::Vertex v2 = add_or_get_hash(mc_mesh, interpolated_p2, spatial_hashing);
pmp::Vertex v3 = add_or_get_hash(mc_mesh, interpolated_p3, spatial_hashing);
mc_mesh.add_triangle(v1, v2, v3);
try
{
mc_mesh.add_triangle(v1, v2, v3);
}
catch(const std::exception& e)
{
std::cerr << "WARNING: Complex edge" << std::endl;
}
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment