Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Regular_Triangulation_3: dual of an edge

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Regular_Triangulation_3: dual of an edge


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Regular_Triangulation_3: dual of an edge
  • Date: Wed, 15 Aug 2007 08:04:37 -0700

Thomas Zangl - Home wrote:
Hi!

Given a RegularTriangulation3 and a number of edges of this
triangulation. For each of these given edges I try to compute its dual
plane (facet). The plane is formed by the set of vertices which are the
dual of each regular triangulation cell, the edge is part of.

I use some code like this:
(vh1, vh2 are vertex handles of an edge, t = RegularTriangultion3)
Rt_Cell_handle c;
int i, j;
assert(t.is_edge(vh1, vh2, c,i,j));

Note that c, i, and j only get assigned values when you are compiling
in debug mode. Otherwise the assert statement is not executed, and
the next call is just random, and so is what follows.

Rt_Cell_circulator cCirc = t.incident_cells(c, i, j);
Rt_Cell_circulator cCircEnd = cCirc;
PointContainer pDual;
do {
if (!(t.is_infinite(cCirc))) {
Point p = t.dual(cCirc);
pDual.push_back(p);
}
} while(cCirc++!=cCircEnd);

if (pDual.size() == 1 ) {
cout << "hasIntersectionWithPD: got only one point." << endl;
return false;
} else if (pDual.size() == 2) {
cout << "hasIntersectionWithPD: got only one segment." << endl;
return false;
} else if (pDual.size() == 0) {
cout << "hasIntersectionWithPD: Got no dual point? Argl....!" << endl;
return false;
}

I then happens that an edge has 0, 1 or 2 cells around it which
produce the same number of dual points.

Can that be true? I wonder because if an edge of a triangulation has 0
dual points, this means that the edge is only part of infinite
cells?

Best regards,



Archive powered by MHonArc 2.6.16.

Top of Page