I am trying to use the first component of a vector via Programmable Filter.
I tried follwing:
input = inputs
pointData = input.GetPointData()
vector = pointData.GetVectors(‘vector’)
Now this creates a double array. The ‘vector’ has three components and I’d like to only work with the x-coordinate.
I tried working on the coordinates directly, without using the full vector, but this always returned the value None.
Since I am working on Particles, I could use their ID: coordinates = vector.GetTuple(-ParticleID-), but this gives back all three coordinates. Also, is there a way to extract the components without having to use the ID of the Particle? I’d like to print out the x-coordinates of each Particle.
I’d be thankful for any advice.