# Extract outside surface

**URL:** https://discourse.vtk.org/t/extract-outside-surface/3450
**Category:** Support
**Created:** [June 2, 2020, 12:47pm UTC](https://discourse.vtk.org/t/extract-outside-surface/3450 "2020-06-02T12:47:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![pourarab](https://discourse.vtk.org/user_avatar/discourse.vtk.org/pourarab/32/1720_2.png) [@pourarab](https://discourse.vtk.org/u/pourarab)
#### Post date: [June 2, 2020, 12:47pm UTC](https://discourse.vtk.org/t/extract-outside-surface/3450/1 "2020-06-02T12:47:58Z")

</div>

Hello,

I’m trying to create a tube around a line. I used vtkTubeFilter to do this, but when there is a closed angle the result will be like this :

 ![Screenshot (8)](https://discourse.vtk.org/uploads/default/original/2X/8/8c4e21c473d3301557a6d63b2107f5b905a236a0.png)

I want to keep only the outside surface of this tube. How can i remove the inner parts ?

---

<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 2, 2020, 6:05pm UTC](https://discourse.vtk.org/t/extract-outside-surface/3450/2 "2020-06-02T18:05:36Z")

</div>

A self-intersecting mesh is invalid and I don’t think there is a way to fix it.

You either need to smooth the line (for example, using spline interpolation) and/or reduce the radius; or use a completely different approach, such as implicit modelling (see example [here](https://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ImplicitModeller)).

---

<div class="post-metadata">

### Author: ![pourarab](https://discourse.vtk.org/user_avatar/discourse.vtk.org/pourarab/32/1720_2.png) [@pourarab](https://discourse.vtk.org/u/pourarab)
#### Post date: [June 3, 2020, 6:50am UTC](https://discourse.vtk.org/t/extract-outside-surface/3450/3 "2020-06-03T06:50:58Z")

</div>

Thank you for answer.

I’ll try the implicit modelling.

---

<div class="post-metadata">

### Author: ![\_11](https://discourse.vtk.org/user_avatar/discourse.vtk.org/_11/32/4710_2.png) [@\_11](https://discourse.vtk.org/u/_11)
#### Post date: [February 17, 2022, 12:19pm UTC](https://discourse.vtk.org/t/extract-outside-surface/3450/4 "2022-02-17T12:19:25Z")

</div>

Hi, sorry to disturb you after 2 years. But have you figured out a new method?  
Thanks a lot in advance!

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [February 17, 2022, 2:59pm UTC](https://discourse.vtk.org/t/extract-outside-surface/3450/5 "2022-02-17T14:59:47Z")

</div>

As Andras suggested, implicit modelling will work (but slow). I’m guessing if you are willing to get into the rendering guts, you could use a shader, maybe someone else has done something similar.
