If you are trying to make these two parts fit then the thread doesn't have to standard. But if one part 40mm od and the other is 40mm id then there is no stock for threads. example if 40mm is your id then your od would have to be 41.376 so with a pitch of 1.27 (20tpi) your minor would be 40mm.