Optimization of the femur prosthesis is a key issue in femur replacement surgeries that provide a viable option for limb salvage rather than amputation. To overcome the drawback of the conventional techniques that do not support topology optimization of the prosthesis design, a parameterized level set method (LSM) topology optimization with arbitrary geometric constraints is presented. A predefined narrow band along the complex profile of the original femur is preserved by applying the contour method to construct the level set function, while the topology optimization is carried out inside the cavity. The Boolean R-function is adopted to combine the free boundary and geometric constraint level set functions to describe the composite level set function of the design domain. Based on the minimum compliance goal, three different designs of 2D femur prostheses subject to the target cavity fill ratios 34%, 54%, and 74%, respectively, are illustrated.