Integrated CAD by Optimization