CAD as TSX.
Write solid models as typed JSX components. tscad compiles them to an exact B-rep with a real CAD kernel in WebAssembly. Models are parametric, versionable, and as composable as any React app.
$ bunx tscad init my-part
Parts are components.
Parameters are typed props, holes are components from tscad/parts, and edges are picked by what they are, not by fragile indices.
import { defineParams, edges, type ParamValues } from "tscad"
import { BoltPattern, CounterboreHole, mountPatterns } from "tscad/parts"
export const params = defineParams({
thickness: { type: "number", default: 6, min: 3, max: 12, unit: "mm" },
corner: { type: "number", default: 6, min: 0, max: 12, unit: "mm" },
})
export default function MotorMount(p: ParamValues<typeof params>) {
const { thickness: t, corner } = p
const motor = mountPatterns.nema17
return (
<part name="mount" material="petg">
<difference>
<fillet radius={corner} edges={edges.vertical()}>
<box size={[60, 60, t]} />
</fillet>
<cylinder d={motor.pilot + 0.5} h={t} />
<BoltPattern pattern={motor} z={t}>
<CounterboreHole size="M3" depth={t} />
</BoltPattern>
</difference>
</part>
)
}
Everything a part needs.
A real modelling toolkit with friendly defaults: lengths in millimetres, Z up, boxes sitting on the build plate.
Exact B-rep kernel
solidcore runs in WebAssembly (or natively, 2–3× faster): booleans, fillets, chamfers, shells, revolves, lofts and sweeps on exact geometry, with true STEP export.
Just TypeScript
Components, .map, conditionals, npm packages. Every element and prop is typed and documented in your editor.
Parametric by default
defineParams gives typed props and live sliders; the kernel caches unchanged subtrees, so tweaks rebuild fast.
Sketches that make sense
Draw 2D shapes; nested loops become holes. Exact 2D booleans, hulls, offsets, text, SVG paths and constraint-solved sketches.
Instant feedback
tscad dev hot-reloads a viewer; errors point at your TSX line; click an edge to get its selector.
Built for agents
tscad mcp lets Claude write, evaluate, render and export models, with a reference generated from the types.
Gallery
Complete parametric models. Open any of them in the playground.

Assembly Arm
A two-link robot arm: a turntable on a base, an upper arm and a forearm, each a component exposing joint anchors. Revolute mates driven by the angle params pose it, with no transforms computed by hand.

Assembly Hinge Box
Hinged box: a shelled base and a lid joined by a revolute mate along the back edge. The open param drives the hinge angle: drag it and the lid swings.

Bolt and Nut
ISO-style hex bolt and nut, sized from the metric thread table. The hex heads get the classic 30° chamfer by intersecting the prism with a double cone; the shank is a single revolved profile with cosmetic V-grooves for the thread.

Bracket
L-shaped mounting bracket: a filleted base plate and upright joined by a gusset, with a parametric grid of mounting holes in the base and a slot pair in the upright.

Cable Clip
Cable clip: a C-shaped clip that snaps over a cable, with a screw tab. One extruded sketch: the ring and the tab are disjoint outlines that meet, so they're cut and joined in one go.

Coaster
Honeycomb coaster: a round puck with a raised rim, a field of hexagonal pockets laid out on a staggered grid (only the cells that fit inside the rim), and a filleted top edge.
Design with Claude.
tscad ships an MCP server. Add it to Claude Code and ask for a part: it reads the reference, writes the TSX, evaluates it with the kernel, looks at the render, fixes what fails, and exports STEP.
claude mcp add tscad -- bunx tscad mcp
