This paper discusses a new structural optimization method, based on topology optimization techniques, using frame elements where the cross-sectional properties can be treated as design variables. For each of the frame elements, the rotational angle denoting the principal direction of the second moment of inertia is included as a design variable, and a procedure to obtain the optimal angle is derived from Karush–Kuhn–Tucker (KKT) conditions and a complementary strain energy-based approach. Based on the above, the optimal rotational angle of each frame element is obtained as a function of the balance of the internal moments. The above methodologies are applied to problems of minimizing the mean compliance and maximizing the eigen frequencies. Several examples are provided to show the utility of the presented methodology.