<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I got a polydata populated with 234 polys and 
</FONT></DIV>
<DIV><FONT face=Arial size=2>12730 points.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I want to transform the polydata polygons in lines 
/ polylines.</FONT></DIV>
<DIV><FONT face=Arial size=2>I know how to do it manually, but I tried to use 
</FONT></DIV>
<DIV><FONT face=Arial size=2>vtkExtractEdges to save time.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is my code :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>//-------------------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>  cout <<"polydata content : 
" <<shapePolyData->GetNumberOfPoints() <<"points, "  // 
12760 
points<BR>          <<shapePolyData->GetNumberOfLines() 
<<"Lignes, " // 0 
lines<BR>          <<shapePolyData->GetNumberOfPolys() 
<<"Polys."  // 234 
polys<BR>          <<endl;</FONT></DIV>
<DIV><FONT face=Arial size=2><BR>  vtkExtractEdges *edgeExtracter = 
vtkExtractEdges::New();    // trying to extract 
edges.<BR>  edgeExtracter->SetInput(shapePolyData);<BR>  //edgeExtracter->CreateDefaultLocator();    
// i tried with and without</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>
<DIV><BR>  cout <<"edge extracter : points / lines / polys" 
<<edgeExtracter->GetOutput()->GetNumberOfPoints() <<" / " 
<<edgeExtracter->GetOutput()->GetNumberOfLines() <<" / " 
<<edgeExtracter->GetOutput()->GetNumberOfPolys() 
<<endl;    </DIV>
<DIV> </DIV>
<DIV>    // -> edge extracter 0 / 0 / 0 - I expected some 
lines and points.</DIV>
<DIV> </DIV>
<DIV> // and I want to copy it back to the original polyData</DIV>
<DIV>  //shapePolyData->SetPoints(edgeExtracter->GetOutput()->GetPoints());<BR>  //shapePolyData->DeepCopy(edgeExtracter->GetOutput());</DIV>
<DIV> </DIV>
<DIV> //------------------------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would like to obtain some lines, but 
edgeExtracter output is empty.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What do I do wrong ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sebastien MARAUX</FONT></DIV></BODY></HTML>