Shpigford/nurb
Agentic CAD for 3D printing
nurb – AI‑driven CAD partner for 3‑D printing
What it is – nurb is a Python‑based tool (with a native macOS GUI) that lets you talk to the large‑language model you already subscribe to and have it create real B‑Rep CAD geometry ready for FDM 3‑D printing. The AI writes a tiny Python function that describes the part; nurb runs that code on the Open CASCADE (OCCT) kernel, checks the resulting solid against a set of print‑ability rules, shows the model live in a three‑js viewer, and can export a print‑ready 3MF (or STL/STEP/GLB) with slicer settings baked in.
Core ideas
| Aspect | How it works (as described in the README) |
|---|---|
| Prompt‑to‑model | You type a natural‑language request (e.g., “Make an adapter that connects my shop‑vac hose to the dust port on my table‑saw”). The AI, using your existing subscription (GPT‑4, Claude, etc.), writes a Python function decorated with @part. |
| Real CAD kernel | The generated function uses build123d on the OCCT kernel, so the geometry is true B‑Rep solids (not meshes). |
| Live viewer | A bundled three.js viewer updates instantly as the part changes, keeping the camera fixed, and can slice the model with a section plane. |
| Parameter sliders | Default arguments of the part function become UI sliders; moving a slider updates the model and the AI sees the new values. |
| Printability checks | Thirteen hard‑coded rules (overhang, thin wall, floating islands, warp risk, stability, etc.) run against the exact solid. Findings are shown on the faces that triggered them. |
| Cost & time estimate | The viewer calls the slicer you already have (OrcaSlicer or Bambu Studio) to report estimated print time and filament weight. |
| Strength simulation | A voxel‑based stress analysis gives a breaking‑weight estimate and visualizes load concentration. |
| Real‑world fitting | You can import a scan or measurements; the tool forces the AI to use those dimensions instead of guessing. |
| Export | Default export is a 3MF with embedded print settings; STL, STEP, GLB are one flag away. |
| Offline‑first | All modelling, checking, and viewing run locally; no cloud account is required. |
Installation
| Platform | Method |
|---|---|
| macOS (Apple Silicon or Intel) | Download the signed .dmg from the latest GitHub release. |
| Command‑line (any OS) | `curl -fsSL https://nurb.dev/install.sh |
| Alternative | uv tool install nurb or pip install nurb for the Python package, then npx skills add shpigford/nurb --skill nurb to register the skill with your chosen AI‑agent framework. |
Typical workflow
- Start – Run the GUI (
nurb dev) or the CLI (nurb new <name>). A project is simply a folder containing aparts/directory. - Prompt – Speak to the AI (via the built‑in chat or your own terminal‑based agent). The AI creates a
parts/<name>.pycontaining a@partfunction. - Iterate – Adjust parameters with sliders, watch the live viewer, and re‑run
nurb checkto see any printability warnings. - Validate – Optionally run
nurb stressfor a strength estimate ornurb slicefor time/filament. - Export –
nurb export <part>writes a 3MF (or other format) ready to drop into your slicer. - Print – Open the exported file in OrcaSlicer or Bambu Studio and print.
Key commands (CLI)
nurb new <name>– scaffold a new part file and its markdown card.nurb dev– launch the hot‑reloading viewer.nurb check [part]– run the 13 printability rules (--strictto fail CI).nurb slice [part]– query the connected slicer for time/filament.nurb stress [part]– voxel‑based load simulation.nurb export [part]– write 3MF / STL / STEP / GLB.nurb scan <file>– import a phone scan or external mesh and record its dimensions.nurb skill– show or sync the AI‑agent skill file.
What makes it “AI‑focused”?
- Model‑agnostic – works with any LLM you already pay for; the README links to a benchmark page that grades models on real part‑design tasks.
- Agent skill – a small “skill” file (
npx skills add …) tells your chosen AI how to invoke thenurbcommands, turning the language model into an interactive CAD assistant. - Prompt‑driven geometry – the AI writes the actual CAD code; you never manually sketch.
Limitations & current gaps (as per the README)
- The viewer’s measurement tools are still TODO.
- A hosted, share‑able configurator is not yet built.
- Thin‑wall detection can miss extremely narrow features that the sampling algorithm doesn’t hit.
- The stress analysis is a simple voxel simulation; it’s useful for a quick sanity check but not a substitute for full‑finite‑element analysis.
- The tool only supports FDM‑style printers (it calls OrcaSlicer/Bambu Studio). Resin or industrial machines are not addressed.
License & provenance
- Source‑available under FSL‑1.1‑MIT (a permissive license that becomes plain MIT two years after each release). The license explicitly forbids building a competing commercial product.
- Core geometry relies on Open CASCADE Technology (LGPL‑2.1 + exception) via the
build123dandOCPPython bindings. - Viewer assets include three.js (MIT) and JetBrains Mono (OFL 1.1).
Bottom line
nurb is a concrete, locally‑run AI‑augmented CAD system aimed at hobbyist and small‑shop FDM 3‑D printing. It bridges natural‑language design, real B‑Rep geometry, and printer‑specific validation, all without requiring a cloud service. If you already have an LLM subscription and want to turn spoken design ideas into printable parts with immediate feedback, nurb provides a ready‑to‑use stack.
Related
- Project
- Project
- Project
- Project
- Project