Fermat with workpiece