Hello,
I have been using vtkPVClipDataSet in ParaView 5.5 but it simply does not work in PV5.7 or even PV5.10. The error that I get is the following (see the code below for testing in a programmable filter applied to a sphere source):
AttributeError: module ‘vtkmodules.all’ has no attribute 'vtkPVClipDataSet’
• How can I solve this problem ?
• It seems that this vtk tool it is no longer available. It has been deprecated?
• The VTK tool that is still working for PV 5.10 is vtkClipDataSet but this is FAR SLOWER than the vtkPVClipDataSet (especially while dealing with large datasets). There is a faster alternative to vtkClipDataSet ?
Thanks for your time !
Miguel
### CODE FOR PROGRAMMABLE FILTER ###
### BASIC CLIP OUTPUT TYPE --> vtkUnstructuredGrid !!!! ###
import vtk.vtkFiltersParallel
# Create survey plane:
plane = vtk.vtkPlane()
plane.SetOrigin(0,0,0)
plane.SetNormal(1, 0, 0)
# Creates a clip of the input with the survey plane:
cutter = vtk.vtkPVClipDataSet() # vtkPVClipDataSet is far faster than vtkClipDataSet
#cutter = vtk.vtkClipDataSet()
cutter.SetClipFunction(plane)
cutter.SetInputData(self.GetInputDataObject(0, 0))
cutter.InsideOutOn()
cutter.Update()
self.GetOutput().ShallowCopy(cutter.GetOutput())