A method for controlling a height of a cutting torch, includes loading a workpiece onto a numerical control machine, scanning the workpiece with a scanning device at a plurality of discrete points on an upper surface of the workpiece, measuring an X-, a Y-, and a Z-coordinate for each respective one of the scanned discrete points, where X and Y define a plane substantially parallel to the loaded workpiece and Z represents a distance between the upper surface and the scanning device at a respective discrete point, storing the measured XYZ coordinates from each of the scanned discrete points into a data set, mathematically fitting the stored data set to a smooth surface representative of the upper surface of the loaded workpiece, and cutting the workpiece along a cutting path programmed into the numerical control machine, while controlling the cutting torch height to correspond to the representative smooth surface.