3D folding mask machine