Cubical is the shape of a cube, having identical measurements in all dimensions.
Cubicle is a space in a large room that is partitioned off, often to ensure privacy: “I hate being stuck in my cubicle with boring office work when the weather is so pleasant.”
In the privacy of his cubicle, the professor tried to discover a different use for an object with a cubical shape.