I have some basic code that creates a 3D text, applies a linear extrusion filter, and then displays it in a viewport. This works well, but now I would like to output the result of the extrusion to an STL file using vtkStlWriter. I am extremely new to VTK (just got it to compile two hours ago), so I believe I&#39;m just missing something really basic. Here is the relevant code:<br>

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    ...<br><br>    // Create vector text</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    vtkVectorText* vecText = vtkVectorText::New();</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    vecText-&gt;SetText(&quot;Text!&quot;);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    // Apply linear extrusion </span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    vtkLinearExtrusionFilter* extrude = vtkLinearExtrusionFilter::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    extrude-&gt;SetInputConnection( vecText-&gt;GetOutputPort());</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    extrude-&gt;SetExtrusionTypeToNormalExtrusion();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    extrude-&gt;SetVector(0, 0, 1 );</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    extrude-&gt;SetScaleFactor (0.5);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    // output the mesh to a PolyDataMapper and then to an Actor</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    vtkPolyDataMapper* txtMapper = vtkPolyDataMapper::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    txtMapper-&gt;SetInputConnection( extrude-&gt;GetOutputPort());</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    vtkActor* txtActor = vtkActor::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    txtActor-&gt;SetMapper(txtMapper);</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    // add it to the renderer</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    ren-&gt;AddActor(txtActor);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    // attempt to write an STL file</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    std::string outputFilename = &quot;test.stl&quot;;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    vtkSmartPointer&lt;vtkPolyData&gt; data = vtkSmartPointer&lt;vtkPolyData&gt;::New();</span><br>

<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    <b>// data = extrude-&gt;getOutput();</b> // this line causes an error: <b>&#39;class vtkLinearExtrusionFilter&#39; has no member named &#39;getOutput&#39;</b></span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    vtkSmartPointer&lt;vtkSTLWriter&gt; stlWriter = vtkSmartPointer&lt;vtkSTLWriter&gt;::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    stlWriter-&gt;SetFileName(outputFilename.c_str());</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    <br>    <b>stlWriter-&gt;SetInput(data);</b> // passing <b>extrude-&gt;getOutput()</b> here seems to work, but doesn&#39;t send the walls of the extrusion</span> <br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    stlWriter-&gt;Write();</span><br><br><span style="font-family: courier new,monospace;">    ...</span><br style="font-family: courier new,monospace;"><br>When I try to run: <br>

<br><span style="font-family: courier new,monospace;">    stlWriter-&gt;setInput(extrude-&gt;getOutput())</span>;<br><br>it just outputs the text twice, separated by the thickness of the extrusion but without the walls. Does that make sense. Let me know if I&#39;m missing something or if it is not possible. Thanks for the help, and I can certainly send the whole code if someone wants to run it, but I think my problem is simple enough that someone can just glance at the code and see what&#39;s wrong. Thanks for the help in advance,<br>

<br>Dave<br>