Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] Triangulation problem
- Date: Thu, 16 Jul 2009 23:29:36 +0200
wrote:
still nothing... I rewrite it along Your advices >
for (Triangulation::Finite_facets_iterator fit = T.finite_facets_begin(); fit
!= T.finite_facets_end(); ++fit)
{
Cell_handle cell = fit->first;
Point point1 =
cell->vertex(Triangulation::vertex_triple_index(fit->second, 2))->point();
Point point2 =
cell->vertex(Triangulation::vertex_triple_index(fit->second, 1))->point();
Point point3 =
cell->vertex(Triangulation::vertex_triple_index(fit->second, 0))->point();
triangles.push_back(Vec3(point1.x(), point1.y(), point1.z()));
triangles.push_back(Vec3(point2.x(), point2.y(), point2.z()));
triangles.push_back(Vec3(point3.x(), point3.y(), point3.z()));
}
I hope this code makes sense. It still works for one, and dont for other one.
I
spent some time in manual, but I cant find anything useful for me. I believe
what Im trying to do is basic operation for everyone who wants to render
result
of CGAL triangulation, so there must be somebody with solution for me ;-)
You assume that the Cell_handle is always the same, namely the cell inside
the tetrahedron. This is wrong (and you can check this by printing &*fit
As I wrote in my previous mail facets can be seen from two sides, so what
the Finite_facet_iterator does, is to step through all cells, to look at
the four neighbor cells. If one cell is finite, it reports the facet,
if the address of the cell is smaller than the address of the neighbor
in order to report facets only once.
That's why in your 4 point, 1 finite cell case, some facets get reported
from inside, others from outside.
andreas
- [cgal-discuss] Triangulation problem, icek, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Andreas Fabri, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Damian Sheehy, 07/16/2009
- Re: Re: [cgal-discuss] Triangulation problem, icek, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Andreas Fabri, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Ariel Baez, 07/16/2009
- Re: Re: [cgal-discuss] Triangulation problem, icek, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Andreas Fabri, 07/16/2009
- Re: Re: [cgal-discuss] Triangulation problem, icek, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Andreas Fabri, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Damian Sheehy, 07/17/2009
- Re: Re: [cgal-discuss] Triangulation problem, icek, 07/17/2009
- Re: Re: [cgal-discuss] Triangulation problem, icek, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Andreas Fabri, 07/16/2009
- Re: [cgal-discuss] Triangulation problem, Andreas Fabri, 07/16/2009
- Re: Re: [cgal-discuss] Triangulation problem, icek, 07/16/2009
Archive powered by MHonArc 2.6.16.