Building stairs on a CNC router or 4x8 CNC plasma table looks deceptively simple—just a sawtooth polyline—until your first deck build fails an IRC R311.7 inspection because Step #1 is 1.5 inches taller than Steps #2–#4, or two 1/4-inch A36 steel stringers waste 26% of an expensive plate because you nested them right-side up.
When we built CutPath CAD's free browser-native Parametric CNC Stair Stringer & IRC R311.7 DXF Generator, we replaced hand-drawn approximations with deterministic trigonometry, a 5-rule IRC building code DRC engine, and an exact collision-free 180-degree zipper nesting solver in pure TypeScript.
Here is the exact geometry and CAM pipeline behind it.
1. Why the Bottom Step Always Fails Inspection (Drop-Cut Subtraction)
IRC R311.7.5.1 caps residential riser height at 7.75" (196.85 mm) and allows at most 3/8" (9.5 mm) variance between the tallest and shortest step in the flight.
On every upper step, adding a 1.50" (38.1 mm) thick 2x6 deck tread adds +1.50" to the step above and +1.50" to the step below—so the step-to-step height cancels out and stays at exact unit rise R.
At the ground floor, however, there is no tread underneath Step #1. If you cut the bottom riser at full unit rise R, installing the 1.50" tread produces a 9.00" first step—an instant trip hazard and failed inspection.
The exact geometric correction is bottom tread-drop subtraction:
actualRise = totalVerticalRise / riserCount firstRiserCut = actualRise - treadThickness seatCutLength = firstRiserCut / tan(pitchAngle) For a standard 30-inch backyard deck (4 risers at 7.50" rise, 10.75" run, 1.50" 2x6 treads):
firstRiserCut = 7.50" - 1.50" = 6.00"- Once the
1.50"deck board is fastened on top, finished Step #1 measures exactly7.50"—zero variance across the entire flight.
2. Exact Perpendicular Structural Throat Depth
The second classic failure is notching a 2x10 (9.25" actual width) for full residential steps. The perpendicular solid lumber remaining behind the deepest inner step notch—the structural throat depth—is governed by the altitude of a right triangle formed by rise R and tread run T:
stepHypotenuse = sqrt(R^2 + T^2) notchDepthPerp = (R * T) / stepHypotenuse throatDepth = stockWidth - notchDepthPerp IRC requires at least 3.50" (88.9 mm) of continuous solid wood behind notched stringers, while architectural 1/4-inch steel plate spans need >= 4.50" (114.3 mm) to suppress mid-span harmonic bounce.
Checking our 7.50" x 10.75" example:
stepHypotenuse = sqrt(7.50^2 + 10.75^2) = 13.107"notchDepthPerp = (7.50 * 10.75) / 13.107 = 6.151"- On a 2x10 (
9.25"):throatDepth = 3.10"-> FAIL (< 3.50" IRC) - On a 2x12 (
11.25"):throatDepth = 5.10"-> PASS (45% safety margin)
3. Collision-Free 180-Degree Interlocked Zipper Nesting
Notched stair stringers are complementary sawtooth waves. Flipping every odd-indexed stringer 180 degrees and interlocking its peaks into the upright stringer's valleys shrinks total nested sheet/plate width dramatically.
Rather than using a brittle heuristic overlap constant that risks plasma kerf collisions at steep pitches, our TypeScript engine runs a deterministic upper/lower polygon envelope sweep:
function solveExactZipperPair( uprightOuter: Pt2[], invertedOuter: Pt2[], flatW: number, flatH: number, stepHyp: number, gapMm: number ): { bestDx: number; bestPy: number } { let bestPy = flatH + gapMm; let bestDx = 0; const minDx = -Math.min(stepHyp * 0.55, 220); const maxDx = Math.min(stepHyp * 0.55, 220); for (let k = 0; k <= 28; k++) { const dx = minDx + ((maxDx - minDx) * k) / 28; let requiredPy = 0; const xStart = Math.max(0, dx); const xEnd = Math.min(flatW, flatW + dx); for (let s = 0; s <= 90; s++) { const x = xStart + ((xEnd - xStart) * s) / 90; const upY = sampleEnvelopeY(uprightOuter, x, 'max'); const invLowY = sampleEnvelopeY(invertedOuter, x - dx, 'min'); if (upY !== null && invLowY !== null) { requiredPy = Math.max(requiredPy, upY - invLowY + gapMm); } } if (requiredPy < bestPy) { bestPy = requiredPy; bestDx = dx; } } return { bestDx, bestPy }; } At every horizontal phase shift dx, the solver enforces py + lowerY_inverted(x - dx) >= upperY_upright(x) + kerfWebGap across 90 cross-sections—guaranteeing zero polygon overlap while saving 16.8% to 26% of 4x8 / 5x10 plate or plywood strip width.
4. Strict AutoCAD R12 DXF & Interior-Before-Outer CNC / Plasma G-Code
Every exported DXF runs through our built-in geometric readiness auditor before download (100/100 score, 0 open paths, 0 floating islands, strict AC1009 closed POLYLINE entities on clean CAM layers: OUTER_PROFILE, MORTISE_POCKETS, BOLT_HOLES, TREAD_PLATES).
For CNC Plasma Steel Plate staircases (1/4" or 3/8" A36 with bolt-on steel tread flanges), our .TAP post-processor strictly sequences every BOLT_HOLES M3 torch pierce (with IHS probe + pierce delay) before releasing any outer contour—preventing slat tip-ups and preserving concentricity on all 4x 10.5 mm concealed wood-tread lag bolt holes.
For CNC Router Housed Closed-Stringers, .NC output machines all OP1 1/2"-deep bullnose tread and riser mortise pockets before profiling the outer oak skirt.
Try It Free in Your Browser
No signup, no watermarks, no cloud upload—everything computes locally in your browser:
- Free CNC Stair Stringer & IRC R311.7 Generator: https://www.cutpathcad.com/stair-stringer-dxf
- IRC R311.7 Throat Depth & Drop-Cut Engineering Guide: https://www.cutpathcad.com/tools/cnc-stair-stringer-dxf-irc-r311-throat-depth-drop-cut-guide
- 1/4" & 3/8" CNC Plasma Steel Stringer Nesting Guide: https://www.cutpathcad.com/tools/cnc-plasma-steel-stair-stringer-dxf-4x8-5x10-nesting-guide
- WB-04 4x8 & 5x10 True-Shape Nesting Workbench: https://www.cutpathcad.com/sheet-nesting
