Always cut about a half inch smaller to ensure your item will fit perfectly.
that knife is **** by the hot wire
The best way I have found to do a cut-out is to place the firearm in the position you wish to have it in the case, trace it out with toothpicks, take firearm out of case, line up the cutter (of your choice) with a metal ruler and trim out.
I recommend you use either a fresh straight razor, or an Exacto knife. A long straight razor is better, because you can make one continuous cut through and through the foam, whereas with a smaller length blade, you will have to make multiple passes over the same spot, which could turn out looking not so clean.
Also, I agree about the stencil mentioned above. Get a piece of cardboard and place your firearm on top. Then, trace an outline from an angle so you can get a little underneath the rifle/shotgun. It only needs to be about a 1/2 inch smaller than the firearm to ensure a snug fit. When you place the stencil over the foam to begin cutting, try your best to hold the blade at a 90 degree angle from the foam.
The hot wire idea is something I've never seen done, but it does sound feasible.
Good luck with it.
The best way I have found to do a cut-out is to place the firearm in the position you wish to have it in the case, trace it out with toothpicks, take firearm out of case, line up the cutter (of your choice) with a metal ruler and trim out.