[vtkusers] Cuting polydata
wydesenej
wydesenej at gmail.com
Fri Apr 11 08:22:55 EDT 2014
Hello,
iam trying to cut plygonal data but result is not good.
Here is image of result of cutting multiple polydatas:
http://i58.tinypic.com/2lcqlwl.png
Why i have multicolored polygons even if i set SetColor property to actor?
I need to have only one color actor for each polydata cut...
Please help!
My code of cutting polydata:
vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New();
cutter->SetInputData(polyData);
cutter->SetCutFunction(plane);
vtkSmartPointer<vtkStripper> stripper = vtkSmartPointer<vtkStripper>::New();
stripper->SetInputConnection(cutter->GetOutputPort());
vtkSmartPointer<vtkPolyDataMapper> cutMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
cutMapper->SetInputConnection( stripper->GetOutputPort() );
cutMapper->ScalarVisibilityOff();
vtkSmartPointer<vtkActor> cutActor = vtkSmartPointer<vtkActor>::New();
cutActor->SetMapper( cutMapper );
cutActor->GetProperty()->SetColor( color[0], color[1], color[2] );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140411/760d000a/attachment.html>
More information about the vtkusers
mailing list