Partial collapsing and the spectrum of the Hodge–de Rham operator