[vtkusers] adding values at edge midpoints

David Doria daviddoria at gmail.com
Tue Apr 12 22:26:31 EDT 2011


On Tue, Apr 12, 2011 at 9:13 PM, Nico Schlömer <nico.schloemer at gmail.com>wrote:

> Hi all,
>
> so I have this vtkUnstructuredGrid here and would like to add values
> at the midpoints of the edges. -- Is that possible at all?
>
> Cheers,
> Nico
>

Is the unstructured grid a polygonal mesh?  You can find the midpoints by
finding vertices which share an edge:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity

and then computing the midpoint. If you're looking to change the topology of
the mesh to include these new midpoints you can look at the subdivision
filters:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Subdivision

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110412/f45d0dcc/attachment.htm>


More information about the vtkusers mailing list