Hi, Tina<br><br>try to use <br>planeCut-&gt;SetInput(sgrid-&gt;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> &lt;
<a href="mailto:ttdong@stanford.edu">ttdong@stanford.edu</a>&gt; 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-&gt;SetNumberOfComponents(3);<br>points-&gt;Allocate(64*64);<br><br>// inserting points and tuples<br><br>vtkPlane *plane = vtkPlane::New();<br>plane-&gt;SetOrigin(sgrid-&gt;GetCenter());
<br>plane-&gt;SetNormal(1,0,0);<br>cout &lt;&lt; &quot;sgrid number &quot; &lt;&lt; sgrid-&gt;GetNumberOfPoints() &lt;&lt; endl;<br><br>vtkCutter&nbsp;&nbsp;*planeCut = vtkCutter::New();<br>planeCut-&gt;SetInput(sgrid);<br>planeCut-&gt;SetCutFunction(plane);
<br>planeCut-&gt;Update();<br><br>cout &lt;&lt; &quot;number&quot; &lt;&lt; planeCut-&gt;GetOutput()-&gt;GetNumberOfPoints() &lt;&lt; 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