It’s easier to glue the foam to the inside panels before they are installed in the airplane.
Cardboard templates were used for cutting the foam:
The adhesive holds good but only when the surface is clean, Acetone was used for cleaning.
All foam pieces are glued in place: