Hi again. I didn’t check your code but it appears to work.
Please search examples of vtkMath::Dot…
You need it to get the component of each cell’s normal vector in reference to the default vectors: x, y, z
For example to get the component Nx of vector N, you need to do Dot(N,x), then save the result on the scalar array you will be mapping.