[vtk-developers] vtkGeometryFilter bug

Andreas Buykx A.Buykx at tnodiana.com
Fri Oct 28 04:59:12 EDT 2011

Hi all,

vtkGeometryFilter corrupts cell data when it tries to convert vtkUnstructuredGrid to vtkPolyData. I wrote a small test program that builds an unstructured grid from
various cell types, assigns cell data and point data, and runs it through the vtkGeometryFilter. The resulting polydata does not have as many celldata tuples as it has cells.

Defining 8 points
Adding 2 tetra cells
Adding 2 triangle cells
Adding 2 line cells
Adding 2 vertex cells
Adding point data array 'foo' with data for 8 points
Adding cell data array 'bar' with data for 8 cells

vtkGeometryFilter input:
vtkUnstructuredGrid dimensions: #cells=8 #points=8
point data array 'foo' #tuples=8
cell data array 'bar' #tuples=8

vtkGeometryFilter output:
vtkPolyData dimensions: #cells=14 #points=8
point data array 'foo' #tuples=8
cell data array 'bar' #tuples=10

We very much need a reliable conversion from vtkUnstructuredGrid to vtkPolydata by a filter.
Is there an alternative to vtkGeometryFilter, or does anyone have a solution for this (I found an earlier reference<http://www.vtk.org/pipermail/vtk-developers/2006-January/003956.html> to this problem)?
Shall I file this in the bug tracker?


Andreas Buykx
Senior Software Engineer

Software Developers and Analysis Consultants for Civil and Geotechnical Engineering

Delftechpark 19a, 2628 XJ, Delft, The Netherlands
Tel: +31 88 34262 15 (Direct) │ Tel: +31 88 34262 00 (Switchboard) │ +31 88 34262 99 (Fax)

...be green keep it on screen

TNO DIANA BV is a limited liability company registered in the trade register of the Chamber of Commerce as TNO DIANA BV with registered number 27252655.
This e-mail and its contents are subject to the DISCLAIMER at http://tnodiana.com/content/Disclaimer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20111028/5583720a/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkGeometryFilter_issue.cpp
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20111028/5583720a/attachment.ksh>

More information about the vtk-developers mailing list