Casimir force between planes as a boundary finite size effect