When a three-dimensional structure is formed by welding a plurality of
members, accurate welding can be performed matching the three-dimensional
shape. The teaching data consisting of the three-dimensional position at
each of the welding points determined on each of the welding lines at a
predetermined spacing on the basis of the design data of the
three-dimensional structure is stored in a memory 18. A laser slit light
sensor (a laser slit light emitting section 12 and a CD camera 13) is
controlled by a total controller 17 via a camera controller 14 to
photograph the welding point in order to obtain the image data of the
welding point. An image processing apparatus 16 processes the image data
to determine the amount of deviation from the design data of welding
points. The total controller modify the teaching data on the basis of the
amount of deviation from the design data of welding points to establish
the modified teaching data and controls a welding head so that it moves
according to the modified teaching data.