Plane welds are a common type of weld in industrial sites. When the welding robot welds multiple types of plane welds at the same time, the traditional teaching and programming modes become relatively complicated. Therefore, in order to solve the problem of automatic robot welding of various types of plane welds, taking plane V-type butt, plane I-type butt, and plane lap welds as examples, this paper proposes a plane weld extraction method based on 3D vision. Firstly, in order to realize the line and plane segmentation of the workpiece point cloud, we establish the concept of plane point cloud density. Secondly, to segment workpiece edge lines, an iterative segmentation algorithm based on RANSAC is proposed. Then, based on the geometric features of the workpiece, a method for extracting weld feature points based on centroid positioning is proposed. Finally, the least squares method is used to fit the feature points of the welding seam to complete the welding trajectory planning. The experimental results show that the method can well solve the problem of automatic planning welding trajectory of plane V-type butt, plane I-type butt, and plane lap welds, to realize that the welding robot can simultaneously weld various plane welds without teaching and programming.