Subject: CGAL users discussion list
List archive
- From: paulo <>
- To:
- Subject: Re: [cgal-discuss] Howto adapt my mesh for parameterization.
- Date: Sun, 31 Jan 2010 03:38:34 +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=HlSyLFKwqvDP+CxJfGgwG3tDLv2T6n/uReukJeHDN1+CPXNIMTrt1YC+s793fqLEU+ w7NqILHGg0Sa/uAFcR+3Hsoq1r9BkOuL83GbDvXEzoEivoFNnnlTVJIVdIiGOlkpXjfi Ia9HtSVjHBv1oXV4WzMp4/3tzqknHj1XJwrO8=
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
- [cgal-discuss] Howto adapt my mesh for parameterization., paulo.jnkml, 01/26/2010
- Re: [cgal-discuss] Howto adapt my mesh for parameterization., Laurent Saboret, 01/27/2010
- Re: [cgal-discuss] Howto adapt my mesh for parameterization., paulo, 01/30/2010
- Re: [cgal-discuss] Howto adapt my mesh for parameterization., paulo, 01/30/2010
- Re: [cgal-discuss] Howto adapt my mesh for parameterization., paulo, 01/30/2010
- Re: [cgal-discuss] Howto adapt my mesh for parameterization., paulo, 01/30/2010
- Re: [cgal-discuss] Howto adapt my mesh for parameterization., paulo, 01/30/2010
- Re: [cgal-discuss] Howto adapt my mesh for parameterization., Laurent Saboret, 01/27/2010
Archive powered by MHonArc 2.6.16.