[vtkusers] vtkExtractEdges, how does it work ?
    Sebastien_MARAUX 
    maraux at ondim.fr
       
    Fri Jun 21 11:49:49 EDT 2002
    
    
  
I got a polydata populated with 234 polys and 
12730 points.
I want to transform the polydata polygons in lines / polylines.
I know how to do it manually, but I tried to use 
vtkExtractEdges to save time.
Here is my code :
//-------------------------------------------------------------------------------------------------------------------------------------------------
  cout <<"polydata content : " <<shapePolyData->GetNumberOfPoints() <<"points, "  // 12760 points
          <<shapePolyData->GetNumberOfLines() <<"Lignes, " // 0 lines
          <<shapePolyData->GetNumberOfPolys() <<"Polys."  // 234 polys
          <<endl;
  vtkExtractEdges *edgeExtracter = vtkExtractEdges::New();    // trying to extract edges.
  edgeExtracter->SetInput(shapePolyData);
  //edgeExtracter->CreateDefaultLocator();    // i tried with and without
  cout <<"edge extracter : points / lines / polys" <<edgeExtracter->GetOutput()->GetNumberOfPoints() <<" / " <<edgeExtracter->GetOutput()->GetNumberOfLines() <<" / " <<edgeExtracter->GetOutput()->GetNumberOfPolys() <<endl;    
    // -> edge extracter 0 / 0 / 0 - I expected some lines and points.
 // and I want to copy it back to the original polyData
  //shapePolyData->SetPoints(edgeExtracter->GetOutput()->GetPoints());
  //shapePolyData->DeepCopy(edgeExtracter->GetOutput());
 //------------------------------------------------------------------------------------------------------------------------------------------------------
I would like to obtain some lines, but edgeExtracter output is empty.
What do I do wrong ?
Sebastien MARAUX
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020621/e116826a/attachment.htm>
    
    
More information about the vtkusers
mailing list