Open-source 2D CAD that runs in the browser. Every drawing operation is a function call. Script it, automate it, point an AI at it.

DWG in the browser

Opens .dwg files (R13–R2018) with infinite vector zoom. Vello/WebGPU rendering, egui CPU fallback.

Scriptable API

Every operation is a call like cad.addLine(). Drive it from the console, your own code, or a language model.

Real-time sync

An optional Rust server syncs edits across browsers (Yrs CRDT over WebTransport) and runs JS scripts in a Wasmtime sandbox.

Draw with code

Plain JavaScript calls. Pan and zoom the result below.

// Plate flange DN80 PN16: bolt pattern on a pitch circle
cad.addLayer("OUTLINE", { color: [255, 255, 255] })
cad.addLayer("CENTER", { color: [255, 0, 0], linetype: "Center" })

cad.addCircle([0, 0], 100,  { layer: "OUTLINE" })   // Ø200 outside
cad.addCircle([0, 0], 45.5, { layer: "OUTLINE" })   // Ø91 bore
cad.addCircle([0, 0], 80,   { layer: "CENTER" })    // Ø160 PCD

// One bolt hole, then a polar array of 8
const a = Math.PI / 8
const hole = cad.addCircle([80 * Math.cos(a), 80 * Math.sin(a)], 9, { layer: "OUTLINE" })
cad.array(hole, { polar: { center: [0, 0], count: 8 } })

cad.dimDiameter({ center: [0, 0], radius: 100 }, { angle: 30 })

Example drawings

Drawn by AI agents through the same JavaScript API. Click to open any one in the app.