Shape optimization of stop holes