Export Sphere Clip Coordinates

I applied sphere clips on a polygonal mesh. Now I’d like to get a csv document containing the coordinates/Centers of the spheres.

In the Python Shell you geht the values through this command:

center = myObject.ClipType.Center
print center

I guess in order to create a list of all coordinates i would need to create a programmable Filter. How can I address the sphere center inside of the programmable Filter?

myObject.GetDataInformation().GetCenter() is wrong.

The most easy here may just to write the centers from the python shell.

That would work, but I’d prefer to solve it with a programmable filter, so that i can put it together with all the other values in one table straight away.

Do you know how to reference the Sphere clip from inside of the programmable filter?

How can you access another filter in the pipeline from inside of a programmable filter?

Sorry, but you can’t. You would basically need to recompute the center of each sphere.

Not even by using multiple input connections?

The sphere center information is present in two location :

  1. Client side, in the property of the sphere clip proxy, which you can access from pvpython (or any client side code)

  2. Server side, in the member of the VTK class doing the clip, which can be accessed from within this filter only

Your programmable filter is running server side, in a different filter, so doesn’t have access to 1. nor 2.