check that the halfedge is not a border halfedge

This commit is contained in:
Andreas Fabri 2015-04-09 14:30:47 +02:00
parent 4e51cd89bb
commit d9b67fcb0d
1 changed files with 4 additions and 4 deletions

View File

@ -691,15 +691,15 @@ std::size_t keep_largest_connected_components(PolygonMesh& pmesh
#endif
} else if( (is_border(oh,pmesh) && face_cc[fh]) ||
(is_border(h,pmesh) && face_cc[ofh]) ||
(face_cc[fh] && face_cc[ofh]) ){
(! is_border(oh,pmesh) && ! is_border(h,pmesh) &&face_cc[fh] && face_cc[ofh]) ){
// do nothing
} else if(face_cc[fh] && ! face_cc[ofh]){
} else if(! is_border(h,pmesh) && face_cc[fh] && ! is_border(oh,pmesh) &&! face_cc[ofh]){
set_face(oh, boost::graph_traits<PolygonMesh>::null_face(), pmesh);
} else if(! face_cc[fh] && face_cc[ofh]){
} else if(! is_border(h,pmesh) && ! face_cc[fh] && ! is_border(oh,pmesh) && face_cc[ofh]){
set_face(h, boost::graph_traits<PolygonMesh>::null_face(), pmesh);
} else {
// no face kept
assert( ! face_cc[fh] && ! face_cc[ofh]);
assert( (is_border(h,pmesh) || ! face_cc[fh]) && (is_border(oh,pmesh) ||! face_cc[ofh]));
// vertices pointing to e must change their halfedge
if(halfedge(v,pmesh) == oh){
set_halfedge(v,prev(h,pmesh),pmesh);