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: "Tardugno, Angelo" <>
  • To: <>
  • Subject: RE: [cgal-discuss] Reading a surface triangulation
  • Date: Tue, 5 Jun 2007 12:10:57 +0100

Actually the file is a vtk file. Anyway, I think i can transform it into an OFF file is I have to....


From: Mariette Yvinec [mailto:]
Sent: 05 June 2007 10:26
To:
Subject: Re: [cgal-discuss] Reading a surface triangulation

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