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: Laurent Saboret <>
  • To:
  • Subject: Re: [cgal-discuss] Howto adapt my mesh for parameterization.
  • Date: Mon, 01 Feb 2010 13:38:15 +0100
  • Organization: INFOTERRA

Hi Paulo,

CGAL Polyhedron expects faces to be ccw when looked at from outside the mesh.
Unfortunately, I never used Polyhedron_incremental_builder and I cannot help you on this class.

Best regards,
Laurent Saboret


paulo wrote:
Ok,
I found a temporary (?) solution.
I just need to build my faces clockwise. Ex:
c
/ \
a - b
Face f(a,b,c) //I have ccw

//but must copy in cw order.
inc_builder.begin_facet();
inc_builder.add_vertex_to_facet(f.c);
inc_builder.add_vertex_to_facet(f.b);
inc_builder.add_vertex_to_facet(f.a);
inc_builder.end_facet();

This seems to work for the examples that I've tried untill now...
But does it make sense?

Cheers
Paulo

paulo wrote:
Hi,

after debugging CGAL's code, there's something I don't understand, and looks like a bug.

In the square border parameterizer it computes the offsets 0, 1, 2 and 3 using the border iterator, which iterates through the vertices apparently in a clockwise way, which in my case yields the sequence ((-1, -1, 0) , (-1, 1, 0) , ( 1, 1, 0) ,( 1, -1, 0)).
But afterwards it parameterizes the mesh in a counterclockwise way (?!) which yields ((-1, -1, 0), ( 1, -1, 0), ( 1, 1, 0), (-1, 1, 0)).
This does not make sense to me.

But if it is a bug how come no one found it before? No one uses this code?

Can any one related to this implementation say something please?
I feal tempted to change the code, but I would like to hear what other people have to say.

Thank you.
Paulo


paulo wrote:
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






Ce courrier électronique et toutes les pièces éventuellement jointes qu’il
contient sont CONFIDENTIELS et destinés exclusivement à l’usage de leur
destinataire. Si une erreur de transmission ou une adresse erronée a mal
dirigée ce courrier, merci d’en informer l’expéditeur en lui faisant une
réponse par courrier électronique dès réception. Si vous n’êtes pas le
destinataire de ce courrier, vous ne devez pas l’utiliser, le conserver, en
faire état, le distribuer, le copier, l’imprimer ou en révéler le contenu à
une tierce partie.
Ce courrier électronique est à usage strictement informatif et ne saurait
engager de quelque manière que ce soit INFOTERRA France SAS, ni ses filiales.

This e-mail and any attachments hereto are CONFIDENTIAL and intended solely
for the use of the addressee. If you have received this e-mail in error
please send it back to the person that sent it to you.
If you have received it in error, please notify the sender by return email.
If you are not the addressee of this email, you must not use, keep,
disseminate, copy, print or otherwise deal with it.
This email is for information only and will not bind INFOTERRA France SAS in
any contract or obligation, nor its subsidiaries.


  • Re: [cgal-discuss] Howto adapt my mesh for parameterization., Laurent Saboret, 02/01/2010

Archive powered by MHonArc 2.6.16.

Top of Page