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 11:35:11 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:2wKufB+j4/MeNP9uRHKM819IXTAuvvDOBiVQ1KB31OscTK2v8tzYMVDF4r011RmVBdids6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+553ebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRgL2hicJNzA382/ZhcJ/g61ZvB2vqAdyw5LWbYyPKPZyYq3QcNEcSGFcXshRTStBAoakYocBEuQOI/1XoJPmp1sSrBuxGw+sD/7pxD9PnH/23Ko60/g8Gg3C3QIvAdUOsHHKo9XpLqcTUeC7w7PUwjXfaPNWwzf85I3Gfhs8pvyMRrZwcc3LyUkuEAPFkk+cqYnhPz6O2eQNtnKU7+tkVe61l2EnrARxryGpy8wxhIfJgYcVxUrF9SV/2Is1I8e3R1Vgbt6gDpRcrT2VN4xzQs86X25otzw1yrkctZ68ZigKx5IqzAPcZfyfa4WE/A7vWeKLLTp7hH9pYq+ziwix/ES61+HxVMe53E5IoydGiNXAqH8A2h3J5sSaTvZw8F2t1DSP2g3V9+pKO1o7lbDBJJ4k2rMwloQcsUDEHiLunUX5lq6WdkE99umm8eTrfqzqppGBO4J2hAzyKKsumsu4AeQ3NggBQXKX9vi71L3m5UH5QbNKgeMqkqTBrpzWOcAWqrS6DgJVyIov9gizAjS83NgFn3QKIkpJeBedgIjoP1HOLur4DfC6g1m0izdrw/fGPqfgApXKMnjPirLhfbJm5k5TzQo819Ff55ZOBr4dJ/LzX1f9tMbEAR8hLwy03+HnBc1h2YMRQ22PBraVP77TsV+T+u0vPvKMZJQOtTbmK/kl4ubugmUjlV8ce6mpx5oXZ2qiEvRoOUXKKUbr19wOGGNPsgslR/Hxk3WDVyRSbjC8RfES/DY+XcidAI3KXZysjbrJ+CChH5pKLiBpB1eJHGvyZquNUOsLcjPTaIc1iTgDT7mmV8kk0TmhsQb7z/xsKe+CqX5Qjo7qyNUgv76brho17zEhV53MgVHIdHl9myYzfxFz2al+pUJnzVLaiPp3hvVZEZpY4PYbC15mZ66Z9PRzDpXJYiyEZs2AEQ/0TdCvADV3RdU0kYdXPhRNXu66hxWG5BKERr8Yk7vRWs4x+6PYmmfrf4NzkimdkqYmiFYiT41EMmj03qM=
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
[2] 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/
- [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.