Abstract In actual manufacturing process, many weldments have large dimensions and complex shapes, and they are usually assembled through a multi-pass welding process. The joints of the tube–sphere intersection (J-groove joints) are complex. This paper presents a complete solution in determining the welding paths based on a developed J-groove joint robot. Generating complex welding paths in terms of cubic B-spline curves is made easy using path control modules such as interpolation module and local modification module. The point inversion module using particle swarm optimization is introduced to address the partition of path, which is required of the welding process. Experimental results show that higher efficiency as well as better weld quality can be achieved, indicating a promising and practical use of the robot for welding applications, which is rarely available at present.