Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Edge/Facet Iterator

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Edge/Facet Iterator


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Edge/Facet Iterator
  • Date: Tue, 14 Oct 2008 12:15:59 +0200

Hi Dennis,

I think instead of just giving you the code sniplet that does the job,
we tell you how to search in the manual.

You looked up in the Delaunay triangulation reference manual page for
some functionality. Fine. But as the class is derived from the class
Triangulation_3
(and that is marked in the beginning of the man page of
Delaunay_triangulation_3)
some of its functionality is inherited from the base class, and hence
documented in the base class. And there you will find


Triangle t.triangle ( const Cell_handle c, int i)
Returns the triangle formed by the three vertices of facet
(c,i). The triangle is oriented so that its normal points to the inside of
cell c.
Precondition: t.dimension() greater or equal 2 and i in {0,1,2,3} in
dimension 3, i = 3 in dimension 2, and the facet is finite.

Triangle t.triangle ( Facet f) Same as the previous method for facet
f.
Precondition: t.dimension() greater or equal 2 and the facet is finite.

andreas


Dennis Endt wrote:
Hi Manuel,

thanks for your reply.

So then I have to ask another question ;)

I only know the way if I put some points in a Triangulation Part, I have to jump through all of the vertices, edges, triangles to get them.

I need these informations because I use my own datastructure. I read your documentation and tried the finite_vertices,finite_edge,finite_face iterators so far for this.

It seems to work for the vertices and the edges, but in the last case, I need the triangles from the 3D Delaunay Triangulation Object.

Is this the right way or have I to use another iterators. It is important to me to get the vertices,edges,triangles from the Delaunay Object.

That`s all what I want ;)

Best,
Dennis

2008/10/14 Manuel Caroli < <mailto:>>

Hi Dennis,


Dennis Endt wrote:

Last Question:

Finite_facets_iterator it:
I would like to get the edges of a facet. What`s the correct
method for
this?


I don't think this is the right question to ask. As you will have
figured out from the manual neither edges nor facets are stored
explicitly in the data structure.
So an edge is nothing but a triple (Cellhandle c, int i, int j)
where c->vertex(i) and c->vertex(j) are the vertices connected by
the edge.
So if you want to know these endpoints this is the answer to your
question.

Be aware of the strong separation between geometric and
combinatorial primitives at this point: vertices, edges, facets, and
cells are purely combinatorial primitives. That is also the reason
why they don't contain geometric information like e.g. coordinates,
and why you do not find them in the kernel. On the other hand you
have points, segments, triangles, tetrahedra etc. as geometric
primitives.

hope this helps

Manuel

-- You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss






Archive powered by MHonArc 2.6.16.

Top of Page