[vtkusers] Re: vtkMergePoints usage (Steve Boyd)
    Steve Boyd 
    skboyd at ucalgary.ca
       
    Thu Oct  9 12:09:43 EDT 2003
    
    
  
Doug,
I think I've worked it out now.  Hope this helps:
    // Taking out duplicate points by adding them one by one into
mergedPts
    vtkPoints *mergedPts = vtkPoints::New();  // for merged points
    vtkMergePoints *pointLocator = vtkMergePoints::New();
      pointLocator->InitPointInsertion(mergedPts,points->GetBounds());
// original data bnds
    for (id=0; id<points->GetNumberOfPoints(); id++) { // main loop
      newPt = points->GetPoint(id);
      pointLocator->InsertUniquePoint(newPt,insertedId);  // insert the
unique point
    }
Steve
-- 
Steven Boyd
PhD, PEng
Assistant Professor
Department of Mechanical and Manufacturing Engineering
University of Calgary
2500 University Drive, N.W.
Calgary, Alberta, Canada, T2N 1N4
tel. 1.403.220.4173  fax. 1.403.282.8406  skboyd at ucalgary.ca
-------------------------------------------------------------------
    
    
More information about the vtkusers
mailing list