Optical-mechanical tolerance assignment to minimize production costs (A)