# extract the outer surface of the tube and show it as a rectangular surface

**URL:** https://discourse.paraview.org/t/extract-the-outer-surface-of-the-tube-and-show-it-as-a-rectangular-surface/10324
**Category:** ParaView Support
**Tags:** vtk
**Created:** [September 15, 2022, 11:32am UTC](https://discourse.paraview.org/t/extract-the-outer-surface-of-the-tube-and-show-it-as-a-rectangular-surface/10324 "2022-09-15T11:32:14Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![roland](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@roland](https://discourse.paraview.org/u/roland)
#### Post date: [September 22, 2022, 10:41am UTC](https://discourse.paraview.org/t/extract-the-outer-surface-of-the-tube-and-show-it-as-a-rectangular-surface/10324/10 "2022-09-22T10:41:12Z")

</div>

Hi @mohsen.rock,

In this post I explain my steps whenever I need to unwrap cylinder. Maybe it is of use to you too.

> [@Unwrapping a cylinder](https://discourse.paraview.org/t/unwrapping-a-cylinder/8731/2):
>
> Can it be that your surface is folded back on it self because you use an atan function instead of atan2? I don’t know if atan2 is available now, but it wasn’t before, so I used to calculate it myself with a Calculator filter: if(coordsX\>0,atan(coordsY/coordsX), if(coordsX\<0, if(coordsY\<0,atan(coordsY/coordsX)-4\*atan(1),atan(coordsY/coordsX) +4 \*atan(1)), if(coordsY\>0, 2 \*atan(1), if(coordsY\<0, -2 \*atan(1),0)))) Then apply a [-pi, pi] threshold on the resulting angle (which I called theta). …

Kind regards,  
Roland

---

_[View the full topic](https://discourse.paraview.org/t/extract-the-outer-surface-of-the-tube-and-show-it-as-a-rectangular-surface/10324)._
