Add the cell center coordinates to the cell data

It’s a bit wonky, but it is possible to append the coordinates of the cell centers to the mesh. The following steps should work.

  1. Add the Cell Centers filter. Turn on the Vertex Cells property. Apply.
  2. Add the calculator filter. Set the Result Array Name to “Center” and the expression to compute to “coords”. Apply.
  3. Add the Point Data to Cell Data filter. Apply.
  4. In the pipeline browser, select both your original data set and the Point Data to Cell Data filter you just created. Add the Append Attributes filter. Apply.

That should do it.

For a bit more details, here is what each step is doing.

Step 1 is create a vertex cell (cell containing only one point) at the center of each cell in your original data set.

Step 2 is moving the point coordinates of each point to field data. Because of limitations of the calculator, it gets attached to points instead of cells.

Step 3 moves the field from points to cells. Because each cell only has one point, the values do not change.

Step 4 copies this cell field back to your original dataset.

6 Likes