I am bale to get the points like this<br><br>cutter=vtk.vtkCutter()<br>        cutter.SetCutFunction(plane)<br>        cutter.SetInput(vtkObject.GetOutput())<br>        cutter.Update()<br><br>        out=cutter.GetOutput()<br>
        points=out.GetPoints()<br>        NumPts=points.GetNumberOfPoints()<br>        #print NumPts<br>        OutlinePts=np.zeros([NumPts,3])<br>        for n in range(0,NumPts,1):<br>            OutlinePts[n,:]=np.round(points.GetPoint(n))<br>
<br><br>As David said, you have to call the Update method.<br><br>Jothy<br><br><div class="gmail_quote">On Thu, Feb 4, 2010 at 7:04 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria%2Bvtk@gmail.com" target="_blank">daviddoria+vtk@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>
<div class="gmail_quote"><div>On Thu, Feb 4, 2010 at 11:46 AM, Eddy Cappeau <span dir="ltr">&lt;<a href="mailto:ecappeau@phenix-systems.com" target="_blank">ecappeau@phenix-systems.com</a>&gt;</span> wrote:<br>

<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;" class="gmail_quote">Hi,<br><br>I&#39;m new to VTK and I&#39;v got a little problem with it.<br>I want to cut a mesh with a plane and get the polyline of the intersection.<br>


The mesh come from a stl file loaded like this :<br><br>   vtkSmartPointer&lt;vtkSTLReader&gt; reader = vtkSmartPointer&lt;vtkSTLReader&gt;::New();<br>   reader-&gt;SetFileName(&quot;myfile.stl&quot;);<br><br>   vtkSmartPointer&lt;vtkPolyDataMapper&gt; stlMapper = vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();<br>


   stlMapper-&gt;SetInputConnection(reader-&gt;GetOutputPort());<br><br>I create a cutter like this :<br><br>   vtkCutter * sliceCutter = vtkCutter::New();<br>   sliceCutter-&gt;SetInput( reader-&gt;GetOutput() );<br>   vtkPlane *slicePlane = vtkPlane::New();<br>


   slicePlane-&gt;SetOrigin(0.0,0.0,7.0);<br>   slicePlane-&gt;SetNormal(0.0,0.0,1.0);<br><br>   sliceCutter-&gt;SetCutFunction( slicePlane );<br><br>I&#39;v created a mapper and an actor for the mesh and the section, and i can visualize them both.<br>


<br>So I try to retrieve the points like this :<br><br>   vtkPolyData * testdata = sliceCutter-&gt;GetOutput();<br>   vtkPoints * points = sliceCutter-&gt;GetOutput()-&gt;GetPoints();<br>   int n = points-&gt;GetNumberOfPoints();<br>


<br>But the vtkPoints is always NULL and  I don&#39;t understand why.<br>How can I get those points ?<br><br>thanks.<br>_____</blockquote>
<div> </div>
</div><div>Sounds like you need to call Update on the cutter</div>
<div>sliceCutter-&gt;Update();</div>
<div> </div>
<div>Let me know if that works.</div>
<div><br clear="all">Thanks,<br><font color="#888888"><br>David</font></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>