Optimizing wall thickness