# ExtractCellsUsingPoints giving unusual output

**URL:** https://discourse.vtk.org/t/extractcellsusingpoints-giving-unusual-output/1832
**Category:** Support
**Created:** [September 26, 2019, 4:40pm UTC](https://discourse.vtk.org/t/extractcellsusingpoints-giving-unusual-output/1832 "2019-09-26T16:40:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![srbn.ghosh99](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/cdc98d/32.png) [@srbn.ghosh99](https://discourse.vtk.org/u/srbn.ghosh99)
#### Post date: [September 26, 2019, 4:40pm UTC](https://discourse.vtk.org/t/extractcellsusingpoints-giving-unusual-output/1832/1 "2019-09-26T16:40:19Z")

</div>

Hi,

I want to split one triangular mesh into two parts based on the material information which is already included in the mesh.

The data is looking like this and it should be split into two parts the blue one and the other one.  
I am using this example.  
[https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ExtractCellsUsingPoints/#download-and-build-extractcellsusingpoints](https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ExtractCellsUsingPoints/#download-and-build-extractcellsusingpoints)

But every time I am getting a wrong output. I am not understanding what caused this problem. Could you please help me.

I am attaching my input file here my source code and input file.

 ![33](https://discourse.vtk.org/uploads/default/original/1X/cd188cf215e08e12de4ffda103d031af255df99b.png) ![34](https://discourse.vtk.org/uploads/default/original/1X/4583c4a26bc79a8742262feeeb4709417f0697e3.png)

[https://drive.google.com/open?id=1osYC3GqOq3-RNFYTtJ8MoxJbtxxd2VBp](https://drive.google.com/open?id=1osYC3GqOq3-RNFYTtJ8MoxJbtxxd2VBp)

Regards
