Hi, Tina<br><br>try to use <br>planeCut->SetInput(sgrid->GetOutput())<br><br>i think it works<br><br>regards,<br>sugeng<br><br><div><span class="gmail_quote">On 11/20/06, <b class="gmail_sendername">Tina Dong</b> <
<a href="mailto:ttdong@stanford.edu">ttdong@stanford.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>I'm relatively new to vtk, and I'm trying to cut an structured grid
<br>with vtkCutter to get a plane. With the following code, I get 0<br>points in the planeCut output. Any idea what I'm doing wrong?<br><br>Thanks,<br>Tina<br><br><br>vtkStructuredGrid *sgrid = vtkStructuredGrid::New();<br>
vtkIntArray *vectors = vtkIntArray::New();<br>vectors->SetNumberOfComponents(3);<br>points->Allocate(64*64);<br><br>// inserting points and tuples<br><br>vtkPlane *plane = vtkPlane::New();<br>plane->SetOrigin(sgrid->GetCenter());
<br>plane->SetNormal(1,0,0);<br>cout << "sgrid number " << sgrid->GetNumberOfPoints() << endl;<br><br>vtkCutter *planeCut = vtkCutter::New();<br>planeCut->SetInput(sgrid);<br>planeCut->SetCutFunction(plane);
<br>planeCut->Update();<br><br>cout << "number" << planeCut->GetOutput()->GetNumberOfPoints() << endl;<br><br>_______________________________________________<br>This is the private VTK discussion list.
<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br><br clear="all"><br>-- <br>sing enom ngormati sing tua, sing tua nyontoni sing bener