Finding Angle and Length of Brace Given Unknown Dimension. My trig knowledge is old and rusty so given a known width $x$ and height $y$ and the width of the brace $w$, how would I calculate for $θ_2$ given the unknown value of $z$?
The $x$ and $y$ values can vary so I need an equation I can plug the values in to find $θ$ and the minimum length of the diagonal brace for cutting at the correct angle and length respectively.

EDIT: Thanks for all the help. I found a diagram which allows me to get the perfect cut angle and length quickly here: http://homesteadlaboratory.blogspot.com/2014/06/gate-brace-math.html
$w$ = width of brace
$h$ = length of dashed line $= \sqrt{y^2+x^2}$
$\theta_1 = \arcsin\left(\dfrac{y}{h}\right)$
$\theta_2 - \theta_1 = \arcsin\left(\dfrac{w}{h}\right)$
$\theta_2 = \theta_1 + \arcsin\left(\frac{w}{h}\right)$
Works perfectly every time.
 A: You have the values for the opposite = y and adjacent = x, so using soh cah toa (s = sin(θ), c = cos(θ), t = tan(θ), o = opposite, a = adjacent, h = hypotenuse) the known values match that of tangent
So, we need to use, tan(θ) = opposite/adjacent
Solving for θ,
θ = arctan(opposite/adjacent)
Plugging in your variables,
θ = arctan(y/x)

Similarly, to find the length of b we need to find the length of the hypotenuse
Since, we know opposite = y, and the angle θ we can use,
sin(θ) = opposite/hypotenuse 
Solving for b = hypotenuse, and plugging in your values
b = y/sin(θ)

The complete formula for the length of b would be, 
b = y/sin(arctan(y/x))

Albeit, the length b does not take into account the cut edges of b, the value found would be for the edge nearest to θ. But if the cuts on both sides are uniform, due to being a parallelogram the far and near lengths of b will be equal.  
If you need a quick calculation you can use this link and enter the values of x and y that you need
http://www.wolframalpha.com/input/?i=y+%3D+1+and+x+%3D+1+y%2Fsin(arctan(y%2Fx))
A: We have
$$
\cases{
x=h+z\\
\sin\theta_2 = \frac wh\\
\tan\theta_2 = \frac yz
}
$$
From here
$$
\frac{\frac wh}{\sqrt{1-\left(\frac wh\right)^2}}=\frac {y}{x-h}
$$
and solving for $h$ we arrive at
$$
\cases{
h = \frac{w y\sqrt{x^2+y^2-w^2}-w^2 x}{y^2-w^2}\\
z=\frac{x y^2-w y\sqrt{x^2+y^2-w^2}}{y^2-w^2}
}
$$
etc.
