Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Undetected non-manifold vertex in poly3
- Date: Mon, 16 Dec 2013 18:54:49 +0100
- Organization: GeometryFactory
Iterate over halfedges not vertices.
Sebastien.
On 12/16/2013 06:29 PM, Zohar wrote:
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.
- [cgal-discuss] Undetected non-manifold vertex in poly3, Zohar, 12/14/2013
- Re: [cgal-discuss] Undetected non-manifold vertex in poly3, Zohar, 12/14/2013
- Re: [cgal-discuss] Undetected non-manifold vertex in poly3, Sebastien Loriot (GeometryFactory), 12/16/2013
- Re: [cgal-discuss] Undetected non-manifold vertex in poly3, Zohar, 12/16/2013
- Re: [cgal-discuss] Undetected non-manifold vertex in poly3, Sebastien Loriot (GeometryFactory), 12/16/2013
- Re: [cgal-discuss] Undetected non-manifold vertex in poly3, Zohar, 12/16/2013
- Re: [cgal-discuss] Undetected non-manifold vertex in poly3, Sebastien Loriot (GeometryFactory), 12/16/2013
- Re: [cgal-discuss] Undetected non-manifold vertex in poly3, Zohar, 12/16/2013
Archive powered by MHonArc 2.6.18.