# vtkPVClipDataSet not working in new PV versions

**URL:** https://discourse.paraview.org/t/vtkpvclipdataset-not-working-in-new-pv-versions/9252
**Category:** ParaView Support
**Tags:** vtk
**Created:** [March 22, 2022, 2:54pm UTC](https://discourse.paraview.org/t/vtkpvclipdataset-not-working-in-new-pv-versions/9252 "2022-03-22T14:54:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MiguelAngelAGUIRRE](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miguelangelaguirre/32/2986_2.png) [@MiguelAngelAGUIRRE](https://discourse.paraview.org/u/MiguelAngelAGUIRRE)
#### Post date: [March 22, 2022, 2:54pm UTC](https://discourse.paraview.org/t/vtkpvclipdataset-not-working-in-new-pv-versions/9252/1 "2022-03-22T14:54:38Z")

</div>

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

```auto
### 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())

```

---

<div class="post-metadata">

### Author: ![MiguelAngelAGUIRRE](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miguelangelaguirre/32/2986_2.png) [@MiguelAngelAGUIRRE](https://discourse.paraview.org/u/MiguelAngelAGUIRRE)
#### Post date: [March 23, 2022, 1:15pm UTC](https://discourse.paraview.org/t/vtkpvclipdataset-not-working-in-new-pv-versions/9252/2 "2022-03-23T13:15:30Z")

</div>

Hello,

I found the solution: use **vtkTableBasedClipDataSet** instead of vtkPVClipDataSet. Both are the fastest methods but vtkTableBasedClipDataSet is _available in all Paraview versions_. I left below a comparison of VTK filters clipping speed:

# COMPARISON OF VTK-BASED CLIP METHODS:

vtkTableBasedClipDataSet() → It is the faster. Works in all ParaView versions  
vtkClipPolyData() → 400 times slower than vtkTableBasedClipDataSet  
vtkPVClipDataSet() → vtkPVClipDataSet is as fast than vtkTableBasedClipDataSet but only works in ParaView 5.5  
vtkClipDataSet() → 400 times slower than vtkTableBasedClipDataSet
