Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Delaunay Triangulation - number of edges

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Delaunay Triangulation - number of edges


Chronological Thread 
  • From: Monique Teillaud <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Delaunay Triangulation - number of edges
  • Date: Sun, 02 Nov 2008 17:21:35 +0100

Dennis Endt wrote:
Hi Monique,

yes I have had a look.

But it seemed to work with the 3d Delaunay Triangulation and so it
didn`t matter.

It worked of course, since cgal 3d triangulations are working.
But apparently it did not give you what you wanted.

But now I found this situation.

but have you read the 2d triangulation manual...?

So plz tell me if I`m wrong:

Because I don`t know which wall is a vertical or a horizontal wall and
so on I would use:

CGAL::Triangulation_euclidean_traits_xy_3<K>
CGAL::Triangulation_euclidean_traits_xz_3<K>
and CGAL::Triangulation_euclidean_traits_yz_3<K>

for every of my fassades and then merge the results of all of them?

Could this work? Or is there a more simple way to do this?

no
If you are lucky (= your points really don't belong to a plane parallel to any xy,xz,yz plane), you will get the same triangulation three times, which is not what you want (I guess so). Yhen using one of these random traits should give you what you want.
If you are less lucky, one of the computationa will crash. Then, use one of the other two.
I'm afraid that's the best you can do if you don't know anything about your data, except the fact that they are almost coplanar.

Two other questions:
How do I get the points of an edge of a 2d Delaunay Triangulation:

for(Delaunay::Finite_edges_iterator ie = T.finite_edges_begin(); ie !=
T.finite_edges_end(); ie++)
{
ie->first->vertex(ie->second)->point() // doesn`t work so far
ie->first->vertex(ie->third)->point()
}

You can not just use your 3d code and hope it will work in 2d now. Please have a look at the 2d triangulation manual and read how edges are represented. Also, there have been several recent threads answering similar questions recently.

What`s wrong on this:
for(Delaunay::Finite_faces_iterator it = T.finite_faces_begin(); it !=
T.finite_faces_end(); it++)
{
Triangle_3 delaunayTriangle = T.triangle(*it); // error
}

the 2d triangulation does not have a Triangle_3

again, please read the 2d triangulation manual, this will solve most of your questions.

best,
Monique Teillaud



Archive powered by MHonArc 2.6.16.

Top of Page