Subject: CGAL users discussion list
List archive
- From: "Jingyi Jin" <>
- To:
- Subject: Re: [cgal-discuss] How to fetch a Vertex_handle coordinates?
- Date: Tue, 8 May 2007 15:47:11 -0500
Hi Jari,
I think you can do somthing like:
Point pt = h->point();
cout << CGAL::to_double(pt[0]) << " " << CGAL::to_double(pt[1]) <<
CGAL::to_double(pt[2]) << endl;
I haven't used 3D Alpha Shapes, but I think its data structure should
be very similar to Triangulations...
Sincerely,
Jingyi
On 5/8/07, Jari Vauhkonen
<>
wrote:
Hello,
I'm a newbie with CGAL and programming overall. I've been trying to build 3D
alpha shapes from point clouds, in which I have also succeeded.
Now I'm interested in separating the points belonging to the interior, and
correspondigly to the exterior, of the alpha shape computed, and outputting
the
point coordinates into an ASCII file.
I've got a list with Vertex_handle type and an iterator over it. Then, I have
no
idea how to proceed: I've tried to explore for a method to convert a
Vertex_handle into a Vertex, a point representation or straight into a
coordinate string to print, with no success. What to do?
Here's a piece of my code:
std::list<Vertex_handle> vertices;
as.get_alpha_shape_vertices (back_inserter(vertices), cells_type);
FILE *koe;
koe = fopen("testi.txt", "w");
for ( list<Vertex_handle>::iterator vert_it = vertices.begin();
vert_it != vertices.end(); vert_it++ ) {
Vertex_handle h = *vert_it;
// ??????
}
fclose (koe);
This is probably truly amateurish, but I can't figure it out myself. Please
help!
Best regards,
Jari
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- How to fetch a Vertex_handle coordinates?, Jari Vauhkonen, 05/08/2007
- Re: [cgal-discuss] How to fetch a Vertex_handle coordinates?, Jingyi Jin, 05/09/2007
Archive powered by MHonArc 2.6.16.