Commit adedbf0d authored by Jan Möbius's avatar Jan Möbius

Bugfix: Don't crash in normal computation at boundaries

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14769 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5fd9e409
......@@ -165,6 +165,10 @@ void RemesherPlugin::computeInitValues() {
TriMesh::FaceHandle fh1 = mesh->face_handle(he);
TriMesh::FaceHandle fh2 = mesh->face_handle(mesh->opposite_halfedge_handle(he));
// Boundary halfedge?
if ( !fh2.is_valid() || !fh2.is_valid() )
continue;
TriMesh::Normal n1 = mesh->normal(fh1);
TriMesh::Normal n2 = mesh->normal(fh2);
......@@ -195,6 +199,10 @@ void RemesherPlugin::computeInitValues() {
PolyMesh::FaceHandle fh1 = mesh->face_handle(he);
PolyMesh::FaceHandle fh2 = mesh->face_handle(mesh->opposite_halfedge_handle(he));
// Boundary halfedge?
if ( !fh2.is_valid() || !fh2.is_valid() )
continue;
PolyMesh::Normal n1 = mesh->normal(fh1);
PolyMesh::Normal n2 = mesh->normal(fh2);
......
Markdown is supported
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