<div dir="ltr">Hi Renil,<div><br></div><div style>you were on the right track with Jeff suggestion.</div><div style><br></div><div style>but for the cell array when you build it, try to do something like that.</div><div style>
<br></div><div style>vtkNew&lt;vtkSphereSource&gt; sphereSource;</div><div style>vtkPolyData* originSphere = sphereSource-&gt;GetOutput();</div><div style>vtkPoints* originPoints = originSphere-&gt;GetPoints();</div><div style>
<br></div><div style>vtkNew&lt;vtkCellArray&gt; cellsIn;</div>vtkNew&lt;vtkCellArray&gt; cellsOut;<div style>for(vtkIdType pointId = 0; pointId &lt; originPoints-&gt;<span style="font-family:arial,sans-serif;font-size:13px"> GetNumberOfPoints()</span>; ++ pointId)</div>
<div style>{</div><div style>vtkCellArray * cells = IsPointInside(originPoints , pointId) ? cellsIn.GetPointer() : cellsOut.GetPointer();</div><div style>cells-&gt;InsertNextCell(1);</div><div style>cells-&gt;InsertCellPoint( pointId );</div>
<div style>}</div><div style><br></div><div style><div>vtkNew&lt;vtkPolyData&gt; inPoly;<br></div><div>inPoly-&gt;SetPoints(originSphere-&gt;GetPoints())<br></div><div>inPoly-&gt;SetVerts(cellsIn.GetPointer());</div><div>
<br></div><div><div>vtkNew&lt;vtkPolyData&gt; outPoly;<br></div><div>outPoly-&gt;SetPoints(originSphere-&gt;GetPoints())<br></div><div>outPoly-&gt;SetVerts(cellsOut.GetPointer());</div></div><div><br></div><div style>Then from those poly how do you render them ?</div>
<div style><br></div><div style>Seb</div></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 6:32 PM, Renil <span dir="ltr">&lt;<a href="mailto:renilac@gmail.com" target="_blank">renilac@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK,<br>
<br>
I tried the /Vertex/ example, which has no vtk..Source, only<br>
vtkPolyDataMapper.<br>
It draws a little square in the window, if in this case I call deleteCell(),<br>
it removes it from the screen.<br>
Thats why I was wondering if it had anything to do with the addition of the<br>
vtkSphereSource.<br>
<br>
Thanks anyway.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/trade-vtkPoints-between-actors-tp5722498p5722534.html" target="_blank">http://vtk.1045678.n5.nabble.com/trade-vtkPoints-between-actors-tp5722498p5722534.html</a><br>

<div class="HOEnZb"><div class="h5">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>
</div></div></blockquote></div><br></div>