Subject: CGAL users discussion list
List archive
- From: Benjamin Bouscasse <>
- To:
- Subject: Re: [cgal-discuss] Mesh 2D test
- Date: Fri, 26 Mar 2010 13:09:14 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=GbJ9bgAIoysUaVLwh6eN6ia5X2y5dA8oTi98ndrtGvjjwJ/60/J7uTEOELwNF48E7b pwIde4u0UrD0IU3aMlf2AeaWjbZsre/CzAZrv0Vqt3I6RKbQm1gnqDBP587jWMqaEpTv Kgw5VZiO/e6b1VhC0ok0YFBZneDo7FXNV6dQg=
2010/3/26 Laurent Rineau (GeometryFactory) <>
>
> Here is the a piece of code:
> Declaration are the ones of the mesh_global.cpp example.
>
> std::map<Vertex_handle,int> vertex_index;
> int idx = 0;
> int nn=cdt.number_of_vertices();
> std::vector<Vertex_handle> TV(nn);
> int ii=0;
> for(CDT::Vertex_iterator vit=cdt.vertices_begin(); vit !=
> cdt.vertices_end(); ++vit)
> {
> vertex_index[vit]=idx++;
> TV[ii++]=vit;
> }
Here you give an index to all vertices of the triangulation (including theincident to that vertex numbered 0.
infinite one).
TV[0] is cdt.vertices_begin(). There is no reason that vertex is the infinite
one (you are iterating of finite vertices: vertex_begin() is a deprecated name
for finite_vertices_begin()). Then, it is normal that a finite face can be
Thank you for the fast response, For the is_in_domain() is exactly what I need.
For the first one, in my code there is also:
assert(TV[0]==cdt.infinite_vertex());
And when I plot the triangulation all triangles are ok, so I don't understand how it can be a kind of shift in the vertex indexes.
I would try to correct anyway taken into account your info.
Thanks,
Benjamin
- [cgal-discuss] Mesh 2D test, N2a, 03/26/2010
- Re: [cgal-discuss] Mesh 2D test, Laurent Rineau (GeometryFactory), 03/26/2010
- Re: [cgal-discuss] Mesh 2D test, Laurent Rineau (GeometryFactory), 03/26/2010
- Re: [cgal-discuss] Mesh 2D test, Benjamin Bouscasse, 03/26/2010
- Re: [cgal-discuss] Mesh 2D test, Laurent Rineau (GeometryFactory), 03/26/2010
Archive powered by MHonArc 2.6.16.