[vtkusers] vtkCutter with vtkStructuredGrid result 0 points
Sugeng Waluyo
sugengwalj at googlemail.com
Tue Nov 21 06:10:27 EST 2006
Hi, Tina
try to use
planeCut->SetInput(sgrid->GetOutput())
i think it works
regards,
sugeng
On 11/20/06, Tina Dong <ttdong at stanford.edu> wrote:
>
> Hi,
>
> I'm relatively new to vtk, and I'm trying to cut an structured grid
> with vtkCutter to get a plane. With the following code, I get 0
> points in the planeCut output. Any idea what I'm doing wrong?
>
> Thanks,
> Tina
>
>
> vtkStructuredGrid *sgrid = vtkStructuredGrid::New();
> vtkIntArray *vectors = vtkIntArray::New();
> vectors->SetNumberOfComponents(3);
> points->Allocate(64*64);
>
> // inserting points and tuples
>
> vtkPlane *plane = vtkPlane::New();
> plane->SetOrigin(sgrid->GetCenter());
> plane->SetNormal(1,0,0);
> cout << "sgrid number " << sgrid->GetNumberOfPoints() << endl;
>
> vtkCutter *planeCut = vtkCutter::New();
> planeCut->SetInput(sgrid);
> planeCut->SetCutFunction(plane);
> planeCut->Update();
>
> cout << "number" << planeCut->GetOutput()->GetNumberOfPoints() << endl;
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
sing enom ngormati sing tua, sing tua nyontoni sing bener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061121/f7a7a0d2/attachment.htm>
More information about the vtkusers
mailing list