Subject: CGAL users discussion list
List archive
- 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.
- [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.