How to extrude an extrusion using VTK python ..how to convert the first extrusion to something useable in vtkLinearExtrusionFilter()?

Question:

Funny question, and I am really new to this (please dont assume i know anything lol)

But I have taken a set of points and converted to a polyline (polydata) and then extruded this polydata using vtkLinearExtrusionFilter into a surface.

Now I would like to extrude that surface into a 3d solid, how can I extrude the 1st extrusion? How to properly save 1st extrusion as vtkDataObject (see error below)

TypeError:

SetInputData argument 1: method requires a vtkDataObject, a
vtkLinearExtrusionFilter was provided.

Asked By: Derek Eden

||

Answers:

You need to take the output of the filter, and not the filter itself. This output is a vtk data object.

first_extrusion = vtkLinearExtrusionFilter()
# set parameters ....
first_extrusion.Update()

second_extrusion = vtkLinearExtrusionFilter()
second_extrusion.SetInputData( first_extrusion.GetOutput() )
# set other parameters ...
Answered By: Bertrand Gazanion
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.