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
Hi,

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.
<http://cgal-discuss.949826.n4.nabble.com/file/t376134/36.png>  
<http://cgal-discuss.949826.n4.nabble.com/file/t376134/37.png>

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
this.
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?


Regards
Shrabani Ghosh








--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss