Combined thermoforming and manufacture of the preform