Hi All,<br><br>I'm trying to refine my surface and then split into lines. The steps are<br>1. take original vtkPolyData and filter it using vtkFeatureEdges - dataset after rendering looks nice<br>2. now I want to traverse the result vtkPolyData (named below contours) and extract lines<br>
vtkCellArray *ca = contours->GetOutput()->GetLines();<br>
vtkIdType ncells = ca->GetNumberOfCells();<br>
<br>And at the step 2 I'm having problems:<br><br>The ncells is too big (1000+, while on step 1 I see at most 10-20 lines), when I draw extracted lines I see triangles, not the contours I saw on step 1.<br><br>What am I missing?<br>
<br>PS: Lines points extraction is implemented as following:<br> ca->InitTraversal();<br> while ( ca->GetNextCell( npts, pts ) )<br> {<br> for ( cc = 1; cc < npts; cc++ )<br> {<br> p1 = pts[cc-1] + 1;<br>
p2 = pts[cc] + 1;<br> contours->GetOutput()->GetPoint( p1, pc1 );<br> contours->GetOutput()->GetPoint( p2, pc2 );<br> .... // creating and rendering the extracted line<br>
}<br> }<br><br><br>Regards,<br>C<br>