Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Howto adapt my mesh for parameterization.

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Howto adapt my mesh for parameterization.


Chronological Thread 
  • From: paulo <>
  • To:
  • Subject: Re: [cgal-discuss] Howto adapt my mesh for parameterization.
  • Date: Sat, 30 Jan 2010 23:35:11 +0900
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=a8OzfAbdzv0SwrsTmGRsQtNKU/Tx2ame+eG8sex+ONh/cGpbVaJTXAND2zN4mh++6P J74xVhfAM/kUkHZNy8ZP9ifzIYu625GxQiUH+JkVovG+AKCuxhUSGDt9gXXFB6gCfo1Z njsC+W2nb/NwPGTsussGus9I38OjdhfJY6v5k=

Hi Laurent,

thank you so much for your help.
I could only test it today, and it helped allot.

I'm still debugging, but I'm getting a strange (in my opinion) result.
I'm inputing (in this sequence):
vertices:
(-1, -1, 0)
( 1, -1, 0)
( 1, 1, 0)
(-1, 1, 0)
Faces:
(0,1,2)
(0,2,3)

I get a parameterization:
(0,0)
(0,1) !?
(1,1)
(1,0) !?

This flips two of the vertices.

Shouldn't it be:
(0,0)
(1,0)
(1,1)
(0,1)

Am I understanding something wrong?

Thank you.

Best regards,
Paulo

Laurent Saboret wrote:
Hi Paulo,

The first step to use CGAL surface mesh parameterization is to convert your data to CGAL Polyhedron_3 http://www.cgal.org/Manual/last/doc_html/cgal_manual/Polyhedron/Chapter_main.html

You have several ways :
* Save your data in a .OFF file and let Polyhedron_3 read it (the easiest) http://www.cgal.org/Manual/last/doc_html/cgal_manual/Polyhedron/Chapter_main.html#Section_23.4
* Convert your data by code (as you started below) using Euler operations http://www.cgal.org/Manual/last/doc_html/cgal_manual/Polyhedron/Chapter_main.html#Subsection_23.3.7
* Convert your data by code using Polyhedron_incremental_builder_3 http://www.cgal.org/Manual/last/doc_html/cgal_manual/Polyhedron/Chapter_main.html#Subsection_23.6.2

Best regards,
Laurent Saboret



wrote:
Hello,

I'm using CGAL's parameterization package.
There's a very nice page explaining how to use if with OFF files, but that's
not my case.
So, instead of loading a mesh from a file, I'm trying to pass my vertices and
faces to CGAL.

My data is formatted in a opengl typical pattern. I have a vertex array, one or
more arrays of triangular faces. These faces contain no more than indexes to
the vertex array.

What I'm doing is to pass the face like:
typedef CGAL::... Poly;
Poly poly;
for all my faces get the face vertexes (pa, pb and pc)
poly.make_triangle(Point(pa.x, pa.y, pa.z), Point(pb.x, pb.y, pb.z),
Point(pc.x, pc.y, pc.z));

Of course this repeats vertexes (points), and does not give any information
about the faces connectivity.
In the end, running the algorithm I get: "Parameterization requires a convex
border"
The mesh I'm using right now is just a couple of coplanar triangles, or if you
want, a tessellated unit square.

But I can't seem to be able to find how to pass the vertexes and the faces
separately.
Nor do I know how to specify the border.
Is there an example of this somewhere?
I am searching the examples and demos, but some help would be greatly
appreciated.

Thank you
Paulo





Archive powered by MHonArc 2.6.16.

Top of Page