I’ve been trying to speed up vtkCellPicker with my large data set (1M cells). I’ve followed other examples to add a vtkCellLocator to the vtkCellPicker to improve performance. Unfortunately, I don’t see any improvement when I do this. I’ve followed the example here: vtkCellPicker very slow
Creating cell locator:
self.locator = vtkCellLocator() self.locator.SetDataSet(femobj.getMesh()) # unstructured grid self.locator.BuildLocator() self.picker = vtkCellPicker() self.picker.AddLocator(self.locator)
clickPos = self.parent.getRenderWindowInteractor().GetEventPosition() self.parent.picker.Pick(clickPos, clickPos, 0, self.parent.getRenderer()) print(self.parent.picker.GetCellId())
The process seems straight forward and is advertised to make the picking faster, I just haven’t been able to see it happen. Is there something obviously wrong here?