We present a high-precision fringe pattern projection technique based on a novel 4D hypersurface calibration method, and its application to on-machine measurement of raw-stocks in die-making industry. Our fringe pattern projection technique has the following feature. In the calibration stage, coordinates (x, y) of a CCD image sensor correspond uniquely, for every calibration plane with height Zi (i=1,..,n), to a phase φ of a projected fringe pattern, and coordinates (X , Y) of a machine tool. These relationships are converted to hypersurfaces in 4D spaces of (x, y, Z, φ), (x, y, Z, X), and (x, y, Z, Y), which are considered to be a sort of function. Using these hypersurfaces, a measured data of (x, y, φ) is transformed to machine tool coordinates (X, Y, Z). Our hypersurface calibration method is expected to minimize systematic errors, because it inputs an observed data (x, y, φ) into precise interpolation functions created using actual measurement data, and accordingly systematic errors are cancelled. The repeatability, systematic errors, and random errors obtained from the experiment show that our measurement system has a potential for highly accurate non-contact 3D shape measurement.