<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hello,<div><br></div><div>I trying to clip a vtk polydata model (with vtkClipPolyData) using a sphere I created with vtkSphereSource, and converted to implicit function with vtkImplicitDataSet (using Delaunay and ElevationFilter like in this example: <a href="http://www.vtk.org/Wiki/VTK/Examples/Python/vtkImplicitDataSet">http://www.vtk.org/Wiki/VTK/Examples/Python/vtkImplicitDataSet</a>) and then run through all polygons (cells) and get their area (triangle area).</div>
<div>However, when I get cell ( polydata->GetCell(cellIndex) ) and then get the area of the cell ( cell->ComputeArea() ), it returns NaN.</div>
<div><br></div><div>I looked into it, and it seems some cells at the borders have empty points. ComputeArea() tries to get the 3 points of the cell defining the triangle, but if I take a cell on the border of the model clipped, 1 or 2 points of the cell are [NaN, NaN, NaN] and 1 or 2 is valid coordinates.</div>
<div><br></div><div>I tried to use vtkCleanPolyData after clipping, but it didn't change anything.</div><div><br></div><div>Is there a way to update cells so the coordinate of the points become valid ?</div><div><br>
</div>
<div>Thank you.</div><div><br></div><div>-Laurent</div><span class=""><font color="#888888"><div><br></div></font></span></div></div>-- <br><div dir="ltr"><div>Laurent Chauvin, MS</div><div>Surgical Navigation and Robotics Laboratory, Radiology Department</div>
<div>Brigham And Women's Hospital, Harvard Medical School<br></div><div><a href="http://wiki.ncigt.org/index.php/User:Lchauvin" target="_blank">http://wiki.ncigt.org/index.php/User:Lchauvin</a></div></div>
</div>