# Creating customized Clip filter using VTKPythonAlgorithmBase plugin on MultiBlockDataSet

**URL:** https://discourse.paraview.org/t/creating-customized-clip-filter-using-vtkpythonalgorithmbase-plugin-on-multiblockdataset/7908
**Category:** Development
**Created:** [September 1, 2021, 8:12pm UTC](https://discourse.paraview.org/t/creating-customized-clip-filter-using-vtkpythonalgorithmbase-plugin-on-multiblockdataset/7908 "2021-09-01T20:12:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![csniker](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c4cdca/32.png) [@csniker](https://discourse.paraview.org/u/csniker)
#### Post date: [September 1, 2021, 8:12pm UTC](https://discourse.paraview.org/t/creating-customized-clip-filter-using-vtkpythonalgorithmbase-plugin-on-multiblockdataset/7908/1 "2021-09-01T20:12:34Z")

</div>

My ultimate goal is to develop a Clip filter wherein the user can specify three node IDs, and a Clip will be generated from the plane defined by the coordinate locations of those three nodes.

So far I have succeeded in the “lookup” portion of the plugin (EDIT: maybe not actually, this is another topic to be filed), and I can input three node IDs and return the coordinates of those nodes. However, now I face the task of how to actually process the Clip.

For the generation of a Clip for a single UnstructuredGrid dataset, I believe the example here: `https://kitware.github.io/vtk-examples/site/Python/UnstructuredGrid/ClipUnstructuredGridWithPlane2/` will give me what I need (although I am not sure of that yet, either).

But my data is a MultiBlockDataSet comprised of many UnstructuredGrid blocks. So what is the best way to handle this? Do I iterate through the UnstructuredGrid blocks, applying the clip to each? And would I then have to reassemble these clipped blocks into a MultiBlockDataSet to get my output object?

I think there is an answer somewhere in this: `https://github.com/Kitware/ParaView/blob/master/VTKExtensions/FiltersGeneral/vtkPVClipDataSet.cxx` but I am not C++ fluent and I’m having a hard time figuring out how this would map back to a Python VTK application.

Any help would be appreciated! I think my biggest roadblock right now is how to handle the multi-block structure, but there may be other things I am doing wrongly as well.
