<div class="gmail_quote">On Tue, Apr 12, 2011 at 9:13 PM, Nico Schlömer <span dir="ltr">&lt;<a href="mailto:nico.schloemer@gmail.com">nico.schloemer@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<br>
<br>
so I have this vtkUnstructuredGrid here and would like to add values<br>
at the midpoints of the edges. -- Is that possible at all?<br>
<br>
Cheers,<br>
Nico<br></blockquote><div><br></div><div>Is the unstructured grid a polygonal mesh?  You can find the midpoints by finding vertices which share an edge:</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity</a></div>
<div><br></div><div>and then computing the midpoint. If you&#39;re looking to change the topology of the mesh to include these new midpoints you can look at the subdivision filters:</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Subdivision">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Subdivision</a></div>
<div><br></div><div>David</div></div>