# Export linear extrusion as .ply file

**URL:** https://discourse.vtk.org/t/export-linear-extrusion-as-ply-file/2092
**Category:** Support
**Created:** [November 13, 2019, 2:50pm UTC](https://discourse.vtk.org/t/export-linear-extrusion-as-ply-file/2092 "2019-11-13T14:50:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Mskovmand](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@Mskovmand](https://discourse.vtk.org/u/Mskovmand)
#### Post date: [November 13, 2019, 2:50pm UTC](https://discourse.vtk.org/t/export-linear-extrusion-as-ply-file/2092/1 "2019-11-13T14:50:54Z")

</div>

Hello,

I’ve had great luck exporting colored glyphs as .ply files for use in other software.

Now I’m trying to export some “cylinders” which are created using a linear extrusion, more specifically, like this:

```
disk = vtk.vtkDiskSource()
disk.SetCircumferentialResolution(128)
disk.SetRadialResolution(1)
disk.SetOuterRadius(2)
disk.SetInnerRadius(1)
pipe = vtk.vtkLinearExtrusionFilter()
pipe.SetInputConnection(disk.GetOutputPort())
pipe.SetExtrusionTypeToNormalExtrusion()
pipe.SetVector(0, 0, 1)
pipe.SetScaleFactor(5)
pipe.Update()

```

However, doing this, and writing it to a .ply file

```
writer = vtk.vtkPLYWriter()
writer.SetFileName('pipe.ply')
writer.SetInputConnection(pipe.GetOutputPort())
writer.Write()

```

only leaves me with 2 disks, one upper and one lower, and not the “pipe” that I’m seeing if I add this to a render window.

I tried the same thing, using a cylinder instead of my extruded disk, and here I had success.

Does anyone know what I am missing?

---

<div class="post-metadata">

### Author: ![Mskovmand](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@Mskovmand](https://discourse.vtk.org/u/Mskovmand)
#### Post date: [November 13, 2019, 3:04pm UTC](https://discourse.vtk.org/t/export-linear-extrusion-as-ply-file/2092/2 "2019-11-13T15:04:40Z")

</div>

I’m clearly an idiot here, delete if you want.

The answer:

Add a triangle filter.

```
fil = vtk.vtkTriangleFilter()
fil.SetInputConnection(pipe.GetOutputPort())

```

and use this in the writer and it works fine.
