Casimir effect for bodies of arbitrary size