We're talking about an Electric Knife like you would use on your turkey at Thanksgiving.
The trick is to go slow, and make sure the knife stays at a 90 degree angle to the foam at alll times. This is especially critical when you do cutting on tight turns like around the inside of the grip etc. Don't try and make round cuts that are too tight. Better to make short, straight line cuts.
Also, don't stop cutiing until you are at the end of a line, or you will "Goober" it up.
Use blackboard chalk to make your outline, and remember to cut on the inside of the line so gun is snug in the foam. Then take a damp rag to remove chalk line.
Use "Spray Contact Cement" on both the bottom of the "Cut Piece" of Foam, and the layer of foam that the gun will lay on. Read the directions. Be careful not to put adhesive on the foam that will touch the gun.
Hope this helps!
Tack