<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<vtkSphereSource> sphereSource;</div><div style>vtkPolyData* originSphere = sphereSource->GetOutput();</div><div style>vtkPoints* originPoints = originSphere->GetPoints();</div><div style>
<br></div><div style>vtkNew<vtkCellArray> cellsIn;</div>vtkNew<vtkCellArray> cellsOut;<div style>for(vtkIdType pointId = 0; pointId < originPoints-><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->InsertNextCell(1);</div><div style>cells->InsertCellPoint( pointId );</div>
<div style>}</div><div style><br></div><div style><div>vtkNew<vtkPolyData> inPoly;<br></div><div>inPoly->SetPoints(originSphere->GetPoints())<br></div><div>inPoly->SetVerts(cellsIn.GetPointer());</div><div>
<br></div><div><div>vtkNew<vtkPolyData> outPoly;<br></div><div>outPoly->SetPoints(originSphere->GetPoints())<br></div><div>outPoly->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"><<a href="mailto:renilac@gmail.com" target="_blank">renilac@gmail.com</a>></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>