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
Calculator
filter. Set theAttribute Type
toPoint Data
. Set theResult Array name
toCell Center
. Set the expression tocoords
.Apply
. - Add the
Point Data to Cell Data
filter. 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.