Hello guys, the task blew my mind, maybe someone will be able to complete it.(sorry for my English)
There is a random set of isometric cubes, the cube has a variable: "diagonal"
It is necessary to automatically determine which diagonal each of them is on and assign the diagonal number to the cube variable.
For clarity, I highlighted different diagonals with colors