I am trying to use tolerance scripts to realistically model my lab’s compensation procedure. The system consists of several lenses mounted in two lens barrels that fit together. If the performance of the system is not compliant, then one of the barrels is rotated 90º with respect to the other and the performance is checked again; subsequently it can be rotated 180º or 270º as needed.

I am thinking to model this by using multi-configuration for each of the barrel rotation options (0º, 90º, 180º, 270º), but as the system is nominally rotationally symmetric, this by itself will not do anything. I want to know how to apply the rotation AFTER the tolerance values (on lens wedge, tilt, shift, etc.) are selected for each Monte Carlo trial, so that I can rotate the directional tolerances for the lenses in the first barrel with respect to the tolerances for the lenses in the second barrel. For example, if a lens in barrel #1 has a tilt of 0.062º +X in a Monte Carlo trial, I want to compare this with a Monte Carlo trial where all lenses in barrel 2 have their previous tolerance values, but the lens in barrel #1 now has a tilt of 0.062º +Y/-Y/-X.

Furthermore, is there a way to save the tolerance values for a Monte Carlo trial for use in subsequent Monte Carlo trials? I would also like to model the effect of swapping one set of (barrel #1 + its lenses) with another set of (barrel #1 + its lenses), to compare which of the two barrels has a better performance when fit with barrel #2.

**Best answer by Jeff.Wilde**