Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] polyhedron_ex_parameterization

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] polyhedron_ex_parameterization


Chronological Thread 
  • From: Laurent Saboret <>
  • To:
  • Subject: Re: [cgal-discuss] polyhedron_ex_parameterization
  • Date: Fri, 29 May 2015 12:00:21 +0200

Hi Hardik,

Simple_parameterization.cpp and polyhedron_ex_parameterization.cpp do not use the same data structures to store the (u, v) values.
You need to adapt the code when you copy code from Simple_parameterization.cpp to polyhedron_ex_parameterization.cpp.

polyhedron_ex_parameterization.cpp stores the mesh in the class Polyhedron_ex defined in Polyhedron_ex.h.
I think that the next code should work:

double u = pVertex->halfedge()->u();
double v = pVertex->halfedge()->v();

Best regards,

Laurent Saboret
Transvalor/MINES Paristech


Le 28/05/2015 23:07, Hardik Kabaria a écrit :
Hi Laurent, 

Simple_parametrization.cpp access (uv) as follows:

    Polyhedron::Vertex_const_iterator pVertex;
    for (pVertex = mesh.vertices_begin();
        pVertex != mesh.vertices_end();
        pVertex++)
    {
        // (u,v) pair is stored in any halfedge
        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
        double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
        std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
    }

I get the following compiler error when I try the same:
/usr/local/soft/CGAL-4.2/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp:517:33: error: no member named 'info' in
      'Parameterization_polyhedron_adaptor_ex'
        double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();

polyehdron_ex_parametrization uses: #include "Parameterization_polyhedron_adaptor_ex.h"
and I could not find info() option in it.

Am I missing something ?

Thanks!
Hardik



On May 26, 2015, at 12:59 AM, Laurent Saboret <> wrote:

Dear Hardik,

I invite you to look at Simple_parameterization.cpp example that shows how to access (u, v) pairs.

Best regards,

Laurent Saboret
Transvalor/MINES Paristech


Le 26/05/2015 00:13, Hardik Kabaria a écrit :
Hello, 

I am trying to using polyhedron_ex_parameterization.cpp example in the Surface_mesh_parametrization
section. It only output an eps file. 
I need (u,v) coordinates for each and every vertex in the input .off file. How can I get it ?

Thanks for help!
Hardik



Hardik Kabaria Ph.D. Candidate Department of Mechanical Engineering Stanford University



Hardik Kabaria Ph.D. Candidate Department of Mechanical Engineering Stanford University





Archive powered by MHonArc 2.6.18.

Top of Page