# Get intersection of PolyData line and a plane

**URL:** https://discourse.vtk.org/t/get-intersection-of-polydata-line-and-a-plane/3894
**Category:** Support
**Created:** [July 31, 2020, 6:48pm UTC](https://discourse.vtk.org/t/get-intersection-of-polydata-line-and-a-plane/3894 "2020-07-31T18:48:16Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jrwrigh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jrwrigh/32/2160_2.png) [@jrwrigh](https://discourse.vtk.org/u/jrwrigh)
#### Post date: [August 1, 2020, 2:13pm UTC](https://discourse.vtk.org/t/get-intersection-of-polydata-line-and-a-plane/3894/3 "2020-08-01T14:13:24Z")

</div>

Sorry for the long delay, here’s approximately the code I was using:

```python
vplane = vtk.vtkPlane()
vplane.SetOrigin((-0.4, 0, 0))
vplane.SetNormal((1,0,0))

cutter = vtk.vtkCutter()
cutter.SetCutFunction(vplane)
cutter.SetInputData(walledgePolySample)
cutter.Update()
cutterout = cutter.GetOutputDataObject(0) 

type(cutterout) # vtkCommonDataModelPython.vtkPolyData
cutterout.GetNumberOfVerts() # 0

```

Note that the `walledgePolySample` is a line planar in XY and goes from x={-0.54, -0.31}, y={0,0}.

---

_[View the full topic](https://discourse.vtk.org/t/get-intersection-of-polydata-line-and-a-plane/3894)._
