1. A CAD/CAM system comprising a shape data input unit which can input various kinds of shape data including free surfaces, a shape extraction processor for obtaining a distance of an arbitrary position data from a function which represents a shape in a real space as well as in a parametric space for conducting set operation with object structure data on said shape and a display unit for displaying said shapes based on a whole shape data outputted from said shape extraction processor.