A general formulation for shape design sensitivity analysis over three dimensional beam structure is developed based on a variational formulation of the beam in linear elasticity. Sensitivity formula is derived based on variational equations in cartesian coordinates using the material derivative concept and adjoint variable method for the displacement and Von-Mises stress functionals. Shape variation is considered for the beam shape in general 3-dimensional direction as well as for the orientation angle of the beam cross section. In the sensitivity expression, the end points evaluation at each beam segment is added to the integral formula, which are summed over the entire structure. The sensitivity formula can be evaluated with generality and ease even by employing piecewise linear design velocity field despite the bending model is fourth order differential equation. For the numerical implementation, commercial software ANSYS is used as analysis tool for the primal and adjoint analysis. Once the design variable set is defined using ANSYS language, shape and orientation variation vector at each node is generated by making finite difference to the shape with respect to each design parameter, and is used for the computation of sensitivity formula. Several numerical examples are taken to show the advantage of the method, in which the accuracy of the sensitivity is evaluated. The results are found excellent even by employing a simple linear function for the design velocity evaluation. Shape optimization is carried out for the geometric design of an archgrid and tilted bridge, which is to minimize maximum stress over the structure while maintaining constant weight. In conclusion, the proposed formulation is a useful and easy tool in finding optimum shape in a variety of the spatial frame structures.