For cutting foam I find that it is a bit more work, but a lot cleaner, to first cut an undersized hole with the electric knife, then to trim to final size with a hot nichrome wire, held in a home made plywood jig that approximates a fret saw. Disconnect the wire, pass though the hole, then re-attach to get the wire to be able to trim without needing to cut to the edge of the block.
I use the secondary filament winding from an old tv transformer to power the nichrome, with the primary 120v side plugged into a variac. Turn the variac slowly up from zero until the wire begins to glow. It's cold resistance is much lower than its hot resistance, so start slow, and refine in the first few minutes.