I do it about the same way as John. If you have a favorite rod handle, work with it close by as a visual/tactile template. With calipers, you can copy and match a grip's diameter at any point.
Working freehand, you can custom-fit a grip. I frequently leave a flat or gentle concavity on the top/front of a single-handed fly rod, for my thumb, and sometimes I make a slight concavity on the rear side of the grip for the pad of my hand (on the left side, since I'm a port-sider).
Work slowly; test frequently. You can grind cork off, but you can't put it back. (Except as glue/dust caulking for the pits.)