Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Non manifold edge and Non manifold vertex

Subject: CGAL users discussion list

List archive

[cgal-discuss] Non manifold edge and Non manifold vertex


Chronological Thread 
  • From: sergio <>
  • To:
  • Subject: [cgal-discuss] Non manifold edge and Non manifold vertex
  • Date: Wed, 30 May 2018 01:35:32 -0700 (MST)
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:i3sHJRS15MahbyjiwjKL8C1fytpsv+yvbD5Q0YIujvd0So/mwa69ZhGN2/xhgRfzUJnB7Loc0qyK6/2mATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbN/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/m/XhMJuj6xVvR2uqABwzYPPfIGYNuZycr/Bcd8GW2ZMWNtaWSxbAoO7aosCF/EBMvhCr4nyplsOqga1CA6yBOz11jBIh3n23aI00+QmCwHG2xctH90LsHvOrdX1ML0eXvyyzKnN1DjOae5d1zn66IjNaB8hoPeMUKp2ccXL0kYgDAfFgUuKpYP5ODOV0/wBvHSU7+V6UeKjkWknqxt+ojWp28wiiZHJi5oIxl3F6yl12pg5KN22RUJhfNKpHpVduzuYOodoRM4pXntmtzwgyrIcvJ62ZCgKx4ojxx7Yc/GHdYeF7gjlVOmLOjh3n3Zld6ylixmu9kigz/XwVsiy0FlUsipIisTAu3ET2xDJ9MSKSvVw8l281TuB2Q3f8ONJLV4smareMZEhw7owlpQJsUTEGy/7gFv2g7WKeUUl/Oio5OrnYrL8pp+bLIJ0hQT+Pb4vmsy7G+g3Lg8OX22D9eSmyLLj5VH5QKlNjvAujqbZv4rVJcACqqGkAg9VyZos6wukDze9y9kYhnkGLFddeB2dlYTpOlfOIOr5DfilmVisni1rlLj6OejqDZzJa3TCi7z8Zq1V6khGyQN1w8oMyYhTD+QaLej8W0i54MLRBR4/PAKz2eHPB9B014dYUmWKVPzKeJjOuEOFs7p8a9KHY5UY7W6keqoVosX2hHp8omczOKyg3J8Zcne9R600LECQYH6qidAEQzxT4lgOCdfygVjHagZ9Im6oVvtltD4+AYOiS4zEQ9L12eHT7GKABpRTI1t+JBWMHHPvLtjWXatKbiuYKMts1DcDUOr4Rg==

Hello,

Im trying to implement an algorithm that let me detect, identify and count
which edges and vertex are non manifold. Searching by internet a found the
following discusion.

http://cgal-discuss.949826.n4.nabble.com/Undetected-non-manifold-vertex-in-poly3-td4658551.html

The last solution is here:

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;
}

The discusion is only to identify Non manifold vertex and trying to test it,
i get an error that functions index() are not defined.

int v1 = he->vertex()->index();
int v2 = he->opposite()->vertex()->index();

and for the added .off file the function is_border() is always false (I
don't know why)

if ( !he->is_border() )

these are the files:

box-nonmanifold-internal.off
<http://cgal-discuss.949826.n4.nabble.com/file/t375958/box-nonmanifold-internal.off>

boxes-nonmanifold-single-edge.off
<http://cgal-discuss.949826.n4.nabble.com/file/t375958/boxes-nonmanifold-single-edge.off>


On the other hand I would like a suggestion of how iterate throw vertex to
find this manifold and count it. The same thing for the non manifold edges.

Im checking this manual:

https://doc.cgal.org/latest/HalfedgeDS/index.html#title9

but i would like a least some tips to implement it or why not an example :)

Best regards,

Sergio



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/


  • [cgal-discuss] Non manifold edge and Non manifold vertex, sergio, 05/30/2018

Archive powered by MHonArc 2.6.18.

Top of Page