Case study · Side project · 2026

Print3D StudioFrom a sentence to a sliced print.

A desktop CAD workbench where Claude writes the geometry, inspects its own renders, checks printability and slices for my Bambu Lab A1. It's a full loop from a sentence or a photo to a print-ready 3MF, with every version kept as a readable Python script.

Role
Solo: design, engineering, UX
Timeline
Oct – Nov 2026
Platform
Linux desktop (Electron, .deb)
Core
Claude Agent SDK + build123d
Print3D Studio — skeleton_hats / turkey_hat v4
Print3D Studio: the project list, a 3D view of a roast-turkey skeleton hat, and the chat where Claude resizes the head pocket after a failed test fit

The real app: a test print didn't fit, so Claude re-shapes the head pocket, measures the new mesh and re-checks the walls.

11

projects

30

part scripts

36

sliced 3MF files

~4.6k

lines of TS + Python

The problem

Modeling a small functional part in traditional CAD takes far longer than printing it. Asking a general-purpose LLM for geometry gets you something that looksplausible and fails on the bed: floating islands, unsupported overhangs, walls thinner than the nozzle, holes that don't fit the hardware.

The approach

Give the model the same tools and feedback a careful engineer has: code-first parametric CAD, a printability analyzer that knows the fitted nozzle, renders it must look at, and a real slicer. Then wrap it in a focused desktop app so the loop of describe, review, tweak and print takes minutes.

How it works

  1. 01

    Describe

    Plain English or a dropped image: “a wall hook for a 30 mm broom handle, two M4 screws.”

  2. 02

    Model

    Claude writes a parametric build123d script, or sculpts a signed distance field for organic forms.

  3. 03

    Check

    export() verifies a watertight, single-body mesh, flags overhangs, mid-air starts, bridges and thin walls.

  4. 04

    Review

    Multi-view renders and cross-sections are fed back to the agent, which inspects them and iterates.

  5. 05

    Slice

    Bambu Studio runs headless with flattened presets, matched to the fitted nozzle, producing a print-ready 3MF.

$ uv run projects/skeleton_hats/turkey_hat_v4.py
size:  72.0 × 84.0 × 37.7 mm
check: OK  one watertight body, fits the bed, sits on z=0
print: support-free · pocket capped by a ~10 mm bridge · ≥5 mm wall above it
slice: 0.6 mm nozzle · 0.24 mm layers · 2 walls · 2 h 0 min · 57 g

Iteration as versions

A redesign never overwrites: the agent copies the script to _v<n+1>, and the app groups versions under one part with a switcher, so any step can be compared or restored. Here is the turkey hat, step by step.

Primitive blockout, v1Anatomy from ellipsoids, v2One continuous surface, v3Fitted to the real skull, v4turkey_hat_v4.py

Fitted to the real skull

After a test fit (“doesn't fit, we need 44.5 mm front-to-back”) the agent stretched the pocket into an oval, scaling it upward by the same factor to keep every slope ≥ 45°, then capped it with a 10 mm bridge and measured the result: 38.3 × 45.3 mm.

Printability analysis

Underside of the turkey hat, with the platter's bed contact highlighted in green around the head pocket
Underside: bed contact, overhangs (none left)
Cross-section through the turkey hat showing the domed head pocket and even wall thickness
Section through the centre of mass: pocket shape and walls

Seeing what a slicer would struggle with

Previews hide what matters for a print. The check pass paints every face that leans past 50°, finds points where a layer would start on nothing, measures bridge spans, and samples the thinnest wall against two line widths of the fitted nozzle.

The agent reads these images and the print: notes after every run, and fixes the design before turning on supports.

The desktop app

3D view · per-colour meshes
Print3D Studio showing a two-colour sculpted whale in the 3D viewer with its size and colour legend
Script view · CodeMirror
Print3D Studio's script editor showing the turkey hat's build123d source

Engineering highlights

A closed feedback loop for the agent

Every export renders four views plus a checkimage (back, underside, two sections) at the exact resolution Claude reads without downscaling. The project's CLAUDE.md makes reviewing them mandatory, so the model critiques its own geometry before calling a part done.

Printability analysis, not just validity

Per-face overhang masks, connected-component patch sizing, detection of layers that would start in mid-air, bridge spans and a sampled thinnest-wall measurement, all scaled to the nozzle currently fitted.

Sculpting as numpy arithmetic

Organic shapes are signed distance fields on a voxel grid, blended with smooth unions and meshed with marching cubes. printable()fills under every overhang to a 45° slope “like wax running down,” so figures print without support.

Headless slicing that actually works

Bambu Studio's CLI doesn't resolve preset inheritance, so the slicer module flattens parent → child presets itself and swaps quality tiers across 0.2–0.8 mm nozzles, returning time and filament estimates with every run.

Resilient CAD finishing

OpenCascade fillets fail the whole part on a single bad edge and sometimes silently tear faces. soften() walks the radius down, re-meshes each attempt to verify it still closes, and reports what it achieved.

A long-lived agent per project

The Electron main process keeps one Claude Agent SDK session per project, fed by an async-iterable inbox so a single session takes many messages, with typed permission prompts relayed to the UI and resumable chat history.

print3d/ · Python toolkit

export()
STL, STEP, previews, check and sliced 3MF in one call
analyze
Overhangs, mid-air starts, bridges, bed contact, wall thickness
sculpt
SDF primitives, smooth booleans, mirror, noise, printable()
image
Trace logos and silhouettes; colour-region and photo reliefs
finish
soften(): fault-tolerant fillets and bed chamfers
slicer
Preset flattening, nozzle-aware quality tiers, CLI slicing
view
Close-ups and arbitrary cross-sections on demand

app/ · Electron + React

main.ts
Window, IPC and a proj:// protocol serving project files
agent.ts
Agent SDK sessions, streaming input, permission relay
projects.ts
Project scan, file watcher, uv and Bambu Studio launchers
StlViewer
three.js viewer with per-colour meshes and orbit controls
ScriptEditor
CodeMirror Python editor with on-disk change detection
Chat
Markdown transcript, tool cards, image paste to ref/

Takeaway

The model was never the bottleneck. The work was building the instruments it needs to see its own mistakes: analysis, renders and a real slicer, plus a UI that keeps a human one click from every decision.