<div dir="ltr">Something like this should help you.<br><br>Please make an example in wiki if this works.<br><br>OutlineVertices=list()<br> Bounds=Object.GetBounds()<br> s1=np.round(Bounds[4])<br> s2=np.round(Bounds[5])<br>
#print s1,s2,'s1,s2'<br> #print Bounds,'Bounds'<br> for x in np.arange(s1-2,s2+2,0.5):<br> plane=vtk.vtkPlane()<br> plane.SetOrigin(0,0,x)<br> plane.SetNormal(0,0,1)<br><br> cutter=vtk.vtkCutter()<br>
cutter.SetCutFunction(plane)<br> cutter.SetInput(Object)<br> cutter.Update()<br><br> out=cutter.GetOutput()<br> points=out.GetPoints()<br> NumPts=points.GetNumberOfPoints()<br> #print NumPts,'npts'<br>
OutlinePts=np.zeros([NumPts,3])<br> for n in range(0,NumPts,1):<br> OutlinePts[n,:]=np.round(points.GetPoint(n))<br> OutlineVertices.append(OutlinePts)<br> return OutlineVertices<br><br>
<br>Jothy<br><br><div class="gmail_quote">On Thu, Feb 16, 2012 at 4:15 AM, soheilghafurian <span dir="ltr"><<a href="mailto:soheilghafurian@yahoo.com">soheilghafurian@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I used the vtkCutter to build a contour on my poly data. I want to access the<br>
points of the contour but the polydata I get from vtkCutter->GetOutput()<br>
doesn't have points and has one piece instead.<br>
<br>
It would be great if someone told me how I can convert this polydata to a<br>
polydata which has points like polydata normaly does.<br>
<br>
Thanks a lot<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/How-to-get-poits-of-the-output-polydata-of-a-vtkcutter-has-pieces-instead-of-points-tp5488457p5488457.html" target="_blank">http://vtk.1045678.n5.nabble.com/How-to-get-poits-of-the-output-polydata-of-a-vtkcutter-has-pieces-instead-of-points-tp5488457p5488457.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<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>
</font></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>