code: def connectedVertices(self, index, returnIds=False):
          
          mesh = self.polydata()
  
          cellIdList = vtk.vtkIdList()
          mesh.GetPointCells(index, cellIdList)
  
          idxs = []
          for i in range(cellIdList.GetNumberOfIds()):
              pointIdList = vtk.vtkIdList()
              mesh.GetCellPoints(cellIdList.GetId(i), pointIdList)
              for j in range(pointIdList.GetNumberOfIds()):
                  idj = pointIdList.GetId(j)
                  if idj == index:
                      continue
                  if idj in idxs:
                      continue
                  idxs.append(idj)
  
          if returnIds:
              return idxs
          else:
              trgp = []
              for i in idxs:
                  p = [0, 0, 0]
                  mesh.GetPoints().GetPoint(i, p)
                  trgp.append(p)
              return np.array(trgp)
docs: Find all vertices connected to an input vertex specified by its index.
  
          :param bool returnIds: return vertex IDs instead of vertex coordinates.
  
          .. hint:: |connVtx| |connVtx.py|_