Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Alpaha shape question

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Alpaha shape question


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Alpaha shape question
  • Date: Wed, 18 Mar 2009 11:16:14 +0100

naresh wrote:
Hi
How can i save Alpha_shape_3 to .off file. ? I want to save trianglulated shape to off file .
Is that any way to save it ?
Alex

Hi Alex,

You have to code it by hand, but that shouldn't be too dificult.

print the header with the number of vertices and facets


Use a std::map<Vertex_handle, int>, traverse all alpha shape
vertices, check if they are in the map, and if not, put them in
there and increment a counter that started at 0. At the same
time print the x y z


Traverse all alpha shape facets and for the three vertices of the
facet read the indices from the map Print 3 i j k
where "3" indicates that the face has three vertices.

Hope this helps,

andreas



Archive powered by MHonArc 2.6.16.

Top of Page