<div class="gmail_quote">On Sun, Apr 18, 2010 at 9:25 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>I am trying to get all vertices connected by an edge to a particular vertex in a mesh.</div><div><br></div><div>I tried this:</div><a href="http://www.vtk.org/Wiki/VTK/Examples/CellEdges" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/CellEdges</a><div>
<br></div><div>However, all of the point ids seem to be 0.</div><div><br></div><div>The output is:</div><div><br></div><div><div>The cell has 3 edges.</div><div>Edge 0 has 2 points.</div><div>Edge 0 uses point 0</div><div>
Edge 0 uses point 0</div><div>Edge 1 has 2 points.</div><div>Edge 1 uses point 0</div><div>Edge 1 uses point 0</div><div>Edge 2 has 2 points.</div><div>Edge 2 uses point 0</div><div>Edge 2 uses point 0</div></div><div><br>
</div><div>Where I would expect something like</div><div><br></div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/CellEdges" target="_blank"></a><div>The cell has 3 edges.</div><div>Edge 0 has 2 points.</div><div>Edge 0 uses point 0</div>
<div>Edge 0 uses point 1</div><div>Edge 1 has 2 points.</div><div>Edge 1 uses point 1</div><div>Edge 1 uses point 2</div><div>Edge 2 has 2 points.</div><div>Edge 2 uses point 0</div><div>Edge 2 uses point 2</div><div><br>
</div><div>Can anyone see where this is going wrong?</div><div><br></div>Thanks,<br><br>David<br>
</div>
</blockquote></div><div><br></div>I guess you have to explicitly setup the topology for the triangle. When I added:<div><br></div><div><div> triangle->GetPointIds()->SetId ( 0, 0 );</div><div> triangle->GetPointIds()->SetId ( 1, 1 );</div>
<div> triangle->GetPointIds()->SetId ( 2, 2 );</div><div><br></div><div>it worked as expected.</div><div><br clear="all">Thanks,<br><br>David</div></div>