# Extrusion of polygon along line

**URL:** https://discourse.vtk.org/t/extrusion-of-polygon-along-line/14529
**Category:** Support
**Tags:** python
**Created:** [September 5, 2024, 8:49am UTC](https://discourse.vtk.org/t/extrusion-of-polygon-along-line/14529 "2024-09-05T08:49:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sah](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@Sah](https://discourse.vtk.org/u/Sah)
#### Post date: [September 5, 2024, 8:49am UTC](https://discourse.vtk.org/t/extrusion-of-polygon-along-line/14529/1 "2024-09-05T08:49:14Z")

</div>

Hello all,

I’m quite new to vtk and I’m asking for help with extrusion. In particular, I would like to extrude a polygon along a line in the space (most probably a spline). I think this is possible because I saw this query: [[vtkusers] Extrude a 3D object along 3D path ?](https://vtkusers.public.kitware.narkive.com/V9XdOBPR/extrude-a-3d-object-along-3d-path), but since I’m new it’s very hard for me to follow their discussion. Could someone help me?

Please note that I have already the polygon, and it is in the form of

```auto
vtk.vtkPolyData

```

What a normal extrusion would look like, is the following:

```auto
extrudeFilter = vtk.vtkLinearExtrusionFilter()
extrudeFilter.SetInputData(polygonPolyData)
extrudeFilter.SetExtrusionTypeToNormalExtrusion()
#extrudeFilter.SetVector(0.0, 0.0, 1.0) # Extrude along the z-axis
extrudeFilter.SetScaleFactor(10.0) # Set the extrusion length
extrudeFilter.Update()

```

Instead of extruding the polygon along the z-axis, I would like to follow a curve in the space.

Thank you for your help.

---

<div class="post-metadata">

### Author: ![anoopebey](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@anoopebey](https://discourse.vtk.org/u/anoopebey)
#### Post date: [September 13, 2024, 8:45am UTC](https://discourse.vtk.org/t/extrusion-of-polygon-along-line/14529/2 "2024-09-13T08:45:17Z")

</div>

Hi, this tutorial will be useful for you [https://examples.vtk.org/site/Cxx/Visualization/ExtrudePolyDataAlongLine/](https://examples.vtk.org/site/Cxx/Visualization/ExtrudePolyDataAlongLine/)
