Pepakura is a free software that is used for turning 3d models and shapes into unfolded paper formats. You can then use this to cut and glue the paper into a shape and use a variety of methods from there, or you can use the pepakura file to cut and trace onto foam as it will work the same way, but some pieces don't always work out too well because of the size of foam, so try and find a foam conversion. I can try and find the link to pretzels Google drive of all of his pep files that are made for foam. Hopefully it will have what you are trying to make.
Here you go Pretzel's Foam Conversions and Templates - Google Drive