I ended up revisiting this topic while answering a different question. I found my original solution is behaving a little wonky. @banesullivan’s plugin script works great, but fails on multiblock data sets. I found a slightly simpler solution.
- Add the
Calculatorfilter. Set theAttribute TypetoPoint Data. Set theResult Array nametoCell Center. Set the expression tocoords.Apply. - Add the
Point Data to Cell Datafilter. UncheckProcess All Arrays. Uncheck all point arrays exceptCell Center. CheckPass Point Data.Apply.
The result should be one more cell field with the cell centers. This should work with any data set whether multi-block or single data set. To make this even easier, here is a custom filter that just adds the Cell Center array as a single filter.
AppendCellCenters.cpd (5.2 KB)
To load this, go to Tools → Manage Custom Filters.... Then click the Import button to load this file.