Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Reading a surface triangulation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Reading a surface triangulation


Chronological Thread 
  • From: Mariette Yvinec <>
  • To:
  • Subject: Re: [cgal-discuss] Reading a surface triangulation
  • Date: Tue, 05 Jun 2007 11:25:39 +0200

Tardugno, Angelo wrote:
Hello everybody,
 
I have to import a surface triangulation into my code and I was wondering what's the best way of doing that.
Basically, I've got the file in this format:
 
x1 y1 z1            // Begin coordinates of points
.. .. ..
xn yn zn            // End coordinates of point
1 2 3                // Point connectivity, describing the triangles of the traigulation
2 5 6
.. .. ..
5 1 n
 
What do I have to do? Create a triangulation T and then simply outputing the content of the file to T?
 
in_stream >> T
 
?
 
I've read the output of out_stream << Triangulation and it seem more or less the same.The only difference is that there are four vertices in the connectivity part, since it's using tethraedrons. Can I use simple triangles in 3D?
 
Thanks
 
Angelo Tardugno

Your file looks like an off file.
Triangulation_data_structure_2  has an (undocumented) function
called off_file_input to read off-files of surface meshes.
You might try to use/adapt it ....



Archive powered by MHonArc 2.6.16.

Top of Page