Building a Parametric 19" Rack Panel, Hammond 1590BB Pedal & Eurorack DXF/G-Code Engine in TypeScript

2026-12-02来源 dev.toEnglish

Anyone who has ordered a laser-cut 19" 1U Neutrik XLR patch panel from SendCutSend or drilled a die-cast Hammond 1590BB stompbox enclosure by hand has probably learned one of these three costly lessons the hard way:

  1. You placed two Neutrik D-Series XLR jacks at 28 mm center-to-center spacing. The Ø24.0 mm panel bores looked clean in 2D CAD, so you ordered 10 anodized aluminum panels — only to discover the 26 × 31 mm rear connector flanges collide on the back of the plate.
  2. You placed the upper-left potentiometer of a Hammond 1590BB pedal at (12 mm, 82 mm). The 2D top face looks wide open, until your step bit chews straight into the die-cast internal corner screw boss 3 mm below the lid.
  3. You exported an SVG or R2018 spline DXF from Inkscape or Illustrator. Your laser shop rejects the file for open contours, or LightBurn imports the panel at 75% scale because of 96 DPI vs 72 DPI ambiguity.

We just shipped CutPath CAD's Free 19" Rack Panel, Electronics Front Plate & Pedal Enclosure DXF Generator — a 100% browser-native parametric CAD/CAM engine written in pure TypeScript that eliminates every one of those failure modes before a single millimeter of aluminum, steel, or FR4 is cut.

Here is the exact mechanical geometry, keep-out DRC math, and AutoCAD R12 (AC1009) polyline export pipeline behind it.

1. Exact Industry Chassis Standards (Zero Guesswork)

Electronics enclosures are unforgiving about 0.3 mm tolerances. Rather than freehand rectangles, we codified the exact published standards directly into src/lib/cad/enclosurePanelDxf.ts:

