Hi <br>this is a piece of code that should work...<br><br> vtkPoints *cloudPoints=new vtkPoints;<br> vtkCellArray *cloudCells=new vtkCellArray;<br> vtkPolyData *cloudPData=new vtkPolyData;<br> <br> <br> cloudPoints->SetDataTypeToDouble();<br> cloudPoints->SetNumberOfPoints(numberOfVTKPoints);<br> <br> <br> for(int i=0; i<(numberOfVTKCells*3); i++)<br> {<br> cloudPoints->SetPoint(i,vtkStoredPointsBuffer[i].getX(),vtkStoredPointsBuffer[i].getY(),vtkStoredPointsBuffer[i].getZ());<br> <br> }<br><br> <br> cloudCells->InsertNextCell(numberOfVTKPoints);<br> <br> <br> for (int i=0; i<numberOfVTKPoints;
i++)<br> {<br> cloudCells->InsertCellPoint(i);<br> }<br> <br> <br> cloudPData->SetPoints(cloudPoints);<br> cloudPData->SetLines(cloudCells);<br><br><br>the only weird thing you may see is these getX(), getY(), getZ() methods. The reason why i use these methods is that i store my points in std::vector<Point3D><br>where Point3D is a custom class for 3D points (in your case you use vtkPoints).<br><br>Try it and tell me if it worked. I am not 100% this is the correct way though <br><br>Good luck :-)<br><br><br><br><b><i>ѧ־ Ñî <shulo1978@hotmail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Hi all, I extract vtkpoints from a polydata and want to reconstruct them <br>back into vtkCell. Can anyone give me some hint to do this? The
points are <br>taken out based on some conditions so I can't use getCell from vtkpolydata <br>to take the cell straignthaway. Thank you!<br><br>_________________________________________________________________<br>Could you be the guest MSN Movies presenter? Click Here to Audition <br>http://www.lightscameraaudition.co.uk<br><br>_______________________________________________<br>This is the private VTK discussion list. <br>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>Follow this link to subscribe/unsubscribe:<br>http://www.vtk.org/mailman/listinfo/vtkusers<br></blockquote><br><p> 
<hr size=1>Ahhh...imagining that irresistible "new car" smell?<br> Check out
<a href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new cars at Yahoo! Autos.</a>