If you "unfold the box" (into what I recall being called a net) as rectangles shaped in a cross (see here for what I mean < then you can draw the shortest line with a straight rule, and you can work out its length with Pythagoras's theorem.
It turns out that it is not fastest to cross the floor diagonally and then walk up one of the edges.