Roof geometry
The geometry of a gable, hip or shed roof over a rectangular plan: the pitch as rise per 12, angle and percent, the slope factor, the ridge height and length, the common, hip, valley and jack rafter lengths with their cuts, and the plan and sloped areas of every roof plane. Use it to lay out rafters, to find the true length of a hip for its design, or to turn plan loads and areas into roof surface areas. Nothing is sized: design the rafters, hips and valleys in their material modules.
Inputs of the roof geometry #
- Roof: gable (two planes to a ridge), hip (four planes; the end planes may have their own pitch) or shed (one plane from a low plate to a high one).
- Length L and width W: between the outside faces of the wall plates (the plate lines, where the rafter's measuring line crosses the wall). L runs along the ridge; on a hip roof it is the longer side.
- Pitch: as rise per 12 (6 for 6:12), as an angle, or as a slope in percent. A hip roof can have steeper or flatter end planes.
- Eave and rake overhangs: horizontal, from the plate lines to the eave and rake lines. A hip roof has the eave overhang all around.
- Plate height: for the ridge height above your datum.
- Ridge board thickness: half of it, measured level, is taken off the common rafters and, across their plan angle, off the hips. 0 gives the theoretical lengths to the ridge centre, as on the framing square.
- Rafter spacing: for the jack rafters of a hip roof.
- Intersecting wing span: a gable wing at the same pitch meeting the roof at right angles gives two valleys; 0 for none.
The roof geometry has no auto-design: there is nothing to size.
Checks performed #
| Result | Basis |
|---|---|
| Pitch, angle, slope, slope factor; common and hip length per foot of run | tan θ = rise / run; slope factor 1/cos θ; the framing-square rafter table |
| Rise, ridge height, common rafter (with tail and ridge deduction), ridge length | Right-triangle trigonometry on the measuring line |
| Hips: plan length and angle, true length, slope, extension to the eave, side cuts | The hip as the intersection of two planes; equal pitches at 45° in plan |
| Jack rafters: lengths and the difference between them | Spacing × the hip's plan ratio × slope factor |
| Valleys of an intersecting wing | As the hips, at the wing's run |
| Plan and roof surface areas, plane by plane | The eave outline clipped where one plane is lower than another; area / cos θ of each plane |
| Advisory: low slope | Below 2:12: check the roof covering's minimum slope |
Limitations of the roof geometry #
- Rectangular plans with flat planes; no dormers, crickets, turrets, curved or gambrel roofs. An intersecting wing is at the main pitch and at right angles, and is not drawn on the plan.
- Lengths are on the measuring line; cuts for the heel, birdsmouth, fascia and the rafter depth are not deducted. The ridge deduction is the only one.
- Equal horizontal overhangs on planes of unequal pitch give eaves at different heights; the areas follow the planes as entered.
- The framing-square table values are quoted from knowledge (to confirm against a printed table); the trigonometry is exact.
Verification examples #
Verification status: 27 values compared in 7 examples (0 published, 7 hand calculations from the cited equations): 27 within tolerance, 0 recorded deviations. No published example: every value is a hand calculation. That checks the program against this reading of the code, not the reading itself. Code basis: written without the code document on hand, and confirmed only in part through published examples.
| Example | Source | Values |
|---|---|---|
| Hip roof 40 ft × 30 ft at 6:12 | Hand trigonometry; framing-square table (13.42, 18.00, 17 7/8 in.) | Angle, lengths per foot, common, hip, β, ridge, area, jacks, side cuts |
| Rafter table at 12:12 | Framing-square table (16.97, 20.78 in.) | Common and hip per foot of run |
| Steeper ends (8:12 and 12:12) | Hand calculation | End run, ridge, hip, area |
| 2 ft overhang | Hand calculation | Area, common rafter, hip to the eave |
| Gable with eaves and rakes | Hand calculation | Area, ridge, plan area |
| Valleys of a 20 ft wing | Hand calculation | Valley length |
| Gable 10 m wide at 30° | Hand calculation (metric) | Rise, common rafter |
No published worked example of roof framing geometry is on hand; the framing-square values are as printed on the square, quoted from knowledge.