Q:

Thomas-Wigner rotation of a stick directly from the Lorentz Transformation

I'm trying to better understand Thomas-Wigner rotation.
I understand how to calculate it for the case of a perpendicular pair of boosts.
But I also want to see the rotation more directly. The effect is purely kinematic. It's all within the Lorentz Transformation (LT). It's therefore possible to see the rotation using a pair of LT boosts on some suitable histories.
I'm not seeing the correct outcome when I do this. Is my algorithm (below) correct?
Notation used here involves three frames:

K boosted along the X-axis to K'.
then a second boost along the Y-axis of K' to K''.

I examine the histories of the endpoints of a stick.

the stick is stationary in K'', and it lies along the X''-axis in K''
I get the histories (worldlines) of the end-points of the stick (simple, because the stick is stationary in K'')
I then reverse-boost from K'' to K' to K. (I call this reverse because the usual direction is from K to K' to K'')
in K, I find two events, one on each history, that are at the same coordinate-time in K. This is a time-slice across the two histories. A time-slice is needed whenever you need to measure spatial geometry.
I take the difference between the two events, to get a displacement 4-vector in K, whose ct-component is 0
this displacement 4-vector gives me the geometry of the stick as seen in K
I infer the angle of the stick with respect to the X-axis in K

It doesn't work. I see rotation and contraction of the stick. The rotation is in the right direction, but it's way too big. Example data:

boost 1 [Y,-0.6c]
boost2 [X,-0.8c]
length of the stick in K: 0.76837 (length is 1.0 in K'')
Rotation of the stick from time-slice of histories in K: -38.6598 degrees
Thomas-Wigner angle calculated directly from a formula: -18.92464 degrees

The formula is $\tan \theta = - (\gamma1 * \gamma2 * \beta1 * \beta2)/(\gamma1 + \gamma2$)
(Although you should concentrate on the algorithm stated above, the actual code is here, if it helps.)

A:

The algorithm is correct in that it shows the geometry of the stick in frame K. But the geometry of the stick is affected not only by Thomas-Wigner rotation, but also by the regular flattening (length contraction) that happens with all boosts.
So there are two effects here, not one.
The first is the spatial flattening (length contraction) that happens with all boosts, of course.
Spatial flattening changes not only lengths, but angles and shapes. In the present case, it changes the orientation of the stick.
The second effect is the Thomas-Wigner rotation. The result I have from the algorithm stated above reflects both of these effects (in the position of the stick as measured in K).
(All angles in degrees. All measurements in the K frame.)
A:Equivalent-boost direction: 24.2277 from the X-axis.
B:Angle of the stick from manual calc in code : 38.6598 from the X-axis
A+B: angle of stick: 62.8875 from the direction of equivalent-boost
C:Thomas-Wigner rotation from a formula: 18.9246 from the X-axis
D: flattening (length contraction) of (A + C) from a formula: 62.8875 from the direction of equivalent-boost (same as above)
So it seems to all agree, when the two effects are taken into account.
The formula for the change in orientation of a stick (used in D) is:
$\tan \theta' = \gamma * \tan \theta$

