<br><font size=2 face="sans-serif"> The Extrusion cann't capped ,
I don't know why! Could anybody help me?</font>
<br>
<br><font size=2 face="sans-serif"> //Create Cylinder Section</font>
<br><font size=2 face="sans-serif"> vtkPoints *points=vtkPoints::New();</font>
<br><font size=2 face="sans-serif"> double rDir = -1.; //
Ellipsoidal Head direction</font>
<br><font size=2 face="sans-serif"> double rDo, rDi, rH;</font>
<br><font size=2 face="sans-serif"> rDi = 40.;</font>
<br>
<br><font size=2 face="sans-serif"> points->InsertPoint(0,
0., 0, 0);</font>
<br><font size=2 face="sans-serif"> points->InsertPoint(1,
0, 100, 0);</font>
<br><font size=2 face="sans-serif"> points->InsertPoint(2,
200, 100, 0);</font>
<br><font size=2 face="sans-serif"> points->InsertPoint(3,
200, 0, 0);</font>
<br><font size=2 face="sans-serif"> points->InsertPoint(4,
0, 0, 0);</font>
<br><font size=2 face="sans-serif"> int nPoints=5;</font>
<br><font size=2 face="sans-serif"> vtkCellArray *poly=vtkCellArray::New();</font>
<br><font size=2 face="sans-serif"> poly->InsertNextCell(nPoints);</font>
<br><font size=2 face="sans-serif"> for (int i=0; i<= nPoints;
i++)</font>
<br><font size=2 face="sans-serif"> {</font>
<br><font size=2 face="sans-serif"> poly->InsertCellPoint(i);</font>
<br><font size=2 face="sans-serif"> }</font>
<br><font size=2 face="sans-serif"> // Construct profile</font>
<br><font size=2 face="sans-serif"> vtkPolyData *profile=vtkPolyData::New();</font>
<br><font size=2 face="sans-serif"> //profile->SetPolys(poly);</font>
<br><font size=2 face="sans-serif"> profile->SetLines(poly);</font>
<br><font size=2 face="sans-serif"> profile->SetPoints(points);</font>
<br>
<br><font size=2 face="sans-serif"> // Extrude profile</font>
<br><font size=2 face="sans-serif"> vtkLinearExtrusionFilter *extrude
= vtkLinearExtrusionFilter::New();</font>
<br><font size=2 face="sans-serif"> extrude->SetCapping(1);
</font>
<br>
<br><font size=2 face="sans-serif">// The Extrusion cann't capped , I don't
know why!</font>
<br>
<br>
<br><font size=2 face="sans-serif"> extrude->SetScaleFactor(10);</font>
<br><font size=2 face="sans-serif"> extrude->SetExtrusionTypeToNormalExtrusion();</font>
<br><font size=2 face="sans-serif"> extrude->SetInput(profile);</font>
<br>
<br>
<br>
<br>
<br><font size=2 face="sans-serif"> vtkPolyDataMapper *map=vtkPolyDataMapper::New();</font>
<br><font size=2 face="sans-serif"> map->SetInput(extrude->GetOutput());</font>
<br>
<br><font size=2 face="sans-serif"> vtkActor *pPad = vtkActor::New();</font>
<br><font size=2 face="sans-serif"> pPad->SetMapper(map);</font>
<br><font size=2 face="sans-serif"> pPad->GetProperty()->SetColor(0,0,1);</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif"> // Render object in current render
window</font>
<br><font size=2 face="sans-serif"> vtkWindow1->GetRenderer()->AddActor(pPad);</font>
<br>
<br><font size=2 face="sans-serif"> //Delete object does not used
anymore</font>
<br><font size=2 face="sans-serif"> pPad->Delete();</font>
<br><font size=2 face="sans-serif"> map->Delete();</font>
<br><font size=2 face="sans-serif"> extrude->Delete();</font>
<br><font size=2 face="sans-serif"> vtkWindow1->GetRenderer()->ResetCamera();</font>
<br><font size=2 face="sans-serif"> vtkWindow1->Invalidate();</font>
<br>