Z-ring force and cell shape during division in rod-like bacteria