# VTKCutter leaves gaps, does not return the every point it intersects

**URL:** https://discourse.vtk.org/t/vtkcutter-leaves-gaps-does-not-return-the-every-point-it-intersects/8986
**Category:** Support
**Created:** [July 21, 2022, 3:49am UTC](https://discourse.vtk.org/t/vtkcutter-leaves-gaps-does-not-return-the-every-point-it-intersects/8986 "2022-07-21T03:49:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ugursasun](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/u/b5ac83/32.png) [@ugursasun](https://discourse.vtk.org/u/ugursasun)
#### Post date: [July 21, 2022, 3:49am UTC](https://discourse.vtk.org/t/vtkcutter-leaves-gaps-does-not-return-the-every-point-it-intersects/8986/1 "2022-07-21T03:49:43Z")

</div>

I have an STL file, I’m working on it a while to collect xyz data through the line drawn on its surface(red line).  
 ![Screenshot from 2022-07-21 05-34-04](https://discourse.vtk.org/uploads/default/original/2X/7/713e5c71fd326ddd2d33000c9bfff5ebd7d3a1c7.png)

I wrote a function using VTKCutter and believed that the class was collecting each point its implicit function(plane in this case) intersects. But it turns out, it leaves many points not included and I checked there are many more using `polydata.GetPoints()` with little manipulation. Problems like that had been encountered for sure(for example [in here](https://public.kitware.com/pipermail/vtkusers/2014-January/082622.html)) but though searched a lot, I could not find the solution that uses solely vtkCutter(I know I can use other methods like vtkBox and clipping but this way I prefer). I believe it is simple tolerance problem but in class’ [reference page](https://vtk.org/doc/nightly/html/classvtkCutter.html) there is no method I can adjust with it. I appreciate any help. Thank you.

```auto
def set_cutter(self):
       
       global OutLinePts
       plane = vtkPlane()
       plane.SetOrigin(self.center)
       plane.SetNormal(self.normal)
       polydata = copydeep(self.actorMain)
       cutter = vtkCutter()#cutter class extract the data that intersects with the given function
       cutter.SetCutFunction(plane)
       cutter.SetInputData(polydata)
       cutter.Update()

       cutterMapper = vtkPolyDataMapper()
       cutterMapper.SetInputConnection(cutter.GetOutputPort())                
       actor_cutter = vtkActor()
       actor_cutter.SetMapper(cutterMapper)
       actor_cutter.GetProperty().SetColor(colors.GetColor3d('red'))

```

\*The red line is the actor of vtkCutter with function plane.
