DEV Community

Cover image for Building a Browser-Native CNC Plasma Angle Grinder & Welding Clamp Wall Rack DXF/G-Code Generator
CutPath CAD
CutPath CAD

Posted on

Building a Browser-Native CNC Plasma Angle Grinder & Welding Clamp Wall Rack DXF/G-Code Generator

Most CNC plasma hobbyists and small metal fab shops share two frustrations: first, static $5-$12 marketplace DXFs for wall-mounted tool racks rarely match exact tool neck widths or 16-inch wall studs; second, almost nobody running a garage Langmuir CrossFire or small 4x4 plasma table owns a $4,000 hydraulic press brake to bend 14-gauge steel cleanly.

We just shipped Utility #52 in CutPath CAD: a pure-TypeScript, browser-native Parametric CNC Plasma Angle Grinder, Welding Clamp & Shop Tool Wall Rack DXF & G-Code Generator.

Here is how we engineered the parametric sheet-metal flat-pattern kernel (shopRackDxf.ts), the hand-bend stitch-slot relief solver, the single-polygon keyhole geometry, the cantilever beam stress DRC, and the 4x8 production batch nester with zero external dependencies.

1. Hand-Bend Stitch Slots vs. Press-Brake K-Factor Flat Patterns

Every wall-mounted steel rack folds at least one cantilevered 90-degree shelf (and up to three 90-degree bends when including a lower flap-disc shelf and front retaining lip). Before emitting a single vertex, the engine computes true neutral-axis bend allowance:

const kFactor = 0.42;
const insideBendR =
  cfg.formingMode === 'hand_bend_stitch'
    ? Math.max(1.5, t * 1.0)
    : Math.max(2.0, t * 1.25);
const bendAllowanceMm = (Math.PI / 2) * (insideBendR + kFactor * t);
Enter fullscreen mode Exit fullscreen mode

When Hand-Bend Stitch Mode is selected, the generator places calibrated stadium perforation slots along every 90-degree bend centerline with solid metal webs scaled to plate thickness (webMm = clamp(t * 1.9 + 0.8, 3.8, 7.5) mm). That lets any fabricator clamp the flat-cut sheet along a workbench edge, fold crisp 90-degree flanges by hand, and lay three 1/2-inch MIG tacks along the inside seam.

Switching to Press-Brake Mode removes the stitch slots and injects corner bend-relief notches (depth = max(4.5, t * 2.2) mm) directly into the continuous outer profile polyline so the press die never tears edge flanges.

2. Single-Loop Plasma-Safe Keyhole Anchors (Zero Self-Intersections)

A classic CAD mistake for wall-mounted metal racks is exporting a keyhole mounting slot as two overlapping circles/rectangles—causing SheetCam or FireControl to double-burn the intersection or reject the open loop.

Instead, keyholePts() computes the exact tangent angle theta = Math.asin(shankR / entryR) where the 6.8 mm upper shank slot meets the Ø12 mm lag-bolt entry bore, emitting one continuous closed counterclockwise polygon:

function keyholePts(
  cx: number,
  cyEntry: number,
  entryR = 6.0,
  shankR = 3.4,
  shankRise = 13.5
): Pt2[] {
  const pts: Pt2[] = [];
  const theta = Math.asin(Math.min(0.92, shankR / entryR));
  const topY = cyEntry + shankRise;

  for (let i = 0; i <= 10; i++) {
    const a = (Math.PI * i) / 10;
    pts.push({ x: cx + shankR * Math.cos(a), y: topY + shankR * Math.sin(a) });
  }
  const startA = Math.PI / 2 + theta;
  const endA = 2.5 * Math.PI - theta;
  for (let i = 0; i <= 20; i++) {
    const a = startA + ((endA - startA) * i) / 20;
    pts.push({ x: cx + entryR * Math.cos(a), y: cyEntry + entryR * Math.sin(a) });
  }
  return pts;
}
Enter fullscreen mode Exit fullscreen mode

Every rack automatically checks its width against 16-inch (406.4 mm) or 24-inch (609.6 mm) On-Center wall framing so lag screws always anchor into real studs.

3. Cantilever Bending Stress & 4x8 Sheet Production Economics

Every configuration runs a live 5-rule Design Rule Check (A36 36,000 PSI cantilever bending safety factor, stud-span alignment, 1.5x plasma minimum bore-to-thickness rule, forming mode check, and strict AutoCAD R12 AC1009 closed-contour inspection) plus an automated 0° / 90° / hybrid 4x8 steel sheet batch packer:

Preset Archetype Steel Gauge Flat Pattern Racks / 4x8 Sheet Net Yield Cantilever SF Est. Steel / Rack
4-Bay Angle Grinder & Disc Rack 14ga (1.90 mm) 524 x 474 mm 10 racks 70.2% 2.4x @ 36 lb ~$9/ea
Heavy Welding Clamp & Vise-Grip Rack 11ga (3.04 mm) 820 x 302 mm 8 racks 55.9% 6.3x @ 58 lb ~$17/ea
8-Can Aerosol & Brake-Cleaner Rack 14ga (1.90 mm) 772 x 396 mm 6 racks 51.8% 10.0x @ 18 lb ~$15/ea
5-Bay Cordless Drill & Charger Station 14ga (1.90 mm) 586 x 519 mm 8 racks 68.8% 2.6x @ 32 lb ~$11/ea
Welding Helmet, Torch & TIG Rod Station 11ga (3.04 mm) 537 x 494 mm 8 racks 59.9% 7.3x @ 28 lb ~$17/ea
12-Slot Pliers, Hammers & Ratchet Rack 16ga (1.52 mm) 556 x 244 mm 18 racks 69.0% 7.3x @ 22 lb ~$6/ea

4. Interior-First Plasma .TAP G-Code & Direct Workbench Handoffs

The generator orders every closed loop into [...interiorHoles, ...outerProfile] before outputting RS-274D plasma .TAP G-code—guaranteeing every keyhole, stitch slot, and aerosol ring pierces and cuts while the sheet is still anchored to the full skeleton.

Users can click straight from /shop-rack-dxf into our 3D G-Code Backplot Viewer to inspect every M3 pierce point, or push a mixed multi-rack cutlist directly into WB-04 4x8 Sheet Nesting to nest grinder racks alongside custom plasma logos from WB-01 Plasma DXF.

Try It Free (No Signup, 100% Client-Side)

Top comments (0)