# multiple polylines after vtkStripper

**URL:** https://discourse.vtk.org/t/multiple-polylines-after-vtkstripper/1078
**Category:** Support
**Created:** [June 4, 2019, 10:23am UTC](https://discourse.vtk.org/t/multiple-polylines-after-vtkstripper/1078 "2019-06-04T10:23:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sbucc](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@sbucc](https://discourse.vtk.org/u/sbucc)
#### Post date: [June 4, 2019, 10:23am UTC](https://discourse.vtk.org/t/multiple-polylines-after-vtkstripper/1078/1 "2019-06-04T10:23:08Z")

</div>

I’m using vtkCutter followed by vtkStripper to get the intersection of a mesh with a plane, and it always returns multiple segments. I can easily ignore the very tiny ones (1-3 points), but sometimes it produces longer polylines, like in this image:  
 ![stripper](https://discourse.vtk.org/uploads/default/original/1X/e175f13dfc59c0ad2481e9b02ad6e93ad9673b98.png)  
The blue and green segments are clearly contiguous (in fact there are bigger gaps in the green one), so why isn’t the stripper returning a single segment? Are there any settings that I can change in vtkStripper? And if the issue is the mesh, is there any preprocessing that I could apply to avoid the problem?  
If it is any help, the green segment is in an area where I have applied vtkClipClosedSurface.

---

<div class="post-metadata">

### Author: ![sbucc](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@sbucc](https://discourse.vtk.org/u/sbucc)
#### Post date: [June 4, 2019, 6:22pm UTC](https://discourse.vtk.org/t/multiple-polylines-after-vtkstripper/1078/2 "2019-06-04T18:22:00Z")

</div>

I upgraded to vtk 8.9 (from 6.2, which is the version that ubuntu 16.04 installs), so now there is an option JoinContiguousSegments, but even with it enabled, I still get 2 segments.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [June 10, 2019, 7:28pm UTC](https://discourse.vtk.org/t/multiple-polylines-after-vtkstripper/1078/3 "2019-06-10T19:28:40Z")

</div>

Increasing [MaximumLength](https://vtk.org/doc/nightly/html/classvtkStripper.html#a526aaeb5167f434063a37283a7e1f38b) may help, but for correct intersection computation (especially if you need to know what is inside and outside) you probably need to replace vtkStripper by [vtkContourTriangulator](https://vtk.org/doc/nightly/html/classvtkContourTriangulator.html).
