Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Question about I/O triangulation with Data

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Question about I/O triangulation with Data


Chronological Thread 
  • From: Philipp Moeller <>
  • To:
  • Subject: Re: [cgal-discuss] Question about I/O triangulation with Data
  • Date: Sun, 11 Mar 2012 17:15:36 +0100
  • Organization: GeometryFactory

Jonas Wallin
<>
writes:

> Hello,
>
> I am new to cgal and trying to learn how to work with triangulation meshes
> where I have information on
> the faces and/or vertices.
> I was wondering if it is possible to use << operator to read/write external
> data to the .off files?
> If one has an data structure like the one in the adding color example
>
> http://www.cgal.org/Manual/beta/doc_html/cgal_manual/Triangulation_2/Chapter_main.html
> how do you read write this type infromation to files?
>
> Jonas Wallin
> PhD student
> Lth

Triangulation_2 does not support output/input to/from OFF files.

However, OFF has explicit support for color attributes on faces, but
AFAIK those are not supported by any of our OFF readers/writers. I have
a somewhat generic Boost.Spirit parser for OFF files around somewhere
and it should be "easy" to add optional color information to it and
build a reader/writer for Triangulation_2 out of it.

Attributes for OFF are limited. If you need something more general, you
might want to have a look at the PLY format.

--
Philipp Moeller
GeometryFactory



Archive powered by MHonArc 2.6.16.

Top of Page