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 11:04:03 -0800 (PST)


It worked; thanks!


typedef Polyhedron_3 EP_base;

bool is_manifold(EP_base &mesh)
{
// count border edges (vertex halfedge circulator doesn't work on
non-manifold).
vector<int> nBorder(mesh.size_of_vertices(), 0);
for ( EP_base::Halfedge_const_iterator he = mesh.halfedges_begin() ; he
!= mesh.halfedges_end() ; he++ ) {
if ( !he->is_border() )
continue;
int v1 = he->vertex()->index();
int v2 = he->opposite()->vertex()->index();
nBorder[v1]++;
nBorder[v2]++;
if ( nBorder[v1] > 2 || nBorder[v2] > 2 )
return false;
}

return true;
}




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



Archive powered by MHonArc 2.6.18.

Top of Page