The "factor of 40" that you mentioned comes from dividing 1000 by 25 (= 40). Hence dividing a requirement in thousands of an inch by 40 gives the requirement in mm. For example: a requirement of 10 (thousandths of an inch) divided by 40 equals 0.25mm. That is close to the precise value of 0.254 but why compromise? Every computer and calculator can be used to mutiply by 25.4.