Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Triangulation_3 / Facetiterator

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Triangulation_3 / Facetiterator


Chronological Thread 
  • From: Manuel Caroli <>
  • To:
  • Subject: Re: [cgal-discuss] Triangulation_3 / Facetiterator
  • Date: Tue, 19 Feb 2008 15:46:32 +0100

Thomas Zangl wrote:
Well, I now have some issues with the iterators. I want to catch all possible (finite) faces of all cells:

[...]

AFAIK this should work. I visite all cells and mark their finite faces with some info.

Now I iterate over them:

for(Rt_Finite_facet_iterator fIt = t.finite_facets_begin(); fIt != t.finite_facets_end(); fIt++) {

Rt_Cell_handle cell = fIt->first;
// this is the index of the facet's opposite vertex
int faceIndex = fIt->second;

// do some work ..
// mark them all as singular
cell->info().faces[faceIndex] = fsSingular;
cell->neighbor(faceIndex)->info().faces[faceIndex] = fsSingular;

}

As you can see, I iterate over all finite faces and mark them as "singular". I even mark the same face but viewed from the neighbor cell. Is that true?
You don't necessarily choose the right facet from the neighboring cell.
Try something like
cell->neighbor(faceIndex)
->info().faces[cell->neighbor(faceIndex)->index(cell)]
= fsSingular;
I just wrote it down like this, please check with the documentation.

So there is some difference between iterating over all cells and visit each facet of the cell and iterating over all facets and mark the facet and its opposite?
No, there shouldn't be.



Archive powered by MHonArc 2.6.16.

Top of Page