If you aren't planning on doing a lot of this I use a fairly simple method in a fairly simple CAD program. Unless you are in the business of drafting learning how to use the CAD program can become a life in itself.
Get a drawing or coordinate list for the airfoil. The exact airfoil is never attained unless you have some really powerful software and tools and CNC machine the whole surface down to +/- 0.001.
Not being able to do that, place the spars on the airfoil drawing. Trace curves between the LE, the main spar, any auxiliary spars, and the trailing edges. Most of the cutting software will not choke on ordinary curves or polylines which are easy to work with. Get it as exact as you can. With the coordinates you get pretty accurate easily. Trying to trace from a drawing can take more time to get a smooth, representative airfoil by pulling the control points for a curve around.
Lay out a top view and a front view with the correct root and tip dimensions. Draw each rib, getting the dimensions directly from the top and front views. Position the spar(s) in respect to the airfoil centerline or true chord for non-symmetrical airfoils. Copy the curves from your original airfoil drawing and stretch them to fit where they belong between the LE, spars, and TE. Voila, one rib done.
Foam wings only require a root and tip templates. These, depending on the foam cutter, will usually be several inches from the root and tip so make allowance for this. Foam cutting also require making an allowance for the wire kerf. Some cutting programs will allow for that, but it's a mixed bag on a tapered wing. The kerf wider at the tip, so the best bet is to set things up with minimum taper and set the wire temperature, and cutting speed to just just the root of the wing with no drag marks or rounded corners. If you can cut REALLY slow you can get the kerf down to twice the wire diameter.