Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Specify corners of a square border parameterization

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Specify corners of a square border parameterization


Chronological Thread 
  • From: Thibault Marzais <>
  • To:
  • Subject: Re: [cgal-discuss] Specify corners of a square border parameterization
  • Date: Tue, 11 Dec 2007 00:43:47 +0100

Thank you Laurent. That's all I needed to know.

Laurent Saboret a écrit :
Dear Thibault,

You are right, the Square_border_parameterizer_3 class (and the derivates) do not allow you to specify your preferred corner vertices.

For this purpose, you must provide your own model of BorderParameterizer_3
(http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Surface_mesh_parameterization_ref/Concept_BorderParameterizer_3.html)
In your case, the Square_border_parameterizer_3 class should be a good starting point.
Basically, you have to implement a "parameterize_border(Adaptor& mesh)" method that maps border vertices to [0.0, 4.0[, with your preferred corner vertices corresponding to e.g. 0.0, 1.0, 2.0 and 3.0.

To find the Border_vertex_iterator of your preferred corner vertices, you may simply iterate over all border vertices and select the vertices based on their index. As in your case the first four vertices in the OFF are the corners, their index should be 0, 1, 2, and 3.

Best regards,

Laurent Saboret
INRIA Sophia-Antipolis


Thibault Marzais wrote:
Hi all,

I'd like to parameterize a mesh (off file). I know the Square_border_parameterizer_3 class (and the derivates), I had already read the chapter 39.3 in documentation. I used the Simple_parameterization.cpp file to do so, it works fine, but takes wrong vertices for corners. So I decide to write my own Square_border_parameterizer_3 class and my own parameterize_border method.

The problem is that I know the vertices that are perfect corners for parameterization, but I can't find any way to determine their Border_vertex_iterator. In fact, the only information I have is the off file and the first four vertices are the corners.

Is there any file/link/cheat I missed?
If not, can you suggest a method?

Thanks in advance.

Thibault Marzais



--
Thibault Marzais, Doctorant au LAIC,
Laboratoire d'Algorithmique et Image de Clermont-Ferrand,
IUT Département Informatique, bureau C4
BP 86 63172 Aubiere cedex France.
tel: +33 (0)4 73 17 71 47
http://laic.u-clermont1.fr/~marzais/





Archive powered by MHonArc 2.6.16.

Top of Page