Boards joining at arbitrary angles

Hi, something that’s come up pretty often in my initial learning effort is joining two boards together at an angle other than 90 degrees.

For example, the peak in 2x4s on the roof of a house. Simply doing a loop cut on a horizontal rectangle and then dragging the center up won’t preserve the width of the boards, as the edge being dragged will stay the same length, instead of getting longer as the angle decreases.

I’ve tried modeling it with just one side and a mirror modifier, but that doesn’t really solve anything–I want to be able to pick an angle for an edge relative to the long side of the board, and have it figure out what the length of that edge needs to be–seems simple, at least mathematically. Is there some primitive operation I’m missing?

  1. drop in a cube adjust the dimensions to 2x4xWhatever
  2. rotate to match your roof pitch
  3. use edgeslide on the verts at the peak until the verts at the top are alligned along the global X axis.
  4. if you use edgeslide instead of manually translating your verts you will maintain the necessary shape.