[vtkusers] Bug with vtkRotationalExtrusionFilter

Sebastien Auclair sxa at fluent.com
Mon Jun 16 14:53:40 EDT 2003


Greetings,

We try to use vtkRotationalExtrusionFilter to generate a solid cylinder
based on a 2D polyline.
The output is not completly 360 degree of rotational extrusion.
I attached an image to help illustrate the bug.

The main part of the code follows :
###################################################
 vtkPoints* points = vtkPoints::New();
 points->SetNumberOfPoints (4);
 points->SetPoint( 0, m_ibaseRadius, 0.0, 0.0);
 points->SetPoint( 1, m_baseRadius, 0.0, 0.0);
 points->SetPoint( 2, m_topRadius, 0.0, m_height);
 points->SetPoint( 3, m_itopRadius, 0.0,m_height);


 vtkCellArray* lines = vtkCellArray::New

  lines->InsertNextCell( 5);
  lines->InsertCellPoint( 0);
  lines->InsertCellPoint( 1);
  lines->InsertCellPoint( 2);
  lines->InsertCellPoint( 3);
  lines->InsertCellPoint( 0);



 vtkPolyData* profile = vtkPolyData::New();
 profile->SetPoints( points);
 profile->SetLines (lines);
 profile->Update();

 vtkRotationalExtrusionFilter* extrude =
vtkRotationalExtrusionFilter::New();
 extrude->SetInput( profile);
 extrude->SetResolution (36);
 extrude->SetAngle(360);
 extrude->Update();
############################################################
An outline actor is also created to display the edges of the solid.

Thanks for any help !

____________________________________
Seb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cylinder.jpg
Type: image/jpeg
Size: 35847 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030616/2b8acd28/attachment.jpg>


More information about the vtkusers mailing list