Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Cube parameterization

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Cube parameterization


Chronological Thread 
  • From: Laurent Saboret <>
  • To:
  • Subject: Re: [cgal-discuss] Cube parameterization
  • Date: Fri, 27 Jul 2007 13:58:48 +0200
  • Organization: INRIA Sophia-Antipolis

Hi Vidya,

I was able to reproduce your problem with the with the first example of the "Planar Parameterization of Triangulated Surface Meshes" package: Simple_parameterization.cpp

The error occurs of course on line line 55 that reads the OFF file:
stream >> mesh;
You can get diagnostic messages by replacing this line by:
CGAL::scan_OFF(stream, mesh, true /* verbose */);

The problem is that CGAL Polyhedron_3 class expects faces to be oriented counterclockwise as seen from the outside of the polyhedron. See http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Polyhedron/Chapter_main.html#Section_12.2

The proper OFF file is:
OFF
8 10 0
-1.0 1.0 1.0
1.0 1.0 1.0
1.0 1.0 -1.0
-1.0 1.0 -1.0
-1.0 -1.0 1.0
1.0 -1.0 1.0
1.0 -1.0 -1.0
-1.0 -1.0 -1.0
3 5 6 1
3 2 1 6
3 0 3 4
3 7 4 3
3 6 5 7
3 4 7 5
3 1 0 5
3 4 5 0
3 2 6 3
3 7 3 6

Best regards,
--
Laurent Saboret
INRIA Sophia-Antipolis



a écrit :
Hi everyone,

I am a new user of CGAL and I am trying to make use of the "Planar
Parameterization of Triangulated Surface Meshes" sub-package for my work. I am
trying to parameterize a simple cube described by the following OFF file:
OFF
8 10 0
-1.0 1.0 1.0
1.0 1.0 1.0
1.0 1.0 -1.0
-1.0 1.0 -1.0
-1.0 -1.0 1.0
1.0 -1.0 1.0
1.0 -1.0 -1.0
-1.0 -1.0 -1.0
3 5 6 1
3 2 1 6
3 0 3 4
3 7 4 3
3 6 5 7
3 4 7 5
3 1 5 0
3 4 0 5
3 2 6 3
3 7 3 6

However I get an error message "Cannot read OFF file". I am not sure where I
am going wrong out here. Is it possible to parameterize a cube with one face open ?

Thanks, Vidya



  • Cube parameterization, kvidya, 07/26/2007
    • Re: [cgal-discuss] Cube parameterization, Laurent Saboret, 07/27/2007

Archive powered by MHonArc 2.6.16.

Top of Page