had a bit of a think and broke the route into 5 rectangles and added the hypotenuse of all 5 boxes so think the answer is.
1x1
5x5
20x12
5x5
1x1
40.29434 feet.
If you "flatten" the room (kind of like you did the box)… you can do one triangle - two legs and one hypotenuse - and you will get the shortest distance between the two points. You are getting very close to the answer though.
to be honest i can't imagine(picture) how i could flatten the room like you say, or if such a line would then be unbroken when the room was rebuilt so the spider could walk along it to get from point a to b.
and my origami skills aren't helping me see it either.
so going to have to wait to see if anyone else can get it from all your clues before i have to resort to google to help me.
ok thought if all my rectangles where squares in my route it might be shorter
so
1x1
7x7 (never stopped at physical corners but carried it over to wall and ceiling)
12x12
7x7
1x1
and it was.
my new answer is
39.5979
not sure this would route would end up at the correct spot tho, my brains stopped working, and think i may have added the lost 8 foot from my rectangle incorrectly to the other 2 boxes.
think i had a brainwave.
instead of breaking the route into 5 boxes, i broke it into 2,
16x12 puts her exactly in the middle of side wall
16x12 puts her where she wants to be.
and the answer is 40 foot, exactly.
thanks, apple pie is definitely one of my favourites.
i really don't know why i made such hard work of getting to the answer,
soon as i saw your diagram i remembered i knew that and had seen it before.