# VTK clip: How to clip with cell as the minimum unit

**URL:** https://discourse.vtk.org/t/vtk-clip-how-to-clip-with-cell-as-the-minimum-unit/7166
**Category:** Support
**Created:** [November 13, 2021, 9:58am UTC](https://discourse.vtk.org/t/vtk-clip-how-to-clip-with-cell-as-the-minimum-unit/7166 "2021-11-13T09:58:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rockydut](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rockydut/32/4261_2.png) [@rockydut](https://discourse.vtk.org/u/rockydut)
#### Post date: [November 13, 2021, 9:58am UTC](https://discourse.vtk.org/t/vtk-clip-how-to-clip-with-cell-as-the-minimum-unit/7166/1 "2021-11-13T09:58:54Z")

</div>

I want to clip the model (for finite element simulation). However, the existing clipping methods triangulate the cell.  
In other word, for a cell, it is either cut or not cut, rather than cutting a part of a cell and triangulating it.

---

<div class="post-metadata">

### Author: ![rockydut](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rockydut/32/4261_2.png) [@rockydut](https://discourse.vtk.org/u/rockydut)
#### Post date: [November 14, 2021, 4:58am UTC](https://discourse.vtk.org/t/vtk-clip-how-to-clip-with-cell-as-the-minimum-unit/7166/2 "2021-11-14T04:58:47Z")

</div>

![image](https://discourse.vtk.org/uploads/default/original/2X/7/70e33c6cb0313e645cb76dfeedcff824a1f11d5c.png)  
just like this, the cells will not be cutted.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [November 15, 2021, 2:30pm UTC](https://discourse.vtk.org/t/vtk-clip-how-to-clip-with-cell-as-the-minimum-unit/7166/3 "2021-11-15T14:30:00Z")

</div>

`vtkExtractGeometry`. It is not obvious from the name that this filter would do what you are requesting.

Here’s an example: [https://kitware.github.io/vtk-examples/site/Python/VisualizationAlgorithms/ExtractData/](https://kitware.github.io/vtk-examples/site/Python/VisualizationAlgorithms/ExtractData/)

Note that the example is extracting whole cells within a spherical region. You probably want to extract cells on one side of a plane based on your example image. That’s possible - just change the `vtkImplicitFunction` you are passing to `vtkExtractGeometry`.

---

<div class="post-metadata">

### Author: ![rockydut](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rockydut/32/4261_2.png) [@rockydut](https://discourse.vtk.org/u/rockydut)
#### Post date: [November 24, 2021, 12:54pm UTC](https://discourse.vtk.org/t/vtk-clip-how-to-clip-with-cell-as-the-minimum-unit/7166/4 "2021-11-24T12:54:34Z")

</div>

@cory.quammen Thank you, it’s just what I want.
