Additive manufacturing (AM) technologies have been widely used to fabricate three-dimensional (3D) objects quickly and cost-effectively. However, building parts consisting of complex geometries with curvatures can be a challenging process for the traditional AM system whose capability is restricted to planar layered printing. Using six degrees-of-freedom (DOF) industrial robots for AM overcomes this limitation by allowing the material deposition to take place on nonplanar surfaces. In this paper, we present trajectory planning algorithms for 3D printing using nonplanar material deposition. Trajectory parameters are selected to avoid collision with printing surface and satisfy robot constraints. We have implemented our approach by using a 6DOF robot arm. The complex 3D structures with various curvatures were successfully fabricated with a good surface finish.