[vtkusers] How to set the boundary of vtkDelaunay2D ?

zhq 15891495523 at 126.com
Sat Oct 3 01:02:47 EDT 2015


Dear David:

      I have another problem. After triangulation work, how to get the edges
of result?
 
      My test is :

      vtksmartpointer<vtkPolyData> tri = triangulator->GetOutput();
      vtksmartpointer<vtkCellArray> triCell = tri->GetPolys();
      vtksmartpointer<vtkIdList> triList =
vtksmartpointer<vtkIdList>::new();
      triCell->GetCell(i,triList);
      for(int j=0;j<3;j++)
      {
            vtkIdtype point1 = triList->GetId(i);
            vtkIdtype point2 = triList->GetId((i+1)%3);
            if point1 and point2 located in differ circle
                double p1[3],p2[3];
                tri->GetPoint(point1,p1);
                tri->GetPoint(point2,p2);
                double dis = distance( p1,p2 );
      }

      I though that the triList record the ids of triangle points, and the
id number of triList is 3. But, I am wrong. Because the id number of triList
can be 70. And the length of edge can be 2 which should be around 1.
 
      So, how can I get the length of edges of the result ?

ZhangQiang



--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-the-boundary-of-vtkDelaunay2D-tp5734142p5734216.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list