Are you cutting the rectanglular groove around the leg's top? And, you are saying that the your have several similar but unique parts. How many diffrent styles 10, 100, 1000? If it is a limited number that you will be doing several pieces of, I would still build jigs for each one. I suggested referencing the bottom, flat section of each leg top as it should be a repeatable known reference to the top surface you are trying to follow. With such a known reference, the contour you are cutting on the top will be the same for each style of leg. If EVERY part is unique it is a more difficult problem as you would have to mount each leg, digitize the surface, convert the point cloud data to surfaces, somehow dynamically generate G-code to match the surfaces. Or, write some sort of Mach wizard that will let you touch of a certain number of points and from there it will generate the g-code for the part.