<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>On Thu, Sep 30, 2010 at 10:13 AM, Hugo Valdebenito <span dir="ltr"><<a href="mailto:hugo@maptek.cl">hugo@maptek.cl</a>></span> wrote:</div><div>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>Hi all<br><br>With the delaunay2D (3D) schema, the distribution of triangles is not the same, depending of the input points order. If I already have the vetex and index definitions for the triangles, how can I make the triangulation?<br>
<br>Hugo<br></blockquote><div> </div><div>If you already know the connectivity of the points, you can use this:</div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Triangle">http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Triangle</a><div>
<br></div><div>To add the next triangle, do</div><div><br></div><div><div> vtkSmartPointer<vtkTriangle> triangle2 =</div><div> vtkSmartPointer<vtkTriangle>::New();</div><div> triangle2->GetPointIds()->SetId ( 0, triangle2p0id );</div>
<div> triangle2->GetPointIds()->SetId ( 1, triangle2p1id );</div><div> triangle2->GetPointIds()->SetId ( 2, triangle2p2id );</div></div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Triangle"></a> triangles->InsertNextCell ( triangle2 );</div>
<div><br></div><div>David </div></div></div>