Thank you for sharing the solution! You can use slicer.util
helper functions to simplify things a bit:
modelNode = slicer.util.getNode(‘ModelX’)
pointCoordinates = slicer.util.arrayFromModelPoints(modelNode)
import numpy as np
print(np.average(vtk_to_numpy(pd), axis=0))
or even shorter (a bit less explicit, so I would only recommend for testing and troubleshooting, not in modules):
import numpy as np
print(np.average(array('ModelX'), axis=0))