PURPOSE: To improve the quality of shared data by preventing up to a component which is different in shape from being shared.
CONSTITUTION: A replacement decision part 10 is provided with an area error decision part 17 which decides whether or not a shape (component, etc.) can be used in common to an existent shape according to an area error and a distance decision part 16 which decides whether or not the shape can be used in common to a shape that is already stored according to the distance of the contour, and further provided with a mode switching part 18 which can select only one of 'area error decision mode' for deciding an area error, 'distance decision mode' for deciding a distance, and 'area error decision and distance decision mode' for deciding both the area error and distance; and the area error decision part 17 and distance decision part 16 are switched by the mode switching part 18 to enable replacement decision making in optimum mode.