I don't have a cnc machine but have been following the forum for a couple of years now, my understanding is that there is software available that will probe your workpiece (bed)on a user defined grid, and calculate any offset required for the z axis to machine thin components(PCB's ect) that are not totally level when secured to you bed. This should be able to machine a flat surface ?
Hopefully someone with experience of same may be able to offer better advice.
Mike