Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How to explore all edges of all cells incident

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How to explore all edges of all cells incident


Chronological Thread 
  • From: Monique Teillaud <>
  • To:
  • Subject: Re: [cgal-discuss] How to explore all edges of all cells incident
  • Date: Wed, 15 Oct 2008 15:55:39 +0200

Olivier Devillers wrote:

a écrit :
Hello,
I would like to know what is the most efficient way to explore all edges of all
cells neighbor to a vertex v in a triangulation_3. Currently, I put incident
vertices of v into a vector ( by:
T.incident_vertices(v,back_inserter(neighbour_vertices)) ), I add v to the
vector, and I check all pairs of vertices in this vector to see if they are
connected by an edge in the triangulation or not( by: T.is_edge(...) ), I
wonder if there is any more efficient way to to it?
I would appreciate any help,
Ehsan Aganj
from

http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Triangulation_3_ref/Class_Triangulation_3.html

it seems that t.incident_edges is missing, (and is not what you want)

Note that the two following functionalities will be added in the coming release
(this does not answer your question, as noted by Olivier)

====================
template <class OutputIterator>
OutputIterator t.incident_edges ( Vertex_handle v, OutputIterator edges)
Copies all Edges incident to v to the output iterator edges. Returns the resulting output iterator.
Precondition: t.dimension() >0, v Vertex_handle(), t.is_vertex(v).

template <class OutputIterator>
OutputIterator t.finite_incident_edges ( Vertex_handle v, OutputIterator edges)
Copies all finite Edges incident to v to the output iterator edges. Returns the resulting output iterator.
Precondition: t.dimension() >0, v Vertex_handle(), t.is_vertex(v).
====================

a better workarround than yours is to take incident cells and take all 6 edges of these cells. In that way
- an edge from v is obtained several time (6 on average)
- an edge not containing v is obtained twice (probably with both orientations if you do it carefully).

removing duplicates is then needed.....





Archive powered by MHonArc 2.6.16.

Top of Page