As far as I can tell when looking at the model IRL, the fact that the gray liftarm has divots in the side is critical to this working. The gray stopper piece that it slides by seems to only clear because of those divots. (It's hard to see for sure in the fully assembled model, and I'm not going to take mine apart to look.)
Note: I realize this doesn't answer your math question, but it changes the pertinent geometry that you're trying to figure out.
Note: I realize this doesn't answer your math question, but it changes the pertinent geometry that you're trying to figure out.