[vtkusers] how to get vertex coordinates in stl file

Vladimir Lazunin lazunin.v.aa at m.titech.ac.jp
Thu Jun 21 02:05:59 EDT 2007


If your dataset's 0-th cell has points with ids 0, 1, 2, it doesn't mean
that 1-st cell has 0, 2, 3 or anything. Cells are not arranged in that way.
If you want to get coordinates of the next (by number) cell, you must  
increment
'nCellID' and re-iterate. If you want to get one of the neighbouring  
cells, you
should first get those cells (see GetCellEdgeNeighbours etc.), then get  
their
points. In this case two point ids indeed will be the same with previous  
cell,
and the 3-rd one could be 3, or 333, or 9847590832, or whatever
If I understood your question correctly.

>    Thank you very much. Following your suggestions I can get three points
> coordinates of the same triangle facet now. Because I use for loop to  
> get point's
> coordinates of the next triangle facet, I found that when  I want to get  
> the
> second triangle facet points coordinates, a=0,b=2,c=3.
>    a = PointsIDList->GetId(0);
>    b = PointsIDList->GetId(1);
>    c = PointsIDList->GetId(2);
> According to my understanding , a=0,b=1,c=2, in this way I can get  
> correct
> coordinates of points.When c=3, coordinates of point I got are wrong.I  
> don not
> know why. Could you give me some advices?



More information about the vtkusers mailing list