[vtkusers] vtkUnstructuredGridToPolyDataFilter
Amitesh Agarwal
amiteshagarwal at gmail.com
Wed Apr 5 02:11:47 EDT 2006
Hi all,
I am trying to convert an unstructured grid to polydata using
vtkUnstructuredGridToPolyDataFilter so that hole filling algorithm can be
used. I was trying to use it as follows
----------------------------------------------------------------
#!/usr/bin/env python
import vtk
from vtk.util.misc import vtkGetDataRoot
reader = vtk.vtkUnstructuredGridReader()
reader.SetFileName("/home/amitesh/testcase.vtk")
USG2Poly=vtk.vtkUnstructuredGridToPolyDataFilter()
USG2Poly.SetInput(reader.GetOutput())
meshhin = vtk.vtkPolyData()
meshhin.SetInput(USG2Poly.GetOutput())
meshhin.Update()
#Detect holes
boundaryEdges = vtk.vtkFeatureEdges()
boundaryEdges.SetInput(meshin)
boundaryEdges.SetBoundaryEdges(1)
boundaryEdges.SetFeatureEdges(0)
boundaryEdges.SetNonManifoldEdges(0)
boundaryEdges.SetManifoldEdges(0)
boundaryEdges.Update()
-----------------------------------------------------------------
I recieved an error using vtkpython interpretor which said
Traceback (most recent call last):
File "/home/amitesh/holepatch.py", line 8, in ?
USG2Poly=vtk.vtkUnstructuredGridToPolyDataFilter()
TypeError: this is an abstract class and cannot be instantiated
Can anyone tell me what is the error? I will really appreciate any
suggestion or solution in this regard.
Thanks
Amitesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060405/3f69f8b2/attachment.htm>
More information about the vtkusers
mailing list