Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] incremental builder and order of vertices

Subject: CGAL users discussion list

List archive

[cgal-discuss] incremental builder and order of vertices


Chronological Thread 
  • From:
  • To:
  • Subject: [cgal-discuss] incremental builder and order of vertices
  • Date: Wed, 28 Apr 2010 16:43:34 +0200

If I have a OFF file. For exemple :
OFF
4 2 0

x0 y0 z0
x1 y1 z1
x2 y2 z2
x3 y4 z4

3 0 1 2
3 0 3 1

(two triangles which have a edge in common)


If then, I construct a Polyhedron with an incremental builder,

for i from 1 to 4
B.add_vertex( point i );

begin facet
B.add_vertex_to_facet( 0);
B.add_vertex_to_facet( 1);
B.add_vertex_to_facet( 2);
end facet
begin facet
B.add_vertex_to_facet( 0);
B.add_vertex_to_facet( 3);
B.add_vertex_to_facet( 1);
end facet

( it's what cgal operator >> do for polyhedron )

Can I be sure that with
for ( it=P.vertices_begin(); it!=P.vertices_end(); ++it)
...
it->vertex()
...
the vertices are in the same order as in the off file ?

and if f is a facet
Halfedge_around_facet_circulator ci = f->facet_begin()
do
{
...
ci->vertex()->point()
...
} while ( ++ci != fit->facet_begin() );
Can I be sure that the vertices are in same order as in
the indices list of the off file.

I tried and it seems to be true. Always ?
Else what can I do ?


  • [cgal-discuss] incremental builder and order of vertices, cc . ld, 04/28/2010

Archive powered by MHonArc 2.6.16.

Top of Page