Path planning in 3D geometry space is used to find an optimal path in the restricted environment, according to a certain evaluation criteria. To solve the problem of long searching time and slow solving speed in 3D path planning, a modified ant colony optimization is proposed in this paper. Firstly, the grid method for environment modeling is adopted. Heuristic information is connected with the planning space. A semi-iterative global pheromone update mechanism is proposed. Secondly, the optimal ants mutate the paths to improve the diversity of the algorithm after a defined iterative number. Thirdly, co-evolutionary algorithm is used. Finally, the simulation result shows the effectiveness of the proposed algorithm in solving the problem of 3D pipe path planning.