DEV Community

Cover image for Engineering a Parametric Cribbage Board CNC DXF: Hairpin Wall-Web DRC, Two-Stage Peck-Drill G-Code & Magnetic Peg Vault
CutPath CAD
CutPath CAD

Posted on

Engineering a Parametric Cribbage Board CNC DXF: Hairpin Wall-Web DRC, Two-Stage Peck-Drill G-Code & Magnetic Peg Vault

If you run a CNC router (Shapeoko, Onefinity, X-Carve, Avid CNC, or Mach3) in December, there is a high chance a 3-track black walnut cribbage board is sitting on your spoilboard right now.

It looks deceptively simple—just a rounded slab with 370 to 493 little 1/8" holes—until you actually mill one and hit the four classic woodshop failure modes:

  1. Hardwood blowout on the inner 180° hairpin bends. Spacing concentric curved tracks by chord length squeezes the innermost track until adjacent Ø3.30 mm holes leave less than 1.0 mm of fragile short-grain walnut between them.
  2. Brass 1/8" pegs jamming tight after Danish oil or Rubio Monocoat. Drilling exact 3.175 mm (0.125") holes feels snug in raw wood, then binds solid as soon as oil swells the fibers.
  3. Burnt walnut & snapped 1/8" router bits. Plunging 370 consecutive holes full depth (G1 Z-9.5) in a single pass packs resinous hardwood dust into the flutes and overheats carbide around hole #180.
  4. Flip-side rear peg storage pockets breaking through front holes. Routing a 12 mm deep magnetic peg vault directly under 9.5 mm deep front peg holes in 19 mm (3/4") stock punches clean through the board.

We just shipped a free, browser-native Cribbage Board & Peg Game CNC DXF, SVG & Peck-Drill G-Code Generator (part of CutPath CAD) that solves all four mathematically before you waste a $35 walnut blank.


1. Exact Parallel Stadium & Circular Track Geometry (Zero Inner-Bend Crowding)

A classic continuous tournament cribbage board has 24 streets of 5 holes (120 points per player) plus Start holes and the #121 finish hole.

To keep every single hole across 2, 3, or 4 parallel lanes visually crisp without pinching the inner hairpin curve, we split the stadium loop into 10 streets on each straight (50 holes) and 2 streets on each 180° bend (10 holes):

// Allocate 5-hole streets with an explicit 1.68x inter-street gap ratio
const streetGapRatio = 1.68;
const unitCount = strStreets * 4 + (strStreets - 1) * streetGapRatio;
const pitch = totalSpan / unitCount;
const streetGap = pitch * streetGapRatio;
Enter fullscreen mode Exit fullscreen mode

On a standard 16.5" × 4.75" (419.1 × 120.65 mm) 3-track continuous walnut board, that yields:

  • 370 exact peg holes (3 × 120 track holes + 9 Start holes + #121 Finish)
  • 2.00 mm minimum solid hardwood wall between the tightest adjacent holes (verified by an $O(n^2)$ pairwise hole-distance DRC check on every parameter change)
  • 8.9 mm outer perimeter rim, leaving plenty of solid edge for a 1/8" or 1/4" roundover or chamfer bit.

On the Ø12" (304.8 mm) Circular 3-Track Medallion Board, all 3 × 120 holes wrap 330° around the outer ring (leaving a clean 30° Start/Finish gate at 12 o'clock) and preserving an unobstructed Ø215 mm center medallion sized for an epoxy inlay or a 3D carved centerpiece from WB-02 3D Relief STL.


2. Two-Stage Chip-Break Peck-Drill CNC G-Code (GRBL, Onefinity, Mach3, LinuxCNC)

Instead of relying on canned G83 drill cycles (which hobby GRBL controllers reject outright), the engine emits universal, street-ordered two-stage chip-break peck moves for every hole:

(OP 1: Street-Ordered Two-Stage Chip-Break Peck Drilling — 370 holes)
G0 X-146.225 Y-45.700
G0 Z2.50
G1 Z-4.75 F450   (Stage 1 chip-break peck)
G0 Z2.50         (Full rapid retract clears packed walnut dust)
G1 Z-9.50 F450   (Stage 2 final depth)
G0 Z6.00
Enter fullscreen mode Exit fullscreen mode

Followed automatically by:

  • OP 2: Shallow Z-1.20 mm engraved 5-hole street dividers & skunk lines (60 and 90)
  • OP 3: Stepped 3.2 mm DOC outer stadium/circle/triangle perimeter profile
  • OP 4: Commented flip-side 92 × 28 × 12.0 mm rear magnetic peg storage vault spiral clearing centered on X0 Y0

You can click Inspect 3D Peck-Drill Toolpath directly inside /cribbage-board-dxf to open all 2,895+ moves in the free interactive 3D CNC G-Code Backplotter and verify every peck plunge before touching wood.


3. Rear Magnetic Peg Storage Vault & Floor Safety Web DRC

Our Back-Side Magnetic Peg Vault view overlays the flip-side setup right over ghosted front peg holes so you can confirm zero interference visually and numerically:

  • Vault pocket: 92 × 28 × 12.0 mm deep with R3.5 mm corners matching a standard 1/4" endmill (holds 9–12 standard 1" metal cribbage pegs)
  • Dual N52 magnet pockets: 2× Ø6.10 mm × 3.2 mm press-fit bores flanking the vault ends for standard 6 × 3 mm N52 neodymium magnets
  • Floor Safety Web DRC: Verifies stockThicknessMm - vaultDepthMm >= 5.0 mm (7.0 mm solid walnut floor remaining in 19 mm stock) and flags any unsafe depth immediately
  • Clean AutoCAD R12 DXF (AC1009): Places Front Board and Flip-Side Rear Setup cleanly side-by-side on separate CAM layers (BOARD_OUTER_CUT, PEG_DRILL_HOLES, ENGRAVE_DIVIDERS, BACK_PEG_VAULT, MAGNET_BORES) scoring 100/100 · 0 open paths · 0 floating islands.

Try It Free (Zero Sign-Up) & Full CNC Reference Guides

Top comments (0)