Shape optimization of a mechanical structure is an important issue to find the value of critical parameters. This process has a special interest when the shape modification can be carried out in the environment of CAD software, thus creating a new, optimized object in the database of this software. Such an approach has been developed for geometric models embedding canonical surfaces such as planes, cylinders, cones, etc. However, many situations occur where the geometry of the model uses free form surfaces. The description of a new approach to optimize the shape of a mechanical structure is performed through the analysis of the different steps involved in the case study of a hook. It is an example of an object bounded by free form surfaces subjected to various shape constraints and mechanical requirements. The objective is to minimize the mass. The technique developed proceeds in a CAD software environment through an integrated approach. First, a description of a new mechanism employed to create the deformation of a free form surface is conducted. The resulting deformation is connected to design parameters and relies on an analogy between a mechanical model and the description of a free surface based on a B-spline or a NURBS model. The approach developed largely reduces of the number of optimization parameters, thus reducing drastically the computational effort required during the optimization process. Second, a mesh adaption technique is introduced to adapt and preserve the FE mesh during the optimization process with regard to the shape modification of the hook. This adaption technique is connected to the surface deformation mechanism. Then, the sensitivity analysis required for the optimization process is described according to the geometrical and mechanical aspects of the methods developed. A standard discretized continuous gradient technique is used to evaluate the sensitivity of the mechanical stresses associated to the structure with respect to the mesh node positions. Specific developments are presented to calculate the sensitivity of mesh nodes with respect to the design parameters of the optimization problem. Finally, the optimization process is situated with respect to the CAD software environment and the various treatments required are summarized. The results of the shape optimization are highlighted both on a computational and on a mechanical basis.