A method to determine the shape data of a complex curve surface using
reference templates from a copy of the workpiece before it was used and
the undamaged portion of the used workpiece so that the damaged portion
of the workpiece can be reconstructed. The reference template is scanned
in layers, including the portion corresponding to that which has been
damaged in the workpiece, as well as adjacent undamaged portions of the
used workpiece. Offsets of the reference template and workpiece are
generated, based on corresponding portions of the reference template and
the used workpiece. A new set of offsets of the damaged portion of the
workpiece is then calculated. This calculated set of offsets is then used
to calculate further profiles until a complete profile of the damaged
portion has been predicted.