While you are measuring - I would complete the effort by measuring from the beds to the sides of the compartment and to the front, rear and top of the compartment. You would want the engine
to fit the bed
and then have clearance problems in the engine
From what I have read over the years you also need to be aware of how the exhaust
, how the cooling water
system will route
and how the fuel
system will route.
Are you changing from a port transom exhaust
to a starboard? Side hull
exit - etc...
What is the new shaft/prop system going to be? If you change RPM/HP you are likely looking at a new prop system as well.
Lot's of planning and questioning will help in the long run but the task ahead is pretty daunting.