I know it's not exactly answering your question but when I needed to make a custom foam spacer for a buggy that didn't originally account for shorty batteries, I would just buy a few of the Associated SC10 battery spacers and cut/glue together to make it work.
https://www.amainhobbies.com/team-as...asc9815/p36988