# Obtaining the curve of intersection between two polydata

**URL:** <https://discourse.slicer.org/t/obtaining-the-curve-of-intersection-between-two-polydata/14785>\
**Category:** Development\
**Created:** [November 26, 2020, 3:27pm UTC](https://discourse.slicer.org/t/obtaining-the-curve-of-intersection-between-two-polydata/14785 "2020-11-26T15:27:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anish\_Basnet](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anish_basnet/32/7988_2.png) [@Anish\_Basnet](https://discourse.slicer.org/u/Anish_Basnet)\
**Post date:** [November 26, 2020, 3:27pm UTC](https://discourse.slicer.org/t/obtaining-the-curve-of-intersection-between-two-polydata/14785/1 "2020-11-26T15:27:10Z")

</div>

Hello everyone,  
Is there a function in VTK that could determine the curve of intersection between two polydatas?

I’d also like to obtain the points that lie in the curve(indicated by the red color in the figure below). Is it somehow possible?

 ![1024px-Is-spherecyl5-s.svg](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/a/da4f2c671c81b60f1671cb8ad56a8144dbc5819c.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 26, 2020, 7:32pm UTC](https://discourse.slicer.org/t/obtaining-the-curve-of-intersection-between-two-polydata/14785/2 "2020-11-26T19:32:44Z")

</div>

Slicer is based on [VTK](http://www.vtk.org/) and all VTK features are available for Slicer modules and in the Python console. VTK compute intersection of surfaces, for example using [vtkCutter](https://vtk.org/doc/nightly/html/classvtkCutter.html). The cutting surface must be represented as an implicit surface, which a sphere or cylinder already is. If you want to cut with a surface defined by a surface mesh then you can probably convert it to an implicit function - check out the [VTK textbook](https://www.kitware.com/products/books/VTKTextbook.pdf) and [VTK examples](https://lorensen.github.io/VTKExamples/site/), and if you cannot figure it out then ask on the [VTK forum](https://discourse.vtk.org/).
