The deformation control is an important design problem in the stiffness design of structures and it also enables to give a function to the structures. This paper proposes a non-parametric, or a node-based shape optimization method based on the variational method for controlling the static deformation of spatial frame structures. As the objective functional, we introduce the sum of squared error norms to the desired displacements on specified members. Under the assumption that each member varies in the out-of-plane direction to the centroidal axis, the shape gradient function and the optimality conditions are theoretically derived. The shape gradient function is applied to a gradient method in a function space with a Laplacian smoother. With this method, an optimal free-form frame structure with smoothness can be identified for a desired static deformation. The validity and effectiveness were verified through design examples.