[vtkusers] HELP: removing redundant cell info

Theodore Papatheodorou tp500 at doc.ic.ac.uk
Tue Feb 18 13:03:48 EST 2003


Hi,
I have created a program that copies some cells from one PolyData to a
new one. The problem is that the way I have written it, a cell might be
copied twice to the other PolyData. This results in redundant points and
redundant cell information. I can run a CleanPolyDataFilter and clean
redundant points but what can I do about redundant cell information. Is
there a filter/command that gets rid of them?

EXAMPLE:
--------------------
# vtk DataFile Version 3.0
vtk output
ASCII
DATASET POLYDATA
POINTS 10 float
87.0438 164.458 61.6764 86.9758 162.261 62.0192 89.2155 162.136 61.2005
89.2729 164.344 60.9617 91.4649 162.059 60.89 89.1866 159.959 61.7486
91.3865 159.879 61.422 91.5173 164.267 60.6512 93.6872 161.968 60.4335
93.6354 159.797 61.0677
POLYGONS 12 48
3 0 1 2
3 0 2 3
3 3 2 4
3 1 5 2
3 2 5 6
3 2 6 4
3 3 2 4    <--- THIS ONE IS TWICE
3 3 4 7
3 7 4 8
3 2 6 4   <---- AND THIS ONE
3 4 6 9
3 4 9 8

It does not seem importand here but in big files it almost doubles their
size. Can you please help?
Thanks for your time!!
Theodore




More information about the vtkusers mailing list