Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How to extract faces from a CDT? examples/Mesh_2/mesh_global.cpp

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How to extract faces from a CDT? examples/Mesh_2/mesh_global.cpp


Chronological Thread 
  • From: Matthew Denno <>
  • To:
  • Subject: Re: [cgal-discuss] How to extract faces from a CDT? examples/Mesh_2/mesh_global.cpp
  • Date: Wed, 7 Oct 2009 08:21:44 -0400
  • 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=njInPK9pTOlZQpq5NdLplab+ZTag+eTm8qDEdE7cS6yQVTj8AKhnp7PpWC0iWUc10A sqXNRP2RL4DAALEl46DtoG5kSCIEW59FD8PXVD7Jboj4F1jR2QIGShbi3446XAlVdbsy wkLhIK/99Ywtolo8OuLZ78Zat0ku1irMr4wsI=

Alejandro,

Here is a link to the thread on Nabble:

http://www.nabble.com/Question-on-Triangulation-ts25388558.html

Hope it helps.

Matt

On Wed, Oct 7, 2009 at 8:04 AM, Matthew Denno <> wrote:

I am not at my computer right now but if I recall there was a thread discussing how to do this a few weeks back.  Maybe you could search and find it.

On Oct 7, 2009 12:56 AM, "Alejandro Aguilar Sierra" <> wrote:

Hello:

I am studyng example examples/Mesh_2/mesh_global.cpp. The last line
prints the number of vertices.

std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;

I want to print instead the vertices and then the faces, so I can draw
the mesh with any mesh viewer.  Actually I am trying to create an OBJ
file.

First I print the vertices

for (CDT::Vertex_iterator vit = cdt.vertices_begin(); vit!=
cdt.vertices_end(); ++vit) {
   std::cout << "v " << (*vit) << " 0" << std::endl;
 }

Now I want to print the faces, but just the individual faces prints nothing.

for (CDT::Face_iterator fit = cdt.faces_begin(); fit!=
cdt.faces_end(); ++fit) {
   std::cout << "f " << (*fit) << std::endl;
}

Yes I am looking and trying, but no success so far.

How can I get the vertices information from the faces?

Any hint?

Regards,

--
Alejandro Sierra
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page