# extract cells by type from unstructured grid

**URL:** https://discourse.paraview.org/t/extract-cells-by-type-from-unstructured-grid/8443
**Category:** ParaView Support
**Created:** [November 20, 2021, 9:23am UTC](https://discourse.paraview.org/t/extract-cells-by-type-from-unstructured-grid/8443 "2021-11-20T09:23:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rob777](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rob777/32/3776_2.png) [@Rob777](https://discourse.paraview.org/u/Rob777)
#### Post date: [November 20, 2021, 9:23am UTC](https://discourse.paraview.org/t/extract-cells-by-type-from-unstructured-grid/8443/1 "2021-11-20T09:23:40Z")

</div>

Hello Everyone,  
I have to extract from an unstructured grid .vtu a region defined by cells type. I have to extract all the wedge cells.  
Doing this by selecting thousands of cell in the spreadsheet view wears me out.  
How can this be done with a programmable filter?  
Thank you

---

<div class="post-metadata">

### Author: ![elynch](https://discourse.paraview.org/user_avatar/discourse.paraview.org/elynch/32/6418_2.png) [@elynch](https://discourse.paraview.org/u/elynch)
#### Post date: [November 20, 2021, 10:49pm UTC](https://discourse.paraview.org/t/extract-cells-by-type-from-unstructured-grid/8443/2 "2021-11-20T22:49:20Z")

</div>

You can use the Count Cell Vertices filter, then Threshold on Vertex Count==6. This won’t work if you have any arbitrary polygon cells that happen to have 6 vertices, but that’s probably an uncommon scenario.

---

<div class="post-metadata">

### Author: ![Rob777](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rob777/32/3776_2.png) [@Rob777](https://discourse.paraview.org/u/Rob777)
#### Post date: [November 22, 2021, 8:32am UTC](https://discourse.paraview.org/t/extract-cells-by-type-from-unstructured-grid/8443/4 "2021-11-22T08:32:55Z")

</div>

Thank you very much for your answer! It works!
