[vtkusers] Add a plane to a vtkPolyata

Francesco Ferro le_maitre at bluewin.ch
Wed Jan 27 05:15:34 EST 2010


Hello everybody,

I would like to know how can I add a plane to a polydata ? because ehre 
what I'm trying to do:

I have a PolyData that I clip using vtkClipPolyData (clipping function = 
ONE plane). I manage to clip it and to display the clipped part. 
Unfortunately this clipped polydata
has a missing plane... (the one who has been used to clip..) So as I 
result I don't have a close polydata and.. it make wrong the calculation 
that I'm doing after..

So here what I did to create the missing plane: I use vtkCutter but 
vtkCutter creates lines where the cut function intersects the polydata. 
So I will use
vtkStrippers then to puts them together into polylines. I then pull a 
trick and define polygons using the closed line segements that the 
stripper created..

vtkPolyData * cutPoly = vtkPolyData::New();
cutPoly->SetPoints(cutStrips->GetOutput()->GetPoints());
cutPoly->SetPolys(cutStrips->GetOutput()->GetLines());

so cutPoly is my missing plane.. Who can Add that to my clipped polyData ?

Regards,
Francesco





More information about the vtkusers mailing list