Thanks for all the answers. It's starting to make sense. I'm relieved to see it's not an easy problem.
If it helps, it's an elliptical machine I was thinking of buying (I was using a rectangular box shape as an abstraction.)
I'm not sure how easily it can be disassembled.
The dimensions are 22" x 57" x 66" and the hallway is 31" in the first corridor and 32" in the next, with a height of 82".