Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Triangulation problem

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Triangulation problem


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Triangulation problem
  • Date: Thu, 16 Jul 2009 21:23:44 +0200


A Facet is a cell and an index. The same facet can be seen
from the other side.

Cell_handle nh = (*fit).first->neighbor((*fit).second);
int ni = nh->index((*fit).first;

Facet nf(nh,ni)

nf describes the same facet seen from the other side,
so the same three points can be seen cw or ccw.

andreas



wrote:
well, still no luck here... I tried your function >
int faceIndex = 0;
for (Triangulation::Finite_facets_iterator fit = T.finite_facets_begin();
fit != T.finite_facets_end(); ++fit)
{ K::Triangle_3 triangle = T.triangle(*fit);

int index = Triangulation::vertex_triple_index(faceIndex, 0);
Point vertex = triangle.vertex(index);
triangles.push_back(Vec3(vertex.x(), vertex.y(), vertex.z()));

index = Triangulation::vertex_triple_index(faceIndex, 1);
vertex = triangle.vertex(index);
triangles.push_back(Vec3(vertex.x(), vertex.y(), vertex.z()));

index = Triangulation::vertex_triple_index(faceIndex, 2);
vertex = triangle.vertex(index);
triangles.push_back(Vec3(vertex.x(), vertex.y(), vertex.z()));

faceIndex++;
}

but now result is that first set of points is ccw and second cw. I dont get
it,
both of my input point sets are cw, why do i get ccw triangles for first set
and cw for second set?




Archive powered by MHonArc 2.6.16.

Top of Page