Fast and flexible: How to design a mask-making machine