<P>hello all,</P>
<P>I tried to test this function that should remove<BR>a point and all incident cells:<BR>- get all cells incident to the point;<BR>- for each cell in the above set<BR>- - remove the cell<BR>- remove the point.<BR><BR> void removePoint(int pointIndex, vtkPolyData p)<BR> {<BR> vtkIdList adjacentCells = vtkIdList.New();<BR> p.GetPointCells(pointIndex, adjacentCells);<BR><BR> int nrPoints = p.GetNumberOfPoints();<BR><BR> int nrAdjCells = adjacentCells.GetNumberOfIds();<BR> for (int i=0; i<nrAdjCells; i++)<BR> {<BR> int cellId = adjacentCells.GetId(i);<BR> p.RemoveReferenceToCell(pointIndex, cellId);<BR> p.RemoveCellReference(cellId);<BR> p.DeleteCell(cellId);<BR> }<BR> p.DeletePoint(pointIndex);<BR><BR> nrPoints = p.GetNumberOfPoints();<BR> }<BR><BR>This function does _not_ work To give an idea, I added the variable <BR>nrPoints. In the examples that I tried, after the last line, the value of nrPoints<BR>does not change .</P>
<P>the poly data has the same number of points as before.<BR><BR></P><BR>------------------------------------------<BR><BR>Faites un voeu et puis Voila ! www.voila.fr <BR><BR>