An isolated point IS a border point

This commit is contained in:
Andreas Fabri 2017-03-29 19:10:47 +02:00
parent a890b3f221
commit 8e5df1efe9
2 changed files with 5 additions and 5 deletions

View File

@ -1683,7 +1683,7 @@ public:
/// ///
/// A halfedge, or edge is on the border of a surface mesh /// A halfedge, or edge is on the border of a surface mesh
/// if it is incident to a `null_face()`. A vertex is on a border /// if it is incident to a `null_face()`. A vertex is on a border
/// if it is incident to a border halfedge. While for a halfedge and /// if it is isolated or incident to a border halfedge. While for a halfedge and
/// edge this is a constant time operation, for a vertex it means /// edge this is a constant time operation, for a vertex it means
/// to look at all incident halfedges. If algorithms operating on a /// to look at all incident halfedges. If algorithms operating on a
/// surface mesh maintain that the halfedge associated to a border vertex is /// surface mesh maintain that the halfedge associated to a border vertex is
@ -1703,7 +1703,7 @@ public:
{ {
Halfedge_index h(halfedge(v)); Halfedge_index h(halfedge(v));
if (h == null_halfedge()){ if (h == null_halfedge()){
return false; return true;
} }
if(check_all_incident_halfedges){ if(check_all_incident_halfedges){
Halfedge_around_target_circulator hatc(h,*this), done(hatc); Halfedge_around_target_circulator hatc(h,*this), done(hatc);
@ -1714,7 +1714,7 @@ public:
}while(++hatc != done); }while(++hatc != done);
return false; return false;
} }
return is_valid(h) && is_border(h); return is_border(h);
} }
/// returns whether `h` is a border halfege, that is if its incident face is `sm.null_face()`. /// returns whether `h` is a border halfege, that is if its incident face is `sm.null_face()`.

View File

@ -182,8 +182,8 @@ void isolated_vertex_check()
Sm::Vertex_index isolated = f.m.add_vertex(Point_3(10, 10, 10)); Sm::Vertex_index isolated = f.m.add_vertex(Point_3(10, 10, 10));
assert(f.m.is_isolated(isolated)); assert(f.m.is_isolated(isolated));
assert(!f.m.halfedge(isolated).is_valid()); assert(!f.m.halfedge(isolated).is_valid());
assert(! f.m.is_border(isolated)); assert(f.m.is_border(isolated));
assert(! f.m.is_border(isolated, false)); assert(f.m.is_border(isolated, false));
assert(f.m.degree(isolated) == 0); assert(f.m.degree(isolated) == 0);
} }