Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] How to find the adjacent faces of every edge?
- Date: Fri, 22 Jun 2018 13:25:42 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:6GA28hTKLBodBrk3Alv7OIw7Ftpsv+yvbD5Q0YIujvd0So/mwa6zZxaN2/xhgRfzUJnB7Loc0qyK6/2mATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbN/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/nzJhMx+jKxVoxyvqBJwzIHWfI6bO+Fzfr/ecN4AWWZNQshcWi5HD4ihb4UPFe0BPeNAooXzulUBswCxChO3BOPzyz9HmHn21rA83eQmCwHG3QsgH84Tu3jQrdv6KqASUeWrw6nU1zXCb/NY1i3h54jUdRAhu/GNUbd+fcHMzkQvDAfFjlKKqYzkODOVyv4Bs22f7+d7WuKvjnQoqwB1ojS12sgsjYzJi5sTx1vZ+yt5x4M1Kse5SE59edOkFoFfuDqBOItyXMwuWX1nuCE/yrEeuJ67ejIKyJU9yBLFZfyHaZCE7Q7sVOmLJTd0nnVleKiwhxu07EOuyfX8W9G23VtFtCZJj8fAu3AX2xHQ9MSLUPpw80S51TuN1A3f8P9ILE81mKbBNpIsxrA9moARvEnDGCL9hV/4g7WMdko+/+il8+Tnbavipp+bL4J0jxvxMqUqmsCmD+U4NxQCU3GV+em917Dv50L5QLJNjv05lqnWrorWKtgcpq68GwNV04Aj5AijDzq+0tkVkmMLIE9bdB+HlYTkOE/CLOr5APq8m1islS1kx/HCPr3vGJXNKX3Dna/6fbZ57E5c0gszzddD555OD7EBJOn+WkD0tNPCDx85Nxa4zPrgCNV4zo8eQ36AAreFMKPOtl+F/v4gI+aWa48RoTryNvkl5+Xygn8kgl8dZrKk3YAXaXC9BvRpOV+VYXvqgtcbEGcFpBAyTOLwiA7KbDhIenznX74g/ippT8W9HILbT8ashqaA1WG1BNpNd2VeAxeNF3nvMI6LUvNJZCOJKdJ6iW84Uu2qRIYlkB2vrwTn0KFPL+zO+yReu4iw+sJy4riZrhw4/CdoDsmbm0WKVWBzgitIaDIx2a1ju11Tw1yf1rJpwrYQQcdX4OlIVRt8MJr0wOlzCtS0UQXEKITaAG26S8mrVGliBuk6xMUDNh4kSoeSyyvb1i/vOIc70rmCBZg66KXZhiGjKMN0ynKA364k3QB/Hpl/cFa+j6s6zDD9QpbTmhzAxamvfKUYmiXK8TXblDfcjARjSAd1FJ79czUfa0/R94mr40rDS/qxDOxiPFURj8GFLaROZ5viilAUHPo=
You cannot have non-manifold edges in a halfedge data structure by
definition.
You need to use something more general like a linear cell complex for
example if you want to have non-manifold edges.
https://doc.cgal.org/latest/Linear_cell_complex/index.html
Sebastien.
On 06/22/2018 12:24 PM, sergio campo wrote:
What happen if the structure has non-manifold edges, it will work?
On Fri, Jun 22, 2018 at 11:35 AM, Sebastien Loriot (GeometryFactory) < <mailto:>> wrote:
If you have a index associated to faces, then from a halfedge you
can access the faces using
halfedge_descriptor h;
face_descriptor f1 = face(h, mesh);
halfedge_descriptor h_opp = opposite(h, mesh);
if (!CGAL::is_border(h_opp, mesh))
face_descriptor f2 = face(h_opp, mesh);
with halfedge_descriptor and face_descriptor being nested types of
boost::graph_traits<Mesh_type>
To associate an id to a face, you can use internal property (built-in
with Surface_mesh or with a traits with ids like
CGAL::Polyhedron_items_with_id_3 [1]). In general you can also use
dynamic properties [2]
Sebastien.
[1]
https://doc.cgal.org/latest/BGL/classCGAL_1_1Polyhedron__items__with__id__3.html
<https://doc.cgal.org/latest/BGL/classCGAL_1_1Polyhedron__items__with__id__3.html>
[2] https://doc.cgal.org/latest/BGL/index.html#title25
<https://doc.cgal.org/latest/BGL/index.html#title25>
On 06/22/2018 10:48 AM, sergio wrote:
I have the following loop iterator:
void printAdjancenFaceToEdge(Polyhedron mesh)
{
std::vector<int> nBorder(mesh.size_of_vertices(), 0);
for (Polyhedron::Halfedge_const_iterator he =
mesh.halfedges_begin(); he
!= mesh.halfedges_end(); he++) {
if (!he->is_border())
continue;
// print here ids
}
return true;
}
is it possible to print the adjacent faces index of every edge?
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
<http://cgal-discuss.949826.n4.nabble.com/>
-- You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>
- [cgal-discuss] How to find the adjacent faces of every edge?, sergio, 06/22/2018
- Re: [cgal-discuss] How to find the adjacent faces of every edge?, Sebastien Loriot (GeometryFactory), 06/22/2018
- Re: [cgal-discuss] How to find the adjacent faces of every edge?, sergio campo, 06/22/2018
- Re: [cgal-discuss] How to find the adjacent faces of every edge?, Sebastien Loriot (GeometryFactory), 06/22/2018
- Re: [cgal-discuss] How to find the adjacent faces of every edge?, sergio campo, 06/22/2018
- Re: [cgal-discuss] How to find the adjacent faces of every edge?, Shankar Kulumani, 06/22/2018
- Re: [cgal-discuss] How to find the adjacent faces of every edge?, sergio campo, 06/22/2018
- Re: [cgal-discuss] How to find the adjacent faces of every edge?, Sebastien Loriot (GeometryFactory), 06/22/2018
Archive powered by MHonArc 2.6.18.