Pounce It!
My wife used to work in the Neon sign fabrication biz. She frequently had to translate designs from paper to asbestos fabric. She used what was known as a "pounce" wheel and a "pounce bag"
The wheel looked like a pizza cutter wheel with little spikes on it. Hers how it might work: First you affix the printed design to your desired medium, in your case the foam, then trace the desired lines with the pounce wheel. This creates a perforation of little holes where ever you traced. Next you take a "sock" full of marking chalk (for snapping lines etc) and "gently daub" (or pounce?) the perforations you just made, gently remove the paper and trace over the chalk dot to dot with a marker. Effectively transferring the design from the paper to the foam.
I wonder though, with foam, if you need to bother with the chalk and marker at all, it seems the pounce wheel would just as easily mark the foam with little holes as it punches through the paper.. interesting… maybe you’ll need to rub some chalk into the holes so they show up better.. hum, possibilities…