<html><body>
<p>I want to generate a plate with five or eight edge by using vtkLinearExtrusionFilter. First I gernater vtkPoints then vtkCellArray , vtkPolyData<br>
But can't work. <br>
<br>
Can anybody give me a example? No matter C++ code or tcl code.<br>
<br>
<br>
<br>
package require vtk<br>
package require vtkinteraction<br>
package require vtktesting<br>
<br>
# Define a rotational symmetric object using the rotational extrusion filter<br>
<br>
# create bottle profile<br>
#<br>
vtkPoints points                                      <br>
<br>
#<br>
#<br>
#-----&gt; Point cann't exceed 4<br>
#<br>
<br>
<br>
    points InsertPoint 0 0.01 0.0 0.0<br>
    points InsertPoint 1 1.5 0.0 0.0<br>
    points InsertPoint 2 1.5 0.0 3.5<br>
    points InsertPoint 3 1.25 0.0 3.75<br>
    points InsertPoint 4 0.75 0.0 4.00<br>
    points InsertPoint 5 0.6 0.0 4.35<br>
    points InsertPoint 6 0.7 0.0 4.65<br>
    points InsertPoint 7 1.0 0.0 4.75<br>
    points InsertPoint 8 1.0 0.0 5.0<br>
    points InsertPoint 9 0.2 0.0 5.0<br>
vtkCellArray lines<br>
    lines InsertNextCell 10;#number of points<br>
    lines InsertCellPoint 0<br>
    lines InsertCellPoint 1<br>
    lines InsertCellPoint 2<br>
    lines InsertCellPoint 3<br>
    lines InsertCellPoint 4<br>
    lines InsertCellPoint 5<br>
    lines InsertCellPoint 6<br>
    lines InsertCellPoint 7<br>
    lines InsertCellPoint 8<br>
    lines InsertCellPoint 9<br>
vtkPolyData profile<br>
    profile SetPoints points<br>
    profile SetLines lines<br>
<br>
# extrude profile to make bottle<br>
#<br>
vtkLinearExtrusionFilter extrude                     <br>
# ------&gt; Using vtkLinearExtrusionFilter will work only when vtkPoints set to 4<br>
    extrude SetInput profile<br>
    extrude SetSca...<br>
    <br>
vtkPolyDataMapper map<br>
    map SetInput [extrude GetOutput]<br>
<br>
vtkActor bottle<br>
    bottle SetMapper map<br>
    [bottle GetProperty] SetColor 0.3800 0.7000 0.1600<br>
<br>
# Create the RenderWindow, Renderer and both Actors<br>
#<br>
vtkRenderer ren1<br>
vtkRenderWindow renWin<br>
    renWin AddRenderer ren1<br>
vtkRenderWindowInteractor iren<br>
    iren SetRenderWindow renWin<br>
<br>
# Add the actors to the renderer, set the background and size<br>
#<br>
ren1 AddActor bottle<br>
ren1 SetBackground 1 1 1<br>
<br>
renWin SetSize 500 500<br>
renWin Render<br>
<br>
# render the image<br>
#<br>
iren AddObserver UserEvent {wm deiconify .vtkInteract}<br>
iren Initialize<br>
<br>
# prevent the tk window from showing up then start the event loop<br>
wm withdraw .<br>
<br>
</body></html>