When performing air-to-ground attack, the reconnaissance and strike integrated UAV should consider the restrictions of its payload and weapon, which bring along the requirements of precise position and attitude to the UAV's attack route. It proposes a framework to generate the attack route automatically, which splits the attack route to task segments and joint segments, and then designs task segments by operational demands and produces joint segments by mathematical optimization. The mathematical model and its solution of each path segment are also presented. The key research is the design of optimal joint segments. It expands the basic Dubins path and proofs the conclusion: Constrained by bounded curvature kappa(max) in the free plane, the shortest path from a given start point with orientation to a fixed tangent circle is composed of arc C with radius 1/kappa(max) and line segment L that tangents to C, or a degenerate form of it. Finally, the simulations demonstrate that the proposed method can be applied to the fixed or movable target.