[vtkusers] deleting a face from polydata
John Hunter
jdhunter at ace.bsd.uchicago.edu
Wed Apr 7 16:44:55 EDT 2004
>>>>> "Jeff" == Jeff Lee <jeff at cdnorthamerica.com> writes:
Jeff> mabey polydata.Update() or polydata.Modified() after the
Jeff> removal? -Jeff
Yeah, tried that on the mapper and the polydata. No help. I also
tried inserting a filter in the pipeline and completely rebuilding the
scene with
polyData.DeleteCell(cellId)
polyData.Update()
print 'deleted cell', cellId
print 'num polys', polyData.GetPolys().GetNumberOfCells()
renderer.RemoveActor(actor)
actor = vtk.vtkActor()
filter = vtk.vtkCleanPolyData()
filter.SetInput(polyData)
filter.Update()
mapper = vtk.vtkPolyDataMapper()
mapper.SetInput(filter.GetOutput())
actor.SetMapper(mapper)
renderer.AddActor(actor)
No help either.
Tellingly, though, the number of polys reported by the call to
polyData.GetPolys().GetNumberOfCells() remains constant at 30
suggesting the polyData.DeleteCell doesn't do what I think it does.
JDH
More information about the vtkusers
mailing list