Conversion from VTK space to CGAL space

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Conversion from VTK space to CGAL space

Shrabani Ghosh

I am interested to convert a mesh from vtk space to cgal space.
In my vtk mesh, let's say two different information exists for vertices. I
used the same vertex id to assign a color to the CGAL mesh, but the CGAL
mesh does not look like the same.

The first picture is the vtk file. Here, all the vertices of one side of the
mesh are red. I assigned the same for the CGAL but I got the mesh look like
I think, there is a is difference between CGAL and vtk vertex.

In my code, I used property_map.
Mesh::Property_map<vertex_descriptor,CGAL::Color> vcolors;
And assigned value something like this,
if(vtkFileVertexValue[i] == 2)
vcolors[vd] = CGAL::RED;    // here i and vd are the same value

I have tried all the patterns, but could not get a pattern where
vtkFilevertex will be exactly the same place of CGAL vertex.

Another question, is it possible to increase the vertex_descriptor by more
than one in the loop? Like below here
BOOST_FOREACH( vertex_descriptor vd, m.vertices())
how can I increase the vd by 5 in the loop?

Shrabani Ghosh

Sent from:

You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to