Nothing new to learn
Variables, loops and functions instead of menus and modes. If you can write JavaScript, you can model a part tonight.
You have a 3D printer and you know how to program. You shouldn't have to learn a CAD program to make a bracket. With cadcode you describe the part in JavaScript, watch it update in the browser on every save, and send the STL to your slicer.
npm install cadcode
No sketches, constraints or toolbars. Sizes are numbers, so changing the box means changing a number, not redrawing it.
npx cadcode dev box.js
Keep the preview open next to your editor. Save the file and the model updates in place, at the same camera angle.
import { cube } from 'cadcode';
export const params = {
width: 60,
depth: 40,
height: 25,
wall: 2,
};
export default (p) =>
cube([p.width, p.depth, p.height]).subtract(
cube([
p.width - 2 * p.wall,
p.depth - 2 * p.wall,
p.height,
]).translate([p.wall, p.wall, p.wall]),
);
Variables, loops and functions instead of menus and modes. If you can write JavaScript, you can model a part tonight.
A model is a text file. Diff it, branch it, revert the change that broke the fit, and share it as a repo instead of a binary project file.
Put the sizes in params and reprint a variant with --set width=80. Wall too thin
for your nozzle? Change one number.
Solids come out watertight, built on manifold, the engine
recent OpenSCAD uses. cadcode stl writes the file, one per part.
A skill for Claude and Codex: the API, the program format, the differences from OpenSCAD, and a render-and-look loop, so the agent checks the part it built before handing it to you.
Unzip into your skills folder, or into .claude/skills of a project.
unzip cadcode-skill.zip -d ~/.claude/skills
Upload the zip as it is in Settings → Capabilities → Skills.
Unzip into your skills folder, or into .codex/skills of a project.
unzip cadcode-skill.zip -d ~/.agents/skills
Real things to print. Open any of them in the playground, change the code and download the STL.
Cable clipSnap-in channels for cables under a desk, one per cable size.
Chess setA Staunton-style set turned on a virtual lathe, every piece printed standing.
Cookie cutterA thin blade grown from any 2D outline, with a wide rim to press on.
DieA rounded six-sided die with spherical pips, opposite faces adding up to seven.
Gear bearingA planetary bearing with herringbone teeth that turns straight off the bed.
Geodesic sphereA frame of struts from a subdivided icosahedron, cut flat to stand and print.
Grid organizerA drawer tray of pockets with finger scoops, any number of rows and columns.
Headphone hookA rounded strap that screws under a desk and holds headphones by the band.
Hex bit holderA stepped tray for 1/4" screwdriver bits, with a strip in front for a label.
Hinged boxA small box and lid joined by a hinge that comes off the bed already assembled.
Hose adapterFrom a shop-vacuum hose cuff to a garden hose, revolved from one cross-section.
KeycapA sloped, dished keycap with the cross stem for Cherry MX style switches.
KnobA knurled knob with a pointer, for a 6 mm D-shaft potentiometer.
L-bracketA shelf bracket with a gusset, a filleted corner and countersunk screw holes.
LanternA hexagonal tealight lantern with honeycomb windows and a roof that drops on.
Menger spongeThe fractal cube, built with three cutters and one boolean.
Pegboard hookA J-hook for 1/4" pegboard that locks into two holes so it cannot twist.
Phone standA desk stand for a phone in its case, with a slot for the charging cable.
Raspberry Pi Zero caseA case for the Pi Zero and Zero 2 W with a sliding lid that clicks shut.
Raspberry Pi 3 caseA base with port windows and a snap-on cover for the Pi 3 Model B+.
PlanterA twisted, faceted plant pot with a drainage hole and a matching saucer.
PropellerA fan propeller with twisted, tapered blades and a domed spinner.
RocketA retro model rocket with swept fins, portholes and a nozzle, printed in one piece.
SD card holderA desk block with slots for SD and microSD cards, tilted so labels face you.
Sensor caseA box and lid for a Pro Micro board, a Li-ion cell and a climate sensor.
Sierpinski pyramidA tetrahedron of half-size tetrahedra, again and again, printed without supports.
SnowflakeA flat ornament grown from one branching arm, with a loop for a thread.
Soap dishAn oval dish with draining ribs, standing in an optional drip tray.
Spiral staircaseA desk model with wedge treads, balusters and a handrail around a column.
Stacking binA parts bin with a front scoop and a label shelf that stacks without sliding.
Torus knotA tube that winds around a torus, any (p, q) you give it.
Twisted vaseA lobed vase that twists and flares as it rises.