The general cross-sectional shape of machine parts is extracted by means of image processing. An algorithm is given the so-called 'Contour Scanning Method', which detects the boundary of the image data of the machine parts with small memory allocation. From the scan data obtained by scanning the machine parts, the edge of the image data is detected and transformed to a useful format for use with general CAD programs. (C) 1997 Elsevier Science S.A.