Chassis Standard Exact Outer Width Exact Outer Height Mounting & Keep-Out Spec
19" 1U EIA-310 Rack 482.60 mm (19.000") 44.45 mm (1.750") 4× 10.5 × 6.5 mm oblong rack slots at 465.1 mm H × 31.75 mm V pitch; 16.5 mm left/right rail keep-outs
19" 2U EIA-310 Rack 482.60 mm (19.000") 88.90 mm (3.500") 4× EIA-310 rack slots at 465.1 mm H × 76.20 mm V pitch; 16.5 mm side rail keep-outs
19" 3U EIA-310 Rack 482.60 mm (19.000") 133.35 mm (5.250") 4× EIA-310 rack slots at 465.1 mm H × 57.15 mm V pitch; 16.5 mm side rail keep-outs
Hammond 1590BB Pedal 119.50 mm 94.00 mm 4× 13 × 13 mm internal cast corner screw-boss keep-out zones
Hammond 125B Pedal 122.00 mm 66.50 mm 4× 11 × 11 mm internal cast corner screw-boss keep-out zones
Eurorack 3U (Doepfer A-100) (HP × 5.08) − 0.30 mm 128.50 mm 4× 5.5 × 3.2 mm M3 oblong rail slots at 3.0 mm from top/bottom; 10.0 mm horizontal extrusion rail keep-outs

Notice the Eurorack A-100 formula: a 16HP module is never 16 × 5.08 = 81.28 mm. Doepfer subtracts 0.30 mm mechanical tolerance (80.98 mm) so adjacent modules slide cleanly onto a 104HP case without binding.

2. True Component Geometry (Not Just Circles & Boxes)

Most online panel templates only punch simple circles or rectangles and leave you to drill mounting holes by hand. Our parametric cutout engine synthesizes exact mechanical geometry for 11 real-world hardware families:

  • Neutrik D-Series (XLR, EtherCON, SpeakON, USB, OpticalCON): Ø24.0 mm bore (plus user fit clearance) paired with 2× Ø3.4 mm diagonal M3 mounting holes on the exact 19.0 mm × 24.0 mm Neutrik D-housing diagonal pitch, plus a 26 × 31 mm rear flange envelope.
  • IEC 60320 C14 AC Power Inlet: Beveled-top 27.5 × 20.0 mm keyed polygon (4 mm 45° top chamfers) + 2× Ø3.4 mm flange holes at 40.0 mm center-to-center.
  • 22 mm Industrial E-Stop / Pushbutton: Single closed-contour polygon combining the Ø22.3 mm bore and the integral 3.2 × 1.8 mm top anti-rotation keyway notch — never overlapping circles that confuse plasma/laser CAM lead-ins!
  • DB9 / DB15 D-Sub Connector: True 10° sloped trapezoidal opening with 2.2 mm corner fillets + 25.0 mm M3 jackscrew holes.
  • Rotary Potentiometers (Alpha 16 mm / Bourns): Ø7.2 mm shaft bore + optional Ø3.2 mm anti-rotation locating tab hole offset 7.8 mm left + 270° radial dial tick marks (-225° to +45°) rendered as crisp zero-open capsules on ENGRAVE_LABELS.
  • Cooling Fan Grille (40 / 60 / 80 / 120 mm): 4-rib concentric finger-safe slotted shroud (8 true closed arc-sector slots) + 4× M4 corner mounting holes (50.0 mm square pitch for 60 mm fans).

Here is how we fuse the 22 mm E-Stop bore and its anti-rotation keyway into a single watertight closed polygon (so laser kerf compensation never breaks):

function keyedPushbuttonPolygon(cx: number, cy: number, radius: number, notchW = 3.2, notchDepth = 1.8): Point2D[] { const halfW = Math.min(notchW / 2, radius * 0.45); const startAngle = Math.asin(halfW / radius); // right edge of top notch const notchY = cy + Math.sqrt(Math.max(0, radius * radius - halfW * halfW)) + notchDepth; const pts: Point2D[] = [ { x: cx - halfW, y: notchY }, { x: cx + halfW, y: notchY } ]; // Sweep clockwise from top-right around the circle back to top-left const aStart = Math.PI / 2 - startAngle; const aEnd = -(3 * Math.PI) / 2 + startAngle; const steps = 48; for (let i = 0; i <= steps; i++) { const a = aStart + ((aEnd - aStart) * i) / steps; pts.push({ x: cx + Math.cos(a) * radius, y: cy + Math.sin(a) * radius }); } return pts; } 

3. Five-Point Live Mechanical & Fabrication DRC

Every parameter edit re-runs a live 5-check engineering DRC suite in under 2 milliseconds:

  1. Rear Body & Flange Clearance: Tests every placed component's rotated rear-body AABB (e.g., 26 × 31 mm Neutrik housing, 18 mm pot knob skirt, 60 mm fan body) against every other component. Zero hidden rear-panel collisions.
  2. Rail / Screw-Boss Keep-Out Zones: Checks every cutout and mounting hole against EIA-310 rack rails (16.5 mm left/right), Hammond 1590BB/125B internal cast corner screw bosses, and Eurorack 10 mm top/bottom extrusion rails.
  3. Minimum Metal Web Bridge: Measures the exact minimum sheet-metal ligament between adjacent openings (≥ 2.2 mm for 16ga steel / ≥ 2.5 mm for 2.0 mm 5052 aluminum) to prevent laser heat distortion or CNC chatter.
  4. Laser Kerf / Endmill Aperture Fit: Confirms the smallest opening clears your chosen material's laser kerf (0.18 mm) or CNC O-flute endmill (3.175 mm).
  5. AutoCAD R12 Zero-Open CAD Audit: Runs our built-in open-contour DXF verifier on the exported AC1009 file before download — guaranteeing 100/100 cut-readiness and 0 open contours.

4. Clean 4-Layer R12 DXF, 1:1 LightBurn SVG & Multi-Pass CNC G-Code

Every export separates geometry cleanly onto 4 shop-ready CAM layers:

  • OUTER_PANEL — Panel perimeter profile
  • CUTOUTS — All connector openings & fan grille slots (strictly closed CCW polylines)
  • MOUNT_HOLES — EIA-310 rack-ear slots, Eurorack rail slots, and M3/M4 flange holes
  • ENGRAVE_LABELS — Vector legends (CH 01, AC 120V, GAIN, FREQ) and 270° potentiometer dial ticks for fiber laser marking or CNC V-engraving

Plus, one click generates multi-pass CNC aluminum/FR4 milling G-code (GRBL / Shapeoko, Mach3 / Mach4, LinuxCNC, Haas / Fanuc) with inside-first hole & cutout ordering and opens it directly in our Free 3D G-Code Viewer, or hands the outer+cutout R12 DXF straight into WB-04 4×8 Sheet Nesting to pack 52–100 panels onto a full sheet of 5052 aluminum.

Try It Free (No Sign-Up Required)

原文:https://www.a8q9.cn/en/article/building-a-parametric-19-rack-panel-hammond-1590bb-pedal-eurorack-dxf-g-code-eng-398f84.html

相关文章