Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Undetected non-manifold vertex in poly3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Undetected non-manifold vertex in poly3


Chronological Thread 
  • From: Zohar <>
  • To:
  • Subject: Re: [cgal-discuss] Undetected non-manifold vertex in poly3
  • Date: Mon, 16 Dec 2013 09:29:30 -0800 (PST)


To check the number of border edges incident to the vertex is a good idea,
but isn't that exactly the problem of CGAL with non-manifold? Namely, the
Halfedge_around_vertex_const_circulator doesn't iterate all the edges or
detect border correctly. On the non-manifold vertex in my example above it
counts only two border edges. For example, the following code doesn't work:

bool is_manifold(Polyhedron_3 &mesh)
{
// count border edges
for ( Vertex_const_iterator v = mesh.vertices_begin() ; v !=
mesh.vertices_end() ; v++ ) {
Halfedge_around_vertex_const_circulator hc = v->vertex_begin();
Halfedge_around_vertex_const_circulator hc_end = hc;
int nBorderEdges = 0;
CGAL_For_all(hc, hc_end) {
if ( hc->is_border() ) {
nBorderEdges++;
if ( nBorderEdges > 2 )
return false;
}
}
}

return true;
}




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Undetected-non-manifold-vertex-in-poly3-tp4658551p4658562.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page