[vtkusers] Problem with vtkCutter

David Doria daviddoria+vtk at gmail.com
Fri Jan 8 09:46:33 EST 2010


2010/1/8 Tomasz Wolański <wolantom at gmail.com>:
> Dear All,
>
> I have a problem with vtkCutter. I don't know how to use vtkCutter with
> unstructed grid. I created below presented program :
>
> vtkPolyDataMapper *cutMapper=vtkPolyDataMapper::New();
> vtkStripper *cutStripper= vtkStripper::New(); vtkPolyDataNormals
> *cutpoly=vtkPolyDataNormals::New();
> cut = vtkCutter::New();
> cut->SetInput(ugrid);
> cut->SetValue(0,0.5);
> vtkActor *Acut = vtkActor::New();
> cutpoly->SetInput(cut->GetOutput());
> cutStripper->SetInput(cutpoly->GetOutput());
> cutMapper->SetInput(cutStripper->GetOutput());
> Acut->SetMapper(cutMapper);
> vtkWindow1->GetRenderer()->AddActor(Acut);
> vtkWindow1->Invalidate();
>
> but I cannot see any change in my object.
>
> Could somebody be so kind to point out what's wrong with my code?
>
> I would be very grateful for any suggestion what I should modify or check.
>
> Thanks in advance and
> Best regards
>
> Tomasz

Tomasz,

When you asked on the devel list - I said

"Have you played with this example?
http://www.cmake.org/Wiki/VTK_Examples_vtkCutter
"

Did you try this?

Thanks,

David



More information about the vtkusers mailing